Skip to content

Commit

Permalink
0.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziven committed Sep 23, 2022
1 parent f703881 commit 9dd1418
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 24 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Daily Check In 每日签到

![License](https://img.shields.io/badge/license-MIT-blue.svg)
![License](https://img.shields.io/badge/license-MIT-blue.svg)

A [Flarum](http://flarum.org) extension. Add a button in the index page that allow user to daily check in the forum and receive reward.
一个Flarum扩展。在论坛首页加入签到按钮,允许用户进行每日签到并获得奖励。
Expand All @@ -22,6 +22,11 @@ php flarum migrate
php flarum cache:clear
```

### Links

- [Github](https://github.com/Ziiven/flarum-daily-check-in)
- [Packagist](https://packagist.org/packages/ziiven/flarum-daily-check-in)

### ScreenShot
![image](https://user-images.githubusercontent.com/29644610/191722290-9a54b9c6-664d-4e82-9181-9a9a47ad476d.jpg)
![image](https://user-images.githubusercontent.com/29644610/191472984-5724b8ba-38cd-40cc-96ee-7d1ae94ab45c.jpg)
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "ziiven/flarum-daily-check-in",
"description": "A Flarum extension. Add a button in the index page that allow user to daily check in the forum and receive reward.",
"type": "flarum-extension",
"license": "MIT",
"require": {
"flarum/core": "^1.0"
},
Expand Down
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.

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

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

20 changes: 20 additions & 0 deletions js/src/admin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {extend, override} from 'flarum/extend';

app.initializers.add('ziven-checkin', () => {
app.extensionData
.for('ziiven-daily-check-in')
.registerSetting(function () {
return (
<div className="Form-group">
<label>{app.translator.trans('ziven-checkin.admin.settings.reward-money')}</label>
<div class="helpText">{app.translator.trans('ziven-checkin.admin.settings.reward-money-requirement')}</div>
<input type="number" className="FormControl" step="any" bidi={this.setting('ziven-forum-checkin.checkinRewardMoney')} />
</div>
);
})
.registerSetting({
setting: 'ziven-forum-checkin.checkinTimeZone',
label: app.translator.trans('ziven-checkin.admin.settings.timezone'),
type: 'number',
})
});
Loading

0 comments on commit 9dd1418

Please sign in to comment.