From e946436a42559ed97c03c7016925a8684c3a8212 Mon Sep 17 00:00:00 2001 From: Gato Date: Sun, 24 May 2026 07:16:19 +0200 Subject: [PATCH] Login / Logout --- src/app/auth/keycloak.service.ts | 2 -- src/app/menu/menu.css | 29 +++++++++++++++++++++++------ src/app/menu/menu.html | 31 ++++++++++++++++--------------- 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/src/app/auth/keycloak.service.ts b/src/app/auth/keycloak.service.ts index 9517750..27d4294 100644 --- a/src/app/auth/keycloak.service.ts +++ b/src/app/auth/keycloak.service.ts @@ -15,8 +15,6 @@ export class KeycloakService { async init(): Promise { try { const authenticated = await this.keycloak.init({ - onLoad: 'check-sso', - silentCheckSsoRedirectUri: `${window.location.origin}/assets/silent-check-sso.html`, pkceMethod: 'S256', }); this.isAuthenticated.set(authenticated); diff --git a/src/app/menu/menu.css b/src/app/menu/menu.css index e6e172a..788daec 100644 --- a/src/app/menu/menu.css +++ b/src/app/menu/menu.css @@ -34,6 +34,11 @@ letter-spacing: -0.02em; } +.sidebar-version { + font-size: 0.72rem; + color: #9ca3af; +} + .sidebar-nav { display: flex; flex-direction: column; @@ -64,6 +69,24 @@ font-weight: 600; } +.sidebar-login { + margin-top: auto; + width: 100%; + padding: 0.5rem; + font-size: 0.875rem; + font-weight: 600; + color: #ffffff; + background: #2563eb; + border: none; + border-radius: 0.5rem; + cursor: pointer; + transition: background 0.1s; +} + +.sidebar-login:hover { + background: #1d4ed8; +} + .sidebar-user { display: flex; flex-direction: column; @@ -101,9 +124,3 @@ border-color: #fca5a5; } -.sidebar-footer { - padding: 0 0.5rem; - font-size: 0.72rem; - color: #9ca3af; - text-align: center; -} diff --git a/src/app/menu/menu.html b/src/app/menu/menu.html index 84b5e77..703fa86 100644 --- a/src/app/menu/menu.html +++ b/src/app/menu/menu.html @@ -25,27 +25,28 @@ Bonsai + v{{ version }} - - @if (keycloak.isAuthenticated()) { + + + } @else { + } - -