forked from SolidOS/solid-panes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboardPane.js
More file actions
56 lines (46 loc) · 1.54 KB
/
Copy pathdashboardPane.js
File metadata and controls
56 lines (46 loc) · 1.54 KB
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
/**
* Lazy-loaded dashboard and preferences panes
*/
import * as UI from 'solid-ui-jss'
const ns = UI.ns
export const dashboardPane = {
icon: UI.icons.iconBase + 'noun_547570.svg',
name: 'dashboard',
label: function (subject, context) {
// Dashboard only shows for site root
if (subject.site && subject.uri === subject.site().uri) {
return 'Dashboard'
}
return null
},
render: async function (subject, context) {
const mod = await import(/* webpackChunkName: "dashboard-pane" */ '../dashboard/dashboardPane')
const realPane = mod.default || mod
return realPane.render(subject, context)
}
}
export const basicPreferencesPane = {
icon: UI.icons.iconBase + 'noun_547570.svg',
name: 'basicPreferences',
label: function (subject, context) {
return null // Controlled by dashboard
},
render: async function (subject, context) {
const mod = await import(/* webpackChunkName: "dashboard-pane" */ '../dashboard/basicPreferences')
const realPane = mod.default || mod
return realPane.render(subject, context)
}
}
export const trustedApplicationsPane = {
icon: UI.icons.iconBase + 'noun_15177.svg',
name: 'trustedApplications',
global: true,
label: function (subject, context) {
return null // Global pane, doesn't match subjects
},
render: async function (subject, context) {
const mod = await import(/* webpackChunkName: "dashboard-pane" */ '../trustedApplications/trustedApplications.view')
const realPane = mod.default || mod
return realPane.render(subject, context)
}
}