Add label to dismiss flag button, change icon to eye-slash

ref #7 cc @jordanjay29
This commit is contained in:
Toby Zerner 2016-05-21 20:35:13 +09:30
parent da65528d2d
commit fbad6ab8cb
2 changed files with 20 additions and 4 deletions

View File

@ -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; return items;
}; };

View File

@ -63,9 +63,17 @@ export default function() {
extend(props, 'onclick', () => this.dismissFlag()); 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; return items;
}; };