asdasd
This commit is contained in:
@@ -1420,6 +1420,52 @@ h1 {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.taskbar--public {
|
||||
justify-content: flex-end;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.taskbar-public-spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.public-login-tab {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
min-width: 180px;
|
||||
padding: 12px 18px 13px;
|
||||
border: 0;
|
||||
border-radius: 18px 18px 0 0;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
|
||||
color: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
.public-login-tab:hover {
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12));
|
||||
}
|
||||
|
||||
.public-login-tab:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.public-login-tab-kicker {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: rgba(248, 250, 252, 0.74);
|
||||
}
|
||||
|
||||
.public-login-tab strong {
|
||||
font-size: 15px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.tray-avatar {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -37,6 +37,7 @@ if (payloadNode) {
|
||||
const startMenuUserName = document.getElementById('start-menu-user-name');
|
||||
const startMenuUserAvatar = document.getElementById('start-menu-user-avatar');
|
||||
const startMenuSessionAction = document.getElementById('start-menu-session-action');
|
||||
const publicLoginButton = document.getElementById('public-login-tab');
|
||||
const accountMenu = document.getElementById('tray-account-menu');
|
||||
const fxTrayMenu = document.getElementById('tray-fx-menu');
|
||||
const fxTrayStatusNode = document.getElementById('tray-fx-status');
|
||||
@@ -50,6 +51,7 @@ if (payloadNode) {
|
||||
const activeSkin = payload.meta.active_skin;
|
||||
const skinProfile = payload.meta.skin_profile || {};
|
||||
const settingsApi = payload.desktop.settings_api || '';
|
||||
const loginUrl = typeof payload.desktop?.login?.login_url === 'string' ? payload.desktop.login.login_url : '';
|
||||
const shellApps = Array.isArray(payload.shell?.apps) ? payload.shell.apps : [];
|
||||
const debugShellApp = (payload.shell && typeof payload.shell.debug_app === 'object' && payload.shell.debug_app)
|
||||
|| shellApps.find((app) => app && app.app_id === 'desktop-debug')
|
||||
@@ -2148,7 +2150,9 @@ if (payloadNode) {
|
||||
|
||||
if (action === 'login') {
|
||||
event.preventDefault();
|
||||
window.location.href = '/auth/keycloak';
|
||||
if (loginUrl) {
|
||||
window.location.href = loginUrl;
|
||||
}
|
||||
setAccountMenuOpen(false);
|
||||
}
|
||||
});
|
||||
@@ -2165,10 +2169,19 @@ if (payloadNode) {
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
window.location.href = '/auth/keycloak';
|
||||
if (loginUrl) {
|
||||
window.location.href = loginUrl;
|
||||
}
|
||||
closeStartMenu();
|
||||
});
|
||||
|
||||
publicLoginButton?.addEventListener('click', () => {
|
||||
const targetUrl = publicLoginButton.getAttribute('data-login-url') || loginUrl;
|
||||
if (targetUrl) {
|
||||
window.location.href = targetUrl;
|
||||
}
|
||||
});
|
||||
|
||||
startMenuFunctions?.addEventListener('click', (event) => {
|
||||
const target = event.target instanceof Element ? event.target.closest('[data-function-id]') : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user