1
0
mirror of https://github.com/flarum/core.git synced 2025-08-14 04:14:06 +02:00

Compare commits

...

9 Commits

Author SHA1 Message Date
David Sevilla Martin
0035cefa14 Add load previous button to DiscussionList 2021-06-12 11:01:07 -04:00
David Sevilla Martin
a27f540aab Add <hr> page separator to DiscussionList 2021-06-12 11:00:50 -04:00
David Wheatley
d1e38558c5 Fix image avatar alignment in notifications (#2906) 2021-06-11 12:13:57 +01:00
Daniël Klabbers
0cca808275 minor improvements to the security policy 2021-06-10 21:56:30 +02:00
Daniël Klabbers
5ee5f82e3d huntr.dev as first point for security vuln (#2918)
* huntr.dev as first point for security vuln

* add badge for huntr.dev
2021-06-10 16:26:40 +02:00
Daniël Klabbers
9077fef5b2 clean up of composer.json, added funding and more support links 2021-06-08 01:58:37 +02:00
Daniël Klabbers
93cebec0be remove tidelift, we stopped doing that 2021-06-08 01:54:11 +02:00
Daniël Klabbers
a4a81c0ec2 Remove [forum] prefix in some mails
fixes #2515
2021-06-08 01:28:04 +02:00
David Wheatley
50dcfdb2a6 Mark typings as generated code (#2886) 2021-06-07 13:12:43 +01:00
10 changed files with 65 additions and 17 deletions

1
.gitattributes vendored
View File

@@ -12,5 +12,6 @@ tests export-ignore
js/dist/* -diff
js/dist/* linguist-generated
js/dist-typings/* linguist-generated
* text=auto eol=lf

1
.github/FUNDING.yml vendored
View File

@@ -1,3 +1,2 @@
github: flarum
open_collective: flarum
tidelift: packagist/flarum/core

14
.github/SECURITY.md vendored
View File

@@ -1,13 +1,13 @@
# Security Policy
## Supported Versions
## Versions
We will only patch security vulnerabilities in the stable 1.x release.
Due to the nature of our project - being open source - we have decided to patch only the latest major release (currently v1.x) for security vulnerabilities.
## Reporting a Vulnerability
## How to disclose
If you discover a security vulnerability within Flarum, please send an email to security@flarum.org so we can address it promptly.
Please use [huntr.dev](https://huntr.dev/) for security issues that affect our project. If you believe you have found a vulnerability, please disclose it via [this form](https://huntr.dev/bounties/disclose/?target=https://github.com/flarum/core).
We will get back to you as time allows.
Discussions may commence internally, so you may not hear back immediately.
When reporting a vulnerability, please provide your GitHub username (if available), so that we can invite you to collaborate on a [security advisory on GitHub](https://help.github.com/en/articles/about-maintainer-security-advisories).
This will enable us to **review** the vulnerability, **fix** it promptly, and **reward** you for your efforts.
If you have any questions about the process, feel free to reach out to security@huntr.dev or security@flarum.org.

View File

@@ -5,6 +5,7 @@
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/dt/flarum/core" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/github/v/release/flarum/core?sort=semver" alt="Latest Version"></a>
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/l/flarum/core" alt="License"></a>
<a href="https://huntr.dev/bounties/disclose/?target=https://github.com/flarum/core"><img src="https://cdn.huntr.dev/huntr_security_badge_mono.svg" alt="huntr"></a>
<a href="https://github.styleci.io/repos/28257573"><img src="https://github.styleci.io/repos/28257573/shield?style=flat" alt="StyleCI"></a>
</p>

View File

@@ -14,10 +14,26 @@
"homepage": "https://flarum.org/team"
}
],
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/flarum"
},
{
"type": "github",
"url": "https://github.com/sponsors/flarum"
},
{
"type": "other",
"url": "https://flarum.org/donate"
}
],
"support": {
"issues": "https://github.com/flarum/core/issues",
"source": "https://github.com/flarum/core",
"docs": "https://flarum.org/docs/"
"docs": "https://docs.flarum.org",
"forum": "https://discuss.flarum.org",
"chat": "https://flarum.org/chat"
},
"require": {
"php": ">=7.3",

View File

@@ -41,13 +41,28 @@ export default class DiscussionList extends Component {
return (
<div className={'DiscussionList' + (state.isSearchResults() ? ' DiscussionList--searchResults' : '')}>
{state.hasPrev() && (
<div className="DiscussionList-loadPrev">
{state.isLoadingPrev() ? (
<LoadingIndicator />
) : (
<Button className="Button" onclick={state.loadPrev.bind(state)}>
{app.translator.trans('core.forum.discussion_list.load_prev_button')}
</Button>
)}
</div>
)}
<ul className="DiscussionList-discussions">
{state.getPages().map((pg) => {
return pg.items.map((discussion) => (
<li key={discussion.id()} data-id={discussion.id()}>
{DiscussionListItem.component({ discussion, params })}
</li>
));
return [
<hr key={`page-${pg.number}`} data-page={pg.number} />,
...pg.items.map((discussion) => (
<li key={discussion.id()} data-id={discussion.id()}>
{DiscussionListItem.component({ discussion, params })}
</li>
)),
];
})}
</ul>
<div className="DiscussionList-loadMore">{loading}</div>

View File

@@ -7,8 +7,12 @@
list-style-type: none;
position: relative;
}
.DiscussionList-loadMore {
.DiscussionList-loadMore, .DiscussionList-loadPrev {
text-align: center;
}
.DiscussionList-loadMore {
margin-top: 10px;
.LoadingIndicator-container {
@@ -16,6 +20,10 @@
}
}
.DiscussionList-loadPrev .LoadingIndicator-container {
height: 36px;
}
@media @phone {
.DiscussionList {
margin: 0 -15px;

View File

@@ -136,6 +136,14 @@
.Avatar--size(24px);
grid-area: avatar;
}
// Since images don't have baselines, aligning against the baseline won't work.
// Instead we need to do some manual hackery to fix then, otherwise they won't
// be correctly vertically aligned.
img.Avatar {
align-self: flex-start;
margin-top: -2px;
}
&-icon {
font-size: 14px;

View File

@@ -110,7 +110,7 @@ class RequestPasswordResetHandler
];
$body = $this->translator->trans('core.email.reset_password.body', $data);
$subject = '['.$data['forum'].'] '.$this->translator->trans('core.email.reset_password.subject');
$subject = $this->translator->trans('core.email.reset_password.subject');
$this->queue->push(new SendRawEmailJob($user->email, $subject, $body));

View File

@@ -52,7 +52,7 @@ class EmailConfirmationMailer
$data = $this->getEmailData($event->user, $email);
$body = $this->translator->trans('core.email.confirm_email.body', $data);
$subject = '['.$data['forum'].'] '.$this->translator->trans('core.email.confirm_email.subject');
$subject = $this->translator->trans('core.email.confirm_email.subject');
$this->queue->push(new SendRawEmailJob($email, $subject, $body));
}