Added theme button in top bar.

This commit is contained in:
Tom
2025-04-01 21:29:05 +00:00
parent d69fc68ec1
commit e053529d49
3 changed files with 5 additions and 3 deletions

View File

@ -27,4 +27,5 @@
} }
</div> </div>
} }
<theme />
</mat-toolbar> </mat-toolbar>

View File

@ -9,6 +9,7 @@ import { ImpersonationComponent } from '../../auth/impersonation/impersonation.c
import { HermesClientService } from '../../hermes-client.service'; import { HermesClientService } from '../../hermes-client.service';
import EventService from '../../shared/services/EventService'; import EventService from '../../shared/services/EventService';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { ThemeComponent } from "../../theme/theme.component";
@Component({ @Component({
selector: 'topbar', selector: 'topbar',
@ -19,7 +20,8 @@ import { Subscription } from 'rxjs';
MatButtonModule, MatButtonModule,
MatIconModule, MatIconModule,
MatToolbarModule, MatToolbarModule,
], ThemeComponent,
],
providers: [AuthVisitorGuard], providers: [AuthVisitorGuard],
templateUrl: './topbar.component.html', templateUrl: './topbar.component.html',
styleUrl: './topbar.component.scss' styleUrl: './topbar.component.scss'

View File

@ -1,6 +1,5 @@
<button mat-icon-button <button mat-icon-button
class="refresh"
aria-label="Change theme" aria-label="Change theme"
(click)="toggle()"> (click)="toggle()">
<mat-icon>refresh</mat-icon> <mat-icon>{{isLightMode ? 'dark_mode' : 'light_mode'}}</mat-icon>
</button> </button>