This commit is contained in:
Bastian Wagner
2026-07-20 09:01:36 +02:00
parent 8cf57d7878
commit e62673ac11
98 changed files with 17372 additions and 80 deletions

View File

@@ -30,7 +30,7 @@ interface NavItem {
@if (auth.user()) {
<ui-icon-button icon="menu" label="Navigation" (pressed)="toggleDrawer()" />
}
<strong class="brand">Business App</strong>
<strong class="brand">HausPilot</strong>
@if (auth.user()) {
<button
class="ui-icon-button notification-button"
@@ -47,7 +47,7 @@ interface NavItem {
</button>
<a class="ui-button ui-button--ghost logout" href="/api/auth/logout">Abmelden</a>
} @else {
<a class="ui-button ui-button--primary logout" href="/api/auth/login">Anmelden</a>
<a class="ui-button ui-button--primary logout" [href]="loginHref()">Anmelden</a>
}
@if (auth.user() && notificationPanelOpen()) {
<app-notification-panel
@@ -93,7 +93,7 @@ interface NavItem {
<section class="login-panel">
<h1>Anmelden</h1>
<p>Bitte melden Sie sich ueber den zentralen Identity Provider an.</p>
<a class="ui-button ui-button--primary ui-button--mobile-full" href="/api/auth/login"
<a class="ui-button ui-button--primary ui-button--mobile-full" [href]="loginHref()"
>Mit OIDC anmelden</a
>
</section>
@@ -243,6 +243,8 @@ export class AppShellComponent {
);
readonly nav: NavItem[] = [
{ label: 'Dashboard', path: '/' },
{ label: 'Projekte', path: '/projekte', permission: 'projects.use' },
{ label: 'Einladungen', path: '/einladungen', permission: 'projects.use' },
{ label: 'Profil', path: '/profil' },
{ label: 'Sicherheit', path: '/account/security' },
{
@@ -273,6 +275,11 @@ export class AppShellComponent {
return !item.permission || this.auth.has(item.permission);
}
loginHref(): string {
const returnTo = this.router.url.startsWith('/einladungen') ? this.router.url : '/';
return `/api/auth/login?returnTo=${encodeURIComponent(returnTo)}`;
}
toggleNotifications(): void {
this.notificationPanelOpen.update((open) => !open);
if (this.notificationPanelOpen()) {