mirror of
https://github.com/flarum/framework.git
synced 2024-11-27 02:53:37 +08:00
Add label to dismiss flag button, change icon to eye-slash
ref #7 cc @jordanjay29
This commit is contained in:
parent
da65528d2d
commit
fbad6ab8cb
12
extensions/flags/js/forum/dist/extension.js
vendored
12
extensions/flags/js/forum/dist/extension.js
vendored
|
@ -123,9 +123,17 @@ System.register('flarum/flags/addFlagsToPosts', ['flarum/extend', 'flarum/app',
|
|||
});
|
||||
});
|
||||
|
||||
items.merge(controls);
|
||||
items.add('controls', m(
|
||||
'div',
|
||||
{ className: 'ButtonGroup' },
|
||||
controls.toArray()
|
||||
));
|
||||
|
||||
items.add('dismiss', m(Button, { className: 'Button Button--icon Button--link', icon: 'times', onclick: this.dismissFlag.bind(this), title: app.translator.trans('flarum-flags.forum.post.dismiss_flag_tooltip') }), -100);
|
||||
items.add('dismiss', m(
|
||||
Button,
|
||||
{ className: 'Button', icon: 'eye-slash', onclick: this.dismissFlag.bind(this) },
|
||||
app.translator.trans('flarum-flags.forum.post.dismiss_flag_button')
|
||||
), -100);
|
||||
|
||||
return items;
|
||||
};
|
||||
|
|
|
@ -63,9 +63,17 @@ export default function() {
|
|||
extend(props, 'onclick', () => this.dismissFlag());
|
||||
});
|
||||
|
||||
items.merge(controls);
|
||||
items.add('controls', (
|
||||
<div className="ButtonGroup">
|
||||
{controls.toArray()}
|
||||
</div>
|
||||
));
|
||||
|
||||
items.add('dismiss', <Button className="Button Button--icon Button--link" icon="ban" onclick={this.dismissFlag.bind(this)} title={app.translator.trans('flarum-flags.forum.post.dismiss_flag_tooltip')}/>, -100);
|
||||
items.add('dismiss', (
|
||||
<Button className="Button" icon="eye-slash" onclick={this.dismissFlag.bind(this)}>
|
||||
{app.translator.trans('flarum-flags.forum.post.dismiss_flag_button')}
|
||||
</Button>
|
||||
), -100);
|
||||
|
||||
return items;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user