Merge branch 'dev' into feat/add_site_news
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -15,45 +15,51 @@
|
||||
</mat-drawer>
|
||||
}
|
||||
<mat-drawer-content class="content-shell">
|
||||
<mat-toolbar class="main">
|
||||
<div class="topbar-left">
|
||||
@if (
|
||||
mediaQuery.matches && (credentialService.authenticated | async)
|
||||
) {
|
||||
<button
|
||||
mat-icon-button
|
||||
(click)="toggle()"
|
||||
matTooltip="Navigation">
|
||||
<mat-icon>menu</mat-icon>
|
||||
@if (credentialService.authenticated | async) {
|
||||
<mat-toolbar class="main">
|
||||
<div class="topbar-left">
|
||||
@if (mediaQuery.matches) {
|
||||
<button
|
||||
mat-icon-button
|
||||
(click)="toggle()"
|
||||
matTooltip="Navigation">
|
||||
<mat-icon>menu</mat-icon>
|
||||
</button>
|
||||
}
|
||||
<button (click)="navigateBack()" class="back-link" type="button">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
<span>Zurück</span>
|
||||
</button>
|
||||
}
|
||||
<button (click)="navigateBack()" class="back-link" type="button">
|
||||
<mat-icon>arrow_back</mat-icon>
|
||||
<span>Zurück zur Suche</span>
|
||||
</button>
|
||||
</div>
|
||||
<app-searchbar />
|
||||
<div class="topbar-actions">
|
||||
<ng-content select="[menu]"></ng-content>
|
||||
</div>
|
||||
</mat-toolbar>
|
||||
</div>
|
||||
<app-searchbar />
|
||||
<div class="topbar-actions">
|
||||
<ng-content select="[menu]"></ng-content>
|
||||
</div>
|
||||
</mat-toolbar>
|
||||
}
|
||||
|
||||
<main class="content">
|
||||
@if (resolverState.isResolvingFromOutside('/persons')) {
|
||||
<app-loading
|
||||
text="Personenliste wird geladen..."
|
||||
icon="group"
|
||||
[size]="200"
|
||||
[diameter]="200" />
|
||||
} @else if (resolverState.isResolvingFromOutside('/person/')) {
|
||||
<app-loading
|
||||
text="Personendaten werden geladen..."
|
||||
icon="person"
|
||||
[size]="200"
|
||||
[diameter]="200" />
|
||||
} @else {
|
||||
<ng-content></ng-content>
|
||||
}
|
||||
<div class="main-content-body">
|
||||
@if (resolverState.isResolvingFromOutside('/persons')) {
|
||||
<app-loading
|
||||
text="Personenliste wird geladen..."
|
||||
icon="group"
|
||||
[size]="200"
|
||||
[diameter]="200" />
|
||||
} @else if (resolverState.isResolvingFromOutside('/person/')) {
|
||||
<app-loading
|
||||
text="Personendaten werden geladen..."
|
||||
icon="person"
|
||||
[size]="200"
|
||||
[diameter]="200" />
|
||||
} @else {
|
||||
<ng-content></ng-content>
|
||||
}
|
||||
</div>
|
||||
|
||||
<footer class="footer-container">
|
||||
<div class="footer">Networked Embedded Systems 2026</div>
|
||||
</footer>
|
||||
</main>
|
||||
</mat-drawer-content>
|
||||
</mat-drawer-container>
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
}
|
||||
|
||||
.content-shell {
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: var(--sg-background);
|
||||
}
|
||||
|
||||
@@ -34,10 +37,9 @@ mat-toolbar.main {
|
||||
gap: 24px;
|
||||
height: 76px;
|
||||
padding: 0 32px;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
background: var(--sg-surface-soft);
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
color: var(--sg-text);
|
||||
backdrop-filter: blur(16px);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@@ -82,10 +84,30 @@ mat-toolbar.main {
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: calc(100svh - 76px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background: var(--sg-background);
|
||||
}
|
||||
|
||||
.main-content-body {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.footer-container {
|
||||
flex-shrink: 0;
|
||||
padding: 12px 32px;
|
||||
background: var(--sg-surface-soft);
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 12px;
|
||||
color: var(--sg-text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
mat-toolbar.main {
|
||||
grid-template-columns: auto 1fr auto;
|
||||
@@ -115,7 +137,7 @@ mat-toolbar.main {
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: calc(100svh - 124px);
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
.search-wrapper {
|
||||
|
||||
@@ -37,21 +37,19 @@
|
||||
</div>
|
||||
|
||||
<div class="account-card">
|
||||
<div class="avatar">M</div>
|
||||
<div class="avatar">{{ (credentialService.login | async)?.charAt(0) }}</div>
|
||||
<div>
|
||||
<strong>{{
|
||||
(credentialService.login | async) || 'Max Mustermann'
|
||||
}}</strong>
|
||||
<strong>{{ credentialService.organizationName | async }}</strong>
|
||||
<span>Startup Coach</span>
|
||||
</div>
|
||||
<mat-icon>expand_more</mat-icon>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-actions">
|
||||
<button
|
||||
class="utility-link"
|
||||
type="button"
|
||||
(click)="credentialService.logoutAcount()">
|
||||
<button class="utility-link" type="button" (click)="onLogout()">
|
||||
<mat-icon>logout</mat-icon>
|
||||
<span>Abmelden</span>
|
||||
</button>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Component, computed } from '@angular/core';
|
||||
import { Component, computed, inject } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { Router, RouterLink, RouterLinkActive } from '@angular/router';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { CredentialService } from '../../services/credential.service';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ConfirmationDialogComponent } from '../confirmation-dialog/confirmation-dialog.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-menu',
|
||||
@@ -32,7 +34,9 @@ export class AppMenuComponent {
|
||||
label: 'Personen',
|
||||
icon: 'groups',
|
||||
route: '/persons',
|
||||
queryParams: { institutionName: 'University of Duisburg-Essen' },
|
||||
queryParams: {
|
||||
institutionName: this.credentialService.organizationName.value,
|
||||
},
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
@@ -49,4 +53,21 @@ export class AppMenuComponent {
|
||||
) {}
|
||||
|
||||
isNavigating = computed(() => !!this.router.currentNavigation());
|
||||
private readonly dialog = inject(MatDialog);
|
||||
|
||||
onLogout() {
|
||||
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
data: {
|
||||
title: 'Abmelden',
|
||||
message: 'Möchtest Du Dich wirklich abmelden?',
|
||||
confirmText: 'Abmelden',
|
||||
cancelText: 'Abbrechen',
|
||||
},
|
||||
});
|
||||
|
||||
dialogRef.componentInstance.confirmDelete.subscribe(() => {
|
||||
this.credentialService.logoutAcount();
|
||||
this.router.navigate(['/login']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
height: 44px;
|
||||
align-self: center;
|
||||
padding: 0 18px;
|
||||
background: var(--sg-surface-muted);
|
||||
background: white;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: var(--sg-text-soft);
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<h3 mat-dialog-title>Daten löschen</h3>
|
||||
<mat-dialog-content
|
||||
>Bist Du sicher, dass Du die Daten löschen möchtest? Diesen Vorgang kannst Du
|
||||
nicht mehr rückgängig machen.</mat-dialog-content
|
||||
>
|
||||
<h3 mat-dialog-title>{{ data.title }}</h3>
|
||||
<mat-dialog-content>{{ data.message }}</mat-dialog-content>
|
||||
|
||||
<mat-dialog-actions class="action">
|
||||
<button mat-flat-button class="secondary-button" (click)="onCancelClick()">
|
||||
Abbrechen
|
||||
{{ data.cancelText }}
|
||||
</button>
|
||||
<button mat-flat-button class="primary-button" (click)="onConfirmClick()">
|
||||
Löschen
|
||||
{{ data.confirmText }}
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
@@ -1,18 +1,31 @@
|
||||
import { Component, EventEmitter } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
EventEmitter,
|
||||
inject,
|
||||
Inject,
|
||||
Optional,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MatDialogActions,
|
||||
MatDialogClose,
|
||||
MatDialogTitle,
|
||||
MatDialogContent,
|
||||
MAT_DIALOG_DATA,
|
||||
} from '@angular/material/dialog';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
export interface ConfirmationData {
|
||||
title: string;
|
||||
message: string;
|
||||
confirmText: string;
|
||||
cancelText: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-confirmation-dialog',
|
||||
imports: [
|
||||
MatDialogActions,
|
||||
MatDialogClose,
|
||||
MatDialogContent,
|
||||
MatDialogTitle,
|
||||
MatButtonModule,
|
||||
@@ -24,7 +37,18 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
export class ConfirmationDialogComponent {
|
||||
confirmDelete = new EventEmitter<void>();
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<ConfirmationDialogComponent>) {}
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<ConfirmationDialogComponent>,
|
||||
@Optional() @Inject(MAT_DIALOG_DATA) public data: ConfirmationData,
|
||||
) {
|
||||
this.data = data || {
|
||||
title: 'Daten löschen',
|
||||
message:
|
||||
'Bist Du sicher, dass Du die Daten löschen möchtest? Diesen Vorgang kannst Du nicht mehr rückgängig machen.',
|
||||
confirmText: 'Löschen',
|
||||
cancelText: 'Abbrechen',
|
||||
};
|
||||
}
|
||||
|
||||
onCancelClick(): void {
|
||||
this.dialogRef.close();
|
||||
|
||||
Reference in New Issue
Block a user