feat: add link to admin panel
This commit is contained in:
parent
6a3a6a8d47
commit
c6059a7a60
@ -1,3 +1,4 @@
|
||||
<mat-toolbar style="justify-content: space-between;">
|
||||
<a href="/" style="color: inherit;">Winsomnia</a>
|
||||
<a href="/admin" style="color: inherit; font-size: 14px" *appHasRole="AuthRoles.Admin">Админ панель</a>
|
||||
</mat-toolbar>
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {MatToolbar} from "@angular/material/toolbar";
|
||||
import {MatAnchor, MatButton} from "@angular/material/button";
|
||||
import {HasRoleDirective} from "@/directives/has-role.directive";
|
||||
import {AuthRoles} from "@model/AuthRoles";
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
@ -8,11 +10,13 @@ import {MatAnchor, MatButton} from "@angular/material/button";
|
||||
imports: [
|
||||
MatToolbar,
|
||||
MatButton,
|
||||
MatAnchor
|
||||
MatAnchor,
|
||||
HasRoleDirective
|
||||
],
|
||||
templateUrl: './header.component.html',
|
||||
styleUrl: './header.component.css'
|
||||
})
|
||||
export class HeaderComponent {
|
||||
|
||||
protected readonly AuthRoles = AuthRoles;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user