refactor: Separate Import-Buttons für Benutzer und Gruppen wurden entfernt, um die Benutzeroberfläche zu vereinfachen.
This commit is contained in:
@@ -41,26 +41,6 @@
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<app-color-mode-bttn></app-color-mode-bttn>
|
||||
<div *ngIf="isLogedIn()" class="d-flex">
|
||||
<button class="btn m-0 p-0" type="button" (click)="importUser()">
|
||||
<img src="../../assets/img/user.svg">
|
||||
</button>
|
||||
<button class="btn m-0 p-0" type="button" (click)="importGroup()" style="stroke: #a9a8ad;">
|
||||
<svg class="bi" width="3em" height="2.5em" viewBox="0 0 488.6 488.6" stroke="#a9a8ad">
|
||||
<path opacity="0.5"
|
||||
d="M480.9,333.2c-27.2-22.3-56.5-37.1-62.4-40c-0.7-0.3-1.1-1-1.1-1.8v-42.3c5.3-3.5,8.8-9.6,8.8-16.5v-43.9
|
||||
c0-21.8-17.7-39.5-39.5-39.5H382h-4.7c-21.8,0-39.5,17.7-39.5,39.5v43.9c0,6.9,3.5,12.9,8.8,16.5v42.3c0,0.3-0.1,0.5-0.1,0.7
|
||||
c8.3,5.7,17,12.1,25.5,19.1c9.9,8.2,15.6,20.2,15.6,33.2v35.3h101v-30.1C488.6,343.3,485.8,337.2,480.9,333.2z" />
|
||||
<path opacity="0.5" d="M142,291.4v-42.3c5.3-3.5,8.8-9.6,8.8-16.5v-43.9c0-21.8-17.7-39.5-39.5-39.5h-4.7h-4.7c-21.8,0-39.5,17.7-39.5,39.5v43.9
|
||||
c0,6.9,3.5,12.9,8.8,16.5v42.3c0,0.7-0.4,1.4-1.1,1.8c-6,2.9-35.3,17.7-62.4,40c-4.9,4-7.7,10.1-7.7,16.4v30.1h101v-35.3
|
||||
c0-12.9,5.7-25,15.6-33.2c8.5-7,17.2-13.4,25.5-19.1C142.1,291.9,142,291.7,142,291.4z" />
|
||||
<path opacity="0.5" d="M360.5,325.1c-31.9-26.2-66.3-43.6-73.4-47.1c-0.8-0.4-1.3-1.2-1.3-2.1v-49.7c6.2-4.2,10.4-11.3,10.4-19.3v-51.6
|
||||
c0-25.6-20.8-46.4-46.4-46.4h-5.5h-5.5c-25.6,0-46.4,20.8-46.4,46.4v51.5c0,8.1,4.1,15.2,10.4,19.3v49.7c0,0.9-0.5,1.7-1.3,2.1
|
||||
c-7,3.4-41.4,20.8-73.4,47.1c-5.8,4.7-9.1,11.8-9.1,19.3v35.3h108.9l10.8-49.3c-21.7-30.3,1.6-31.8,5.7-31.8l0,0l0,0
|
||||
c4.1,0,27.4,1.5,5.7,31.8l10.8,49.3h108.9v-35.3C369.6,336.9,366.3,329.8,360.5,325.1z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<button class="fs-5 btn d-flex align-items-center ms-2 me-0 pe-0" type="button" (click)="auth()">
|
||||
<img fetchpriority="high" src="../../assets/img/login_logo.svg" alt="" style="stroke: #a9a8ad;">
|
||||
{{isLogedIn() ? "Log out" : "Log in"}}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { UserGroupDirImportComponent } from '../components/user-group-dir-import/user-group-dir-import.component';
|
||||
import { GroupDirImportComponent } from '../components/group-dir-import/group-dir-import.component';
|
||||
import { AuthenticationService, IsLogedIn } from '../services/authentication.service';
|
||||
import { LoginComponent } from '../login/login.component';
|
||||
import { RouterModule } from '@angular/router';
|
||||
@@ -40,17 +38,6 @@ export class NavMenuComponent {
|
||||
this.isExpanded = !this.isExpanded;
|
||||
}
|
||||
|
||||
importUser() {
|
||||
const dialogRef = this.dialog.open(UserGroupDirImportComponent, {
|
||||
width: "50vw"
|
||||
});
|
||||
}
|
||||
importGroup() {
|
||||
const dialogRef = this.dialog.open(GroupDirImportComponent, {
|
||||
width: "50vw"
|
||||
});
|
||||
}
|
||||
|
||||
async auth() {
|
||||
const isLoggedIn = await this.authService.isAuthenticated();
|
||||
if (isLoggedIn)
|
||||
|
||||
Reference in New Issue
Block a user