Skip to content

Commit

Permalink
Use new beta 15 features
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineFr committed Jan 16, 2021
1 parent 2169cda commit a76c30a
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 85 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 AntoineFr
Copyright (c) 2021 AntoineFr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Give money to your users for different actions.

**This extension is compatible with Flarum beta 14.**
**This extension is compatible with Flarum beta 15.**

## Installation
```
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "antoinefr/flarum-ext-money",
"description": "Give money to your users for different actions.",
"type": "flarum-extension",
"license": "MIT",
"support": {
"forum": "https://discuss.flarum.org/d/4699-money-extension",
"issues": "https://github.com/AntoineFr/flarum-ext-money/issues",
"source": "https://github.com/AntoineFr/flarum-ext-money"
},
"require": {
"flarum/core": "^0.1.0-beta.14"
"flarum/core": "^0.1.0-beta.15"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 11 additions & 1 deletion extend.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php namespace AntoineFr\Money;

use Flarum\Extend;
use Flarum\Api\Serializer\UserSerializer;
use Illuminate\Contracts\Events\Dispatcher;

return [
Expand All @@ -11,9 +12,18 @@
->js(__DIR__ . '/js/dist/admin.js'),

new Extend\Locales(__DIR__ . '/locale'),

(new Extend\ApiSerializer(UserSerializer::class))
->mutate(AddUserMoneyAttributes::class),

(new Extend\Settings)
->serializeToForum('antoinefr-money.moneyname', 'antoinefr-money.moneyname')
->serializeToForum('antoinefr-money.moneyforpost', 'antoinefr-money.moneyforpost')
->serializeToForum('antoinefr-money.moneyfordiscussion', 'antoinefr-money.moneyfordiscussion')
->serializeToForum('antoinefr-money.postminimumlength', 'antoinefr-money.postminimumlength')
->serializeToForum('antoinefr-money.noshowzero', 'antoinefr-money.noshowzero'),

function (Dispatcher $events) {
$events->subscribe(Listeners\LoadSettingsFromDatabase::class);
$events->subscribe(Listeners\GiveMoney::class);
}
];
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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/forum.js

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

Loading

0 comments on commit a76c30a

Please sign in to comment.