mirror of
https://github.com/flarum/framework.git
synced 2025-02-27 22:48:39 +08:00
Allow extensions to place items between tags link and tags list
This PR sets the priority of the tags list to -12, to allow placing a menu link on -11 between the link and the list. Issue here: https://github.com/flarum/core/issues/1923
This commit is contained in:
parent
38f6ce3294
commit
e8dd756345
@ -19,7 +19,7 @@ export default function() {
|
|||||||
|
|
||||||
if (app.current instanceof TagsPage) return;
|
if (app.current instanceof TagsPage) return;
|
||||||
|
|
||||||
items.add('separator', Separator.component(), -10);
|
items.add('separator', Separator.component(), -12);
|
||||||
|
|
||||||
const params = this.stickyParams();
|
const params = this.stickyParams();
|
||||||
const tags = app.store.all('tags');
|
const tags = app.store.all('tags');
|
||||||
@ -32,7 +32,7 @@ export default function() {
|
|||||||
active = currentTag.parent() === tag;
|
active = currentTag.parent() === tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
items.add('tag' + tag.id(), TagLinkButton.component({tag, params, active}), -10);
|
items.add('tag' + tag.id(), TagLinkButton.component({tag, params, active}), -12);
|
||||||
};
|
};
|
||||||
|
|
||||||
sortTags(tags)
|
sortTags(tags)
|
||||||
@ -49,7 +49,7 @@ export default function() {
|
|||||||
items.add('moreTags', LinkButton.component({
|
items.add('moreTags', LinkButton.component({
|
||||||
children: app.translator.trans('flarum-tags.forum.index.more_link'),
|
children: app.translator.trans('flarum-tags.forum.index.more_link'),
|
||||||
href: app.route('tags')
|
href: app.route('tags')
|
||||||
}), -10);
|
}), -12);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user