loopengine 0.3.94 → 0.3.95
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/web/console-shell.js +5 -14
- package/package.json +1 -1
|
@@ -126,25 +126,16 @@ export const consoleShellScript = `<script>
|
|
|
126
126
|
// Who is signed in and their role (GET /config/settings), read once;
|
|
127
127
|
// pages read it through leShell.settings() rather than asking again.
|
|
128
128
|
var settings = getJson('/config/settings');
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
//
|
|
129
|
+
// An approver or viewer sees the Inbox only, with the rest of the
|
|
130
|
+
// sidebar hidden. The server knows the role from the request and marks
|
|
131
|
+
// the page before it's sent (and those roles can't open any other
|
|
132
|
+
// page), so the lists draw at once instead of waiting on a role check.
|
|
133
133
|
var markedInboxOnly = Boolean(app && app.classList.contains('le-inbox-only'));
|
|
134
134
|
if (markedInboxOnly) {
|
|
135
135
|
var inboxBrand = document.querySelector('.le-brand');
|
|
136
136
|
if (inboxBrand) inboxBrand.setAttribute('href', '/inbox');
|
|
137
137
|
}
|
|
138
|
-
var fullAccess =
|
|
139
|
-
var role = s && s.signIn && s.signIn.role;
|
|
140
|
-
var only = role === 'approver' || role === 'viewer';
|
|
141
|
-
if (only && app) {
|
|
142
|
-
app.classList.add('le-inbox-only');
|
|
143
|
-
var brand = document.querySelector('.le-brand');
|
|
144
|
-
if (brand) brand.setAttribute('href', '/inbox');
|
|
145
|
-
}
|
|
146
|
-
return !only;
|
|
147
|
-
}) : Promise.resolve(true);
|
|
138
|
+
var fullAccess = Promise.resolve(!markedInboxOnly);
|
|
148
139
|
|
|
149
140
|
function tabHref(name, tab) {
|
|
150
141
|
if (tab === 'chat') return '/playground?agent=' + enc(name);
|