-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmainNavigation.js
107 lines (84 loc) · 2.39 KB
/
mainNavigation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// import auth from './auth';
import server from 'apiServer';
import DummyComponent from './dummy.vue';
export default {
getAdditionalComponents: () => ({
userPanel: DummyComponent
}),
getNavigationItems: router => [
{
caption: 'Articles',
key: 'article',
url: router.url('resource.article.index'),
icon: 'file'
},
{
caption: 'Pages',
key: 'page',
url: router.url('resource.page.index'),
icon: 'sidebar'
},
{
caption: 'Multimedia',
key: 'media',
url: router.url('resource.media.index'),
icon: 'instagram'
},
{
caption: 'Application users',
key: 'user',
url: router.url('resource.user.index'),
icon: 'user'
},
{
caption: 'Miscellaneous',
icon: 'moreHorizontal',
subItems: [
{
caption: 'Categories',
key: 'category',
url: router.url('resource.category.index')
},
{
caption: 'Html snippets',
key: 'snippet',
url: router.url('resource.snippet.index')
},
{
caption: 'Tags',
key: 'tag',
url: router.url('resource.tag.index')
}
]
}
],
getUserNavigationItems: router => [
{
caption: 'Documentation',
url: process.env.BASE_ABSOLUTE_URL + '/trim/',
appLink: false
},
{
caption: 'My settings',
url: router.url('mySettings')
},
{
caption: 'Reset demo data',
action: () => {
server.resetData();
window.location.reload();
}
},
{
key: 'showSearch',
caption: 'Show search <span style="opacity: 0.4;">(Shift + l)</span>',
action: mainNavigation => mainNavigation.showSearch().close()
}
// {
// caption: 'Logout',
// action: () => auth.logout()
// }
],
getProjectCaption: () => 'Trikoder Trim CMS',
getUserCaption: () => 'Demo user'
};