Changeset 0.28.0.10 (#182)
This commit is contained in:
@@ -17,8 +17,7 @@
|
||||
const wsId = pageData.WorkspaceID;
|
||||
const wsName = pageData.WorkspaceName || 'Workspace';
|
||||
|
||||
// Wire user menu
|
||||
_initUserMenu();
|
||||
// v0.28.0: UserMenu hydration moved to base.html universal init.
|
||||
|
||||
// Wire workspace selector
|
||||
_initWsSelector(wsId);
|
||||
@@ -32,22 +31,6 @@
|
||||
_mountEditor(wsId, wsName);
|
||||
});
|
||||
|
||||
// ── User Menu ───────────────────────────
|
||||
|
||||
function _initUserMenu() {
|
||||
if (typeof UserMenu === 'undefined') return;
|
||||
const menu = UserMenu.create({ id: '' });
|
||||
UserMenu.primary = menu;
|
||||
menu.setUser(API.user || window.__USER__);
|
||||
menu.bind({
|
||||
onSettings: () => { window.location.href = (window.__BASE__ || '') + '/settings'; },
|
||||
onAdmin: () => { window.location.href = (window.__BASE__ || '') + '/admin'; },
|
||||
onDebug: () => { if (typeof openDebugModal === 'function') openDebugModal(); },
|
||||
onSignout: () => { if (typeof handleLogout === 'function') handleLogout(); },
|
||||
});
|
||||
menu.showAdmin(API.isAdmin);
|
||||
}
|
||||
|
||||
// ── Workspace Selector ──────────────────
|
||||
|
||||
function _initWsSelector(currentWsId) {
|
||||
|
||||
Reference in New Issue
Block a user