ff75c8ce2f
User Profile info, no game before login/register, menu bar --------- Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de> Co-authored-by: shahdlala66 <shahd.lala66@gmail.com> Reviewed-on: #2
35 lines
1.1 KiB
HTML
35 lines
1.1 KiB
HTML
<nav class="navbar">
|
|
<div class="container-fluid">
|
|
<span class="navbar-brand">NowChess</span>
|
|
<div class="ms-auto">
|
|
<div class="d-flex align-items-center gap-2">
|
|
<button type="button" class="app-btn" (click)="toggleTheme()">
|
|
{{ isDarkMode ? 'Light mode' : 'Dark mode' }}
|
|
</button>
|
|
@if (currentUser; as user) {
|
|
<div class="d-flex align-items-center gap-2 user-section">
|
|
<button type="button" class="me-btn" (click)="goToProfile()">
|
|
👤 {{ user.username }}
|
|
</button>
|
|
<button type="button" class="app-btn" (click)="logout()">Logout</button>
|
|
</div>
|
|
} @else {
|
|
<button type="button" class="app-btn" (click)="openLoginDialog()">
|
|
Login
|
|
</button>
|
|
<button type="button" class="app-btn" (click)="openRegisterDialog()">
|
|
Register
|
|
</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
@if (showLoginDialog) {
|
|
<app-login-dialog (onClose)="closeLoginDialog()" (onSuccess)="onLoginSuccess()" />
|
|
}
|
|
|
|
@if (showRegisterDialog) {
|
|
<app-register-dialog (onClose)="closeRegisterDialog()" (onSuccess)="onRegisterSuccess()" />
|
|
} |