mirror of
https://github.com/flarum/core.git
synced 2025-08-13 03:44:32 +02:00
Add option to set tags as default route
This commit is contained in:
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 addTagsPermissionScope from 'tags/addTagsPermissionScope';
|
||||||
import addTagPermission from 'tags/addTagPermission';
|
import addTagPermission from 'tags/addTagPermission';
|
||||||
import addTagsPane from 'tags/addTagsPane';
|
import addTagsPane from 'tags/addTagsPane';
|
||||||
|
import addTagsHomePageOption from 'tags/addTagsHomePageOption';
|
||||||
|
|
||||||
app.initializers.add('tags', app => {
|
app.initializers.add('tags', app => {
|
||||||
app.store.models.tags = Tag;
|
app.store.models.tags = Tag;
|
||||||
@@ -9,4 +10,5 @@ app.initializers.add('tags', app => {
|
|||||||
addTagsPermissionScope();
|
addTagsPermissionScope();
|
||||||
addTagPermission();
|
addTagPermission();
|
||||||
addTagsPane();
|
addTagsPane();
|
||||||
|
addTagsHomePageOption();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user