Use Page component for Tags page

This commit is contained in:
Clark Winkelmann 2018-05-24 18:50:11 +02:00
parent 69057183e0
commit a7ebbf1035

View File

@ -1,4 +1,4 @@
import Component from 'flarum/Component'; import Page from 'flarum/components/Page';
import IndexPage from 'flarum/components/IndexPage'; import IndexPage from 'flarum/components/IndexPage';
import listItems from 'flarum/helpers/listItems'; import listItems from 'flarum/helpers/listItems';
import humanTime from 'flarum/helpers/humanTime'; import humanTime from 'flarum/helpers/humanTime';
@ -7,14 +7,13 @@ import icon from 'flarum/helpers/icon';
import tagLabel from 'flarum/tags/helpers/tagLabel'; import tagLabel from 'flarum/tags/helpers/tagLabel';
import sortTags from 'flarum/tags/utils/sortTags'; import sortTags from 'flarum/tags/utils/sortTags';
export default class TagsPage extends Component { export default class TagsPage extends Page {
init() { init() {
super.init();
this.tags = sortTags(app.store.all('tags').filter(tag => !tag.parent())); this.tags = sortTags(app.store.all('tags').filter(tag => !tag.parent()));
app.current = this;
app.history.push('tags', icon('fas fa-th-large')); app.history.push('tags', icon('fas fa-th-large'));
app.drawer.hide();
app.modal.close();
} }
view() { view() {