mirror of
https://github.com/flarum/core.git
synced 2025-08-05 16:07:34 +02:00
chore: major frontend JS cleanup (#3609)
This commit is contained in:
@@ -87,22 +87,21 @@ app.initializers.add('flarum-pusher', () => {
|
||||
|
||||
if (count && typeof vdom === 'object' && vdom && 'children' in vdom && vdom.children instanceof Array) {
|
||||
vdom.children.unshift(
|
||||
Button.component(
|
||||
{
|
||||
className: 'Button Button--block DiscussionList-update',
|
||||
onclick: () => {
|
||||
this.attrs.state.refresh().then(() => {
|
||||
this.loadingUpdated = false;
|
||||
app.pushedUpdates = [];
|
||||
app.setTitleCount(0);
|
||||
m.redraw();
|
||||
});
|
||||
this.loadingUpdated = true;
|
||||
},
|
||||
loading: this.loadingUpdated,
|
||||
},
|
||||
app.translator.trans('flarum-pusher.forum.discussion_list.show_updates_text', { count })
|
||||
)
|
||||
<Button
|
||||
className="Button Button--block DiscussionList-update"
|
||||
onclick={() => {
|
||||
this.attrs.state.refresh().then(() => {
|
||||
this.loadingUpdated = false;
|
||||
app.pushedUpdates = [];
|
||||
app.setTitleCount(0);
|
||||
m.redraw();
|
||||
});
|
||||
this.loadingUpdated = true;
|
||||
}}
|
||||
loading={this.loadingUpdated}
|
||||
>
|
||||
{app.translator.trans('flarum-pusher.forum.discussion_list.show_updates_text', { count })}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user