@things-factory/operato-gangsters 6.2.0 → 6.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-client/bootstrap.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@operato/i18n/ox-i18n.js';
|
|
2
2
|
import '@things-factory/notification';
|
|
3
|
+
import '@things-factory/board-ui';
|
|
3
4
|
import '@things-factory/auth-ui/dist-client'; /* for domain-switch */
|
|
4
5
|
import { html } from 'lit-html';
|
|
5
6
|
import { registerDefaultGroups } from '@operato/board';
|
|
@@ -7,6 +8,7 @@ import { navigate, store } from '@operato/shell';
|
|
|
7
8
|
import { APPEND_APP_TOOL } from '@things-factory/apptool-base';
|
|
8
9
|
import { setupAppToolPart } from '@things-factory/apptool-ui';
|
|
9
10
|
import { auth } from '@things-factory/auth-base/dist-client';
|
|
11
|
+
import { hasPrivilege } from '@things-factory/auth-base/dist-client';
|
|
10
12
|
import { setAuthManagementMenus } from '@things-factory/auth-ui';
|
|
11
13
|
import { setupContextUIPart } from '@things-factory/context-ui';
|
|
12
14
|
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout';
|
|
@@ -41,41 +43,97 @@ export default async function bootstrap() {
|
|
|
41
43
|
});
|
|
42
44
|
/* set board-modeller group and default templates */
|
|
43
45
|
registerDefaultGroups();
|
|
44
|
-
auth
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
action: () => {
|
|
55
|
-
navigate('connection');
|
|
56
|
-
}
|
|
46
|
+
/* set auth management menus into more-panel */
|
|
47
|
+
setAuthManagementMenus();
|
|
48
|
+
if (await hasPrivilege({ name: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })) {
|
|
49
|
+
store.dispatch({
|
|
50
|
+
type: ADD_MORENDA,
|
|
51
|
+
morenda: {
|
|
52
|
+
icon: html ` <mwc-icon>vpn_key</mwc-icon> `,
|
|
53
|
+
name: html ` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
54
|
+
action: () => {
|
|
55
|
+
navigate('oauth2-clients');
|
|
57
56
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (await hasPrivilege({ name: 'mutation', category: 'board', domainOwnerGranted: true })) {
|
|
61
|
+
store.dispatch({
|
|
62
|
+
type: ADD_MORENDA,
|
|
63
|
+
morenda: {
|
|
64
|
+
icon: html ` <mwc-icon>font_download</mwc-icon> `,
|
|
65
|
+
name: html ` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
|
|
66
|
+
action: () => {
|
|
67
|
+
navigate('font-list');
|
|
67
68
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
store.dispatch({
|
|
72
|
+
type: ADD_MORENDA,
|
|
73
|
+
morenda: {
|
|
74
|
+
icon: html ` <mwc-icon>attachment</mwc-icon> `,
|
|
75
|
+
name: html ` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
|
|
76
|
+
action: () => {
|
|
77
|
+
navigate('attachment-list');
|
|
77
78
|
}
|
|
78
|
-
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
store.dispatch({
|
|
82
|
+
type: ADD_MORENDA,
|
|
83
|
+
morenda: {
|
|
84
|
+
icon: html ` <mwc-icon>dvr</mwc-icon> `,
|
|
85
|
+
name: html ` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
|
|
86
|
+
action: () => {
|
|
87
|
+
navigate('board-list');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
store.dispatch({
|
|
92
|
+
type: ADD_MORENDA,
|
|
93
|
+
morenda: {
|
|
94
|
+
icon: html ` <mwc-icon>airplay</mwc-icon> `,
|
|
95
|
+
name: html ` <ox-i18n msgid="menu.play-groups"></ox-i18n> `,
|
|
96
|
+
action: () => {
|
|
97
|
+
navigate('play-list');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (await hasPrivilege({ name: 'mutation', category: 'scenario', domainOwnerGranted: true })) {
|
|
103
|
+
store.dispatch({
|
|
104
|
+
type: ADD_MORENDA,
|
|
105
|
+
morenda: {
|
|
106
|
+
icon: html ` <mwc-icon>device_hub</mwc-icon> `,
|
|
107
|
+
name: html ` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
108
|
+
action: () => {
|
|
109
|
+
navigate('connection');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
store.dispatch({
|
|
114
|
+
type: ADD_MORENDA,
|
|
115
|
+
morenda: {
|
|
116
|
+
icon: html ` <mwc-icon>format_list_numbered</mwc-icon> `,
|
|
117
|
+
name: html ` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
118
|
+
action: () => {
|
|
119
|
+
navigate('scenario');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
store.dispatch({
|
|
124
|
+
type: ADD_MORENDA,
|
|
125
|
+
morenda: {
|
|
126
|
+
icon: html ` <mwc-icon>hub</mwc-icon> `,
|
|
127
|
+
name: html ` <ox-i18n msgid="text.integration analysis"></ox-i18n> (beta)`,
|
|
128
|
+
action: () => {
|
|
129
|
+
navigate('integration-analysis');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
auth.on('profile', async ({ credential }) => {
|
|
135
|
+
updateMenuTemplate(getMenuTemplate(credential.owner, await queryActivities()));
|
|
136
|
+
if (credential.owner) {
|
|
79
137
|
store.dispatch({
|
|
80
138
|
type: ADD_MORENDA,
|
|
81
139
|
morenda: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,8BAA8B,CAAA;AACrC,OAAO,qCAAqC,CAAA,CAAC,uBAAuB;AAEpE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACjG,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,CAAC,GAAG,CACT;;;;;;CAMD,EACC,kCAAkC,CACnC,CAAA;AAED,MAAM,CAAC,OA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5B,QAAQ,EAAE,IAAI;qBACf,CAAC,CAAA;gBACJ,CAAC;;;SAGJ;gBACD,QAAQ,EAAE,aAAa,CAAC,IAAI;aAC7B;SACF,CAAC,CAAA;QAEF,cAAc,CAAC;YACb,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR,IAAI,EAAE,KAAK;gBACX,QAAQ,EAAE,MAAM;gBAChB,QAAQ,EAAE,IAAI,CAAA,qEAAqE;aACpF;YACD,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;SACrC,CAAC,CAAA;QAEF,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAA,yDAAyD;aACxE;SACF,CAAC,CAAA;QAEF,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAA,mDAAmD;aAClE;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\nimport '@things-factory/notification'\nimport '@things-factory/auth-ui/dist-client' /* for domain-switch */\n\nimport { html } from 'lit-html'\n\nimport { registerDefaultGroups } from '@operato/board'\nimport { navigate, store } from '@operato/shell'\nimport { APPEND_APP_TOOL } from '@things-factory/apptool-base'\nimport { setupAppToolPart } from '@things-factory/apptool-ui'\nimport { auth } from '@things-factory/auth-base/dist-client'\nimport { setAuthManagementMenus } from '@things-factory/auth-ui'\nimport { setupContextUIPart } from '@things-factory/context-ui'\nimport { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\nimport { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'\nimport { ADD_MORENDA } from '@things-factory/more-base'\nimport { ADD_SETTING } from '@things-factory/setting-base'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { getMenuTemplate } from './menu'\nimport { queryActivities } from './query-activities'\n\nconsole.log(\n `%c\n ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄▄▄▄ ▄▄ ▄ ▄ ▄▄▄▄ ▄▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▓ ▀ \n ▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓ ▄▄ ▓▀▀▓ ▓ ▓ ▓ ▓ ▄▄ ▀▀▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▄ ▓ \n ▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀ \n`,\n 'background: #222; color: #bada55'\n)\n\nexport default async function bootstrap() {\n const mobile = isMobileDevice()\n\n await setupAppToolPart({\n toolbar: true,\n busybar: true,\n mdibar: mobile ? false : true,\n pageToolbar: true\n })\n\n await setupContextUIPart({\n titlebar: mobile ? 'header' : 'page-header',\n contextToolbar: 'page-footer'\n })\n\n await setupMenuPart({\n slotTemplate: html` <domain-switch slot=\"tail\"></domain-switch> `,\n hovering: true\n })\n\n /* set board-modeller group and default templates */\n registerDefaultGroups()\n\n auth.on('profile', async ({ credential }) => {\n updateMenuTemplate(getMenuTemplate(credential.owner, await queryActivities()))\n\n /* set auth management menus into more-panel */\n setAuthManagementMenus(credential)\n\n if (credential.owner) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>device_hub</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.connection\"></ox-i18n> `,\n action: () => {\n navigate('connection')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>format_list_numbered</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.scenario\"></ox-i18n> `,\n action: () => {\n navigate('scenario')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>vpn_key</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.oauth2-clients\"></ox-i18n> `,\n action: () => {\n navigate('oauth2-clients')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>device_hub</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.installable-activities\"></ox-i18n> `,\n action: () => {\n navigate('installable-activity-list')\n }\n }\n })\n }\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>extension</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.api-sandbox\"></ox-i18n> `,\n action: () => {\n navigate('api-swagger')\n }\n }\n })\n\n // store.dispatch({\n // type: ADD_MORENDA,\n // morenda: {\n // icon: html` <mwc-icon>help</mwc-icon> `,\n // name: html` <ox-i18n msgid=\"text.help\"></ox-i18n> `,\n // action: () => {\n // navigate('help')\n // }\n // }\n // })\n\n /* setting app-tools */\n store.dispatch({\n type: APPEND_APP_TOOL,\n tool: {\n name: 'notification-badge',\n template: html`\n <notification-badge\n @click=${e => {\n toggleOverlay('notification', {\n backdrop: true\n })\n }}\n >\n </notification-badge>\n `,\n position: TOOL_POSITION.REAR\n }\n })\n\n appendViewpart({\n name: 'notification',\n viewpart: {\n show: false,\n hovering: 'edge',\n template: html` <notification-list style=\"min-width: 300px;\"></notification-list> `\n },\n position: VIEWPART_POSITION.ASIDEBAR\n })\n\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 20,\n template: html` <notification-setting-let></notification-setting-let> `\n }\n })\n\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 21,\n template: html` <lite-menu-setting-let></lite-menu-setting-let> `\n }\n })\n })\n}\n"]}
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AA;gBACzB,CAAC;aACF;SACF,CAAC,CAAA;QAEF,mBAAmB;QACnB,uBAAuB;QACvB,eAAe;QACf,+CAA+C;QAC/C,2DAA2D;QAC3D,sBAAsB;QACtB,yBAAyB;QACzB,QAAQ;QACR,MAAM;QACN,KAAK;QAEL,uBAAuB;QACvB,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE;gBACJ,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,IAAI,CAAA;;qBAED,CAAC,CAAC,EAAE;oBACX,aAAa,CAAC,cAAc,EAAE;wBAC5B,QAAQ,EAAE,IAAI;qBACf,CAAC,CAAA;gBACJ,CAAC;;;SAGJ;gBACD,QAAQ,EAAE,aAAa,CAAC,IAAI;aAC7B;SACF,CAAC,CAAA;QAEF,cAAc,CAAC;YACb,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR,IAAI,EAAE,KAAK;gBACX,QAAQ,EAAE,MAAM;gBAChB,QAAQ,EAAE,IAAI,CAAA,qEAAqE;aACpF;YACD,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;SACrC,CAAC,CAAA;QAEF,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAA,yDAAyD;aACxE;SACF,CAAC,CAAA;QAEF,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE;gBACP,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,IAAI,CAAA,mDAAmD;aAClE;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\nimport '@things-factory/notification'\nimport '@things-factory/board-ui'\nimport '@things-factory/auth-ui/dist-client' /* for domain-switch */\n\nimport { html } from 'lit-html'\n\nimport { registerDefaultGroups } from '@operato/board'\nimport { navigate, store } from '@operato/shell'\nimport { APPEND_APP_TOOL } from '@things-factory/apptool-base'\nimport { setupAppToolPart } from '@things-factory/apptool-ui'\nimport { auth } from '@things-factory/auth-base/dist-client'\nimport { hasPrivilege } from '@things-factory/auth-base/dist-client'\nimport { setAuthManagementMenus } from '@things-factory/auth-ui'\nimport { setupContextUIPart } from '@things-factory/context-ui'\nimport { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'\nimport { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'\nimport { ADD_MORENDA } from '@things-factory/more-base'\nimport { ADD_SETTING } from '@things-factory/setting-base'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { getMenuTemplate } from './menu'\nimport { queryActivities } from './query-activities'\n\nconsole.log(\n `%c\n ▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄▄▄▄ ▄▄ ▄ ▄ ▄▄▄▄ ▄▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▓ ▀ \n ▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓ ▄▄ ▓▀▀▓ ▓ ▓ ▓ ▓ ▄▄ ▀▀▄▄ \n ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓▓ ▓ ▓ ▄ ▓ \n ▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀ \n`,\n 'background: #222; color: #bada55'\n)\n\nexport default async function bootstrap() {\n const mobile = isMobileDevice()\n\n await setupAppToolPart({\n toolbar: true,\n busybar: true,\n mdibar: mobile ? false : true,\n pageToolbar: true\n })\n\n await setupContextUIPart({\n titlebar: mobile ? 'header' : 'page-header',\n contextToolbar: 'page-footer'\n })\n\n await setupMenuPart({\n slotTemplate: html` <domain-switch slot=\"tail\"></domain-switch> `,\n hovering: true\n })\n\n /* set board-modeller group and default templates */\n registerDefaultGroups()\n\n /* set auth management menus into more-panel */\n setAuthManagementMenus()\n\n if (await hasPrivilege({ name: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>vpn_key</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.oauth2-clients\"></ox-i18n> `,\n action: () => {\n navigate('oauth2-clients')\n }\n }\n })\n }\n\n if (await hasPrivilege({ name: 'mutation', category: 'board', domainOwnerGranted: true })) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>font_download</mwc-icon> `,\n name: html` <ox-i18n msgid=\"menu.fonts\"></ox-i18n> `,\n action: () => {\n navigate('font-list')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>attachment</mwc-icon> `,\n name: html` <ox-i18n msgid=\"menu.attachments\"></ox-i18n> `,\n action: () => {\n navigate('attachment-list')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>dvr</mwc-icon> `,\n name: html` <ox-i18n msgid=\"menu.board-list\"></ox-i18n> `,\n action: () => {\n navigate('board-list')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>airplay</mwc-icon> `,\n name: html` <ox-i18n msgid=\"menu.play-groups\"></ox-i18n> `,\n action: () => {\n navigate('play-list')\n }\n }\n })\n }\n\n if (await hasPrivilege({ name: 'mutation', category: 'scenario', domainOwnerGranted: true })) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>device_hub</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.connection\"></ox-i18n> `,\n action: () => {\n navigate('connection')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>format_list_numbered</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.scenario\"></ox-i18n> `,\n action: () => {\n navigate('scenario')\n }\n }\n })\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>hub</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.integration analysis\"></ox-i18n> (beta)`,\n action: () => {\n navigate('integration-analysis')\n }\n }\n })\n }\n\n auth.on('profile', async ({ credential }) => {\n updateMenuTemplate(getMenuTemplate(credential.owner, await queryActivities()))\n\n if (credential.owner) {\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>device_hub</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.installable-activities\"></ox-i18n> `,\n action: () => {\n navigate('installable-activity-list')\n }\n }\n })\n }\n\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <mwc-icon>extension</mwc-icon> `,\n name: html` <ox-i18n msgid=\"text.api-sandbox\"></ox-i18n> `,\n action: () => {\n navigate('api-swagger')\n }\n }\n })\n\n // store.dispatch({\n // type: ADD_MORENDA,\n // morenda: {\n // icon: html` <mwc-icon>help</mwc-icon> `,\n // name: html` <ox-i18n msgid=\"text.help\"></ox-i18n> `,\n // action: () => {\n // navigate('help')\n // }\n // }\n // })\n\n /* setting app-tools */\n store.dispatch({\n type: APPEND_APP_TOOL,\n tool: {\n name: 'notification-badge',\n template: html`\n <notification-badge\n @click=${e => {\n toggleOverlay('notification', {\n backdrop: true\n })\n }}\n >\n </notification-badge>\n `,\n position: TOOL_POSITION.REAR\n }\n })\n\n appendViewpart({\n name: 'notification',\n viewpart: {\n show: false,\n hovering: 'edge',\n template: html` <notification-list style=\"min-width: 300px;\"></notification-list> `\n },\n position: VIEWPART_POSITION.ASIDEBAR\n })\n\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 20,\n template: html` <notification-setting-let></notification-setting-let> `\n }\n })\n\n store.dispatch({\n type: ADD_SETTING,\n setting: {\n seq: 21,\n template: html` <lite-menu-setting-let></lite-menu-setting-let> `\n }\n })\n })\n}\n"]}
|