Skip to content

Commit

Permalink
Merge pull request #12 from Ralkage/master
Browse files Browse the repository at this point in the history
Update for beta 16
  • Loading branch information
therealsujitk authored Mar 19, 2021
2 parents 6283d63 + fb3dc03 commit 8a6ac4f
Show file tree
Hide file tree
Showing 12 changed files with 7,674 additions and 1,239 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"homepage": "https://therealsuji.tk",
"require": {
"flarum/core": "^0.1.0-beta.15"
"flarum/core": "^0.1.0-beta.16"
},
"authors": [
{
Expand All @@ -41,4 +41,4 @@
}
}
}
}
}
14 changes: 9 additions & 5 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@

namespace Therealsujitk\GIFs;

use Flarum\Api\Event\Serializing;
use Flarum\Api\Serializer\ForumSerializer;
use Flarum\Extend;
use Illuminate\Contracts\Events\Dispatcher;
use Flarum\Settings\SettingsRepositoryInterface;

return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js'),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),
new Extend\Locales(__DIR__ . '/resources/locale'),
function (Dispatcher $dispatcher) {
$dispatcher->listen(Serializing::class, Listeners\SaveSettings::class);
},

(new Extend\ApiSerializer(ForumSerializer::class))
->attribute('therealsujitk-gifs.giphy_api_key', function ($serializer, $model) {
$settings = resolve(SettingsRepositoryInterface::class);

return $settings->get('therealsujitk-gifs.giphy_api_key');
})
];
4 changes: 2 additions & 2 deletions js/admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import app from 'flarum/app';
import app from 'flarum/common/app';

app.initializers.add('therealsujitk-gifs', (app) => {
app.extensionData.for('therealsujitk-gifs')
Expand All @@ -7,4 +7,4 @@ app.initializers.add('therealsujitk-gifs', (app) => {
type: 'text',
label: app.translator.trans('therealsujitk.admin.gifs.giphyAPIkey')
})
});
});
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 8a6ac4f

Please sign in to comment.