Skip to content

Commit 4b5239b

Browse files
committed
wip: Provide ready-made configuration snippets to help set up the app's configuration file #1140
1 parent cf09023 commit 4b5239b

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

extras/configs/helpers.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
module.exports = {
2-
VERTICAL_SEPARATOR: {
3-
component: 'QSeparator',
4-
vertical: true
2+
vertical_separator: (color = null) => {
3+
return {
4+
component: 'QSeparator',
5+
vertical: true,
6+
...(color && color)
7+
}
58
},
6-
HORIZONTAL_SEPARATOR: {
7-
component: 'QSeparator',
8-
class: 'full-width',
9-
style: 'min-height: 1px;'
9+
horizontal_separator: (color = null) => {
10+
return {
11+
component: 'QSeparator',
12+
class: 'full-width',
13+
style: 'min-height: 1px;',
14+
...(color && color)
15+
}
1016
}
1117
}

extras/configs/panes.left.js

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module.exports = {
2-
activityLink: (name, icon, label) => {
2+
activityLink: (name, icon, label, params = null) => {
33
return {
44
id: `${name}-activity-action`,
55
icon,
66
label,
77
renderer: 'item',
8-
route: { name: `${name}-activity` }
8+
route: { name: `${name}-activity`, ...(params && params) }
99
}
1010
},
1111
SETTINGS: {
@@ -47,11 +47,15 @@ module.exports = {
4747
handler: { name: 'launchTour', params: ['home'] },
4848
renderer: 'item'
4949
},
50-
LOGOUT: {
51-
id: 'logout-action',
52-
icon: 'las la-sign-out-alt',
53-
label: 'layout.LOGOUT',
54-
route: { name: 'logout' },
55-
renderer: 'item'
50+
logout: (provider = null) => {
51+
return {
52+
id: 'logout-action',
53+
icon: 'las la-sign-out-alt',
54+
label: 'layout.LOGOUT',
55+
route: {
56+
name: 'logout', ...(provider && { params: { provider } })
57+
},
58+
renderer: 'item'
59+
}
5660
}
5761
}

0 commit comments

Comments
 (0)