Skip to content

Commit

Permalink
Update for Flarum beta 15
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkwinkelmann committed Jan 12, 2021
1 parent 7f36d45 commit 204a215
Show file tree
Hide file tree
Showing 12 changed files with 321 additions and 346 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2020 Clark Winkelmann
Copyright (c) 2019-2021 Clark Winkelmann
Copyright (c) 2018 David Sevilla Martín
Copyright (c) 2016-2017 Flagrow

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ You can [contact me](https://clarkwinkelmann.com/flarum) to sponsor additional f

Support is offered on a "best effort" basis through the Flarum community thread.

**Sponsors**: [Glowing Blue](https://glowingblue.com/), [Andrew MacLean](https://andrewdmaclean.com/)

## Links

- [GitHub](https://github.com/clarkwinkelmann/flarum-ext-mailing)
Expand Down
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@
"type": "flarum-extension",
"license": "MIT",
"require": {
"flarum/core": ">=0.1.0-beta.14 <0.1.0-beta.15"
"flarum/core": ">=0.1.0-beta.15 <0.1.0-beta.16"
},
"replace": {
"kilowhat/flarum-ext-mailing": "*"
},
"authors": [
{
"name": "Clark Winkelmann",
"homepage": "https://clarkwinkelmann.com/",
"email": "[email protected]",
"homepage": "https://clarkwinkelmann.com/"
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/clarkwinkelmann/flarum-ext-mailing/issues",
"source": "https://github.com/clarkwinkelmann/flarum-ext-mailing"
"source": "https://github.com/clarkwinkelmann/flarum-ext-mailing",
"forum": "https://discuss.flarum.org/d/20443"
},
"autoload": {
"psr-4": {
Expand All @@ -35,6 +36,7 @@
"extra": {
"flarum-extension": {
"title": "Mailing",
"category": "feature",
"icon": {
"name": "fas fa-envelope",
"backgroundColor": "#684ba6",
Expand Down
11 changes: 10 additions & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace ClarkWinkelmann\Mailing;

use Flarum\Api\Serializer\ForumSerializer;
use Flarum\Extend;

return [
Expand All @@ -13,5 +14,13 @@
new Extend\Locales(__DIR__ . '/resources/locale'),
(new Extend\Routes('api'))
->post('/admin-mail', 'kilowhat.mailing.create-mail', Controllers\SendAdminEmailController::class),
new Extenders\Permissions(),
(new Extend\ApiSerializer(ForumSerializer::class))
->mutate(function (ForumSerializer $serializer) {
$actor = $serializer->getActor();

return [
'kilowhatMailingCanMailAll' => $actor->can('kilowhat-mailing.mail-all'),
'kilowhatMailingCanMailIndividual' => $actor->can('kilowhat-mailing.mail-individual'),
];
}),
];
2 changes: 1 addition & 1 deletion js/dist/admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 204a215

Please sign in to comment.