mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 11:57:40 +08:00
Add option to set tags as default route
This commit is contained in:
parent
f214d32f2f
commit
023f946720
11
extensions/tags/js/admin/src/addTagsHomePageOption.js
Normal file
11
extensions/tags/js/admin/src/addTagsHomePageOption.js
Normal file
@ -0,0 +1,11 @@
|
||||
import { extend } from 'flarum/extend';
|
||||
import BasicsPage from 'flarum/components/BasicsPage';
|
||||
|
||||
export default function() {
|
||||
extend(BasicsPage.prototype, 'homePageItems', items => {
|
||||
items.add('tags', {
|
||||
path: '/tags',
|
||||
label: 'Tags'
|
||||
});
|
||||
});
|
||||
}
|
@ -2,6 +2,7 @@ import Tag from 'tags/models/Tag';
|
||||
import addTagsPermissionScope from 'tags/addTagsPermissionScope';
|
||||
import addTagPermission from 'tags/addTagPermission';
|
||||
import addTagsPane from 'tags/addTagsPane';
|
||||
import addTagsHomePageOption from 'tags/addTagsHomePageOption';
|
||||
|
||||
app.initializers.add('tags', app => {
|
||||
app.store.models.tags = Tag;
|
||||
@ -9,4 +10,5 @@ app.initializers.add('tags', app => {
|
||||
addTagsPermissionScope();
|
||||
addTagPermission();
|
||||
addTagsPane();
|
||||
addTagsHomePageOption();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user