1
0
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:
David Wheatley
2023-05-07 17:40:18 +01:00
committed by GitHub
parent 3264455068
commit e63e161be6
105 changed files with 817 additions and 1064 deletions

View File

@@ -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>
);
}
}