mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Update admin js for admin us redesign
This commit is contained in:
parent
bf6dd3083d
commit
f5c8dade55
|
@ -1,35 +0,0 @@
|
||||||
import SettingsModal from 'flarum/components/SettingsModal';
|
|
||||||
|
|
||||||
export default class PusherSettingsModal extends SettingsModal {
|
|
||||||
className() {
|
|
||||||
return 'PusherSettingsModal Modal--small';
|
|
||||||
}
|
|
||||||
|
|
||||||
title() {
|
|
||||||
return app.translator.trans('flarum-pusher.admin.pusher_settings.title');
|
|
||||||
}
|
|
||||||
|
|
||||||
form() {
|
|
||||||
return [
|
|
||||||
<div className="Form-group">
|
|
||||||
<label>{app.translator.trans('flarum-pusher.admin.pusher_settings.app_id_label')}</label>
|
|
||||||
<input className="FormControl" bidi={this.setting('flarum-pusher.app_id')}/>
|
|
||||||
</div>,
|
|
||||||
|
|
||||||
<div className="Form-group">
|
|
||||||
<label>{app.translator.trans('flarum-pusher.admin.pusher_settings.app_key_label')}</label>
|
|
||||||
<input className="FormControl" bidi={this.setting('flarum-pusher.app_key')}/>
|
|
||||||
</div>,
|
|
||||||
|
|
||||||
<div className="Form-group">
|
|
||||||
<label>{app.translator.trans('flarum-pusher.admin.pusher_settings.app_secret_label')}</label>
|
|
||||||
<input className="FormControl" bidi={this.setting('flarum-pusher.app_secret')}/>
|
|
||||||
</div>,
|
|
||||||
|
|
||||||
<div className="Form-group">
|
|
||||||
<label>{app.translator.trans('flarum-pusher.admin.pusher_settings.app_cluster_label')}</label>
|
|
||||||
<input className="FormControl" bidi={this.setting('flarum-pusher.app_cluster')}/>
|
|
||||||
</div>
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +1,38 @@
|
||||||
import { extend } from 'flarum/extend';
|
|
||||||
import app from 'flarum/app';
|
import app from 'flarum/app';
|
||||||
|
|
||||||
import PusherSettingsModal from './components/PusherSettingsModal';
|
|
||||||
|
|
||||||
app.initializers.add('flarum-pusher', app => {
|
app.initializers.add('flarum-pusher', app => {
|
||||||
app.extensionSettings['flarum-pusher'] = () => app.modal.show(PusherSettingsModal);
|
app.extensionData
|
||||||
|
.for('flarum-pusher')
|
||||||
|
.registerSetting(
|
||||||
|
{
|
||||||
|
setting: 'flarum-pusher.app_id',
|
||||||
|
label: app.translator.trans('flarum-pusher.admin.pusher_settings.app_id_label'),
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
30
|
||||||
|
)
|
||||||
|
.registerSetting(
|
||||||
|
{
|
||||||
|
setting: 'flarum-pusher.app_key',
|
||||||
|
label: app.translator.trans('flarum-pusher.admin.pusher_settings.app_key_label'),
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
20
|
||||||
|
)
|
||||||
|
.registerSetting(
|
||||||
|
{
|
||||||
|
setting: 'flarum-pusher.app_secret',
|
||||||
|
label: app.translator.trans('flarum-pusher.admin.pusher_settings.app_secret_label'),
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
10
|
||||||
|
)
|
||||||
|
.registerSetting(
|
||||||
|
{
|
||||||
|
setting: 'flarum-pusher.app_cluster',
|
||||||
|
label: app.translator.trans('flarum-pusher.admin.pusher_settings.app_cluster_label'),
|
||||||
|
type: 'text',
|
||||||
|
},
|
||||||
|
0
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user