add sidebar and various component
This commit is contained in:
30
frontend/src/app/components/settings/settings.ts
Normal file
30
frontend/src/app/components/settings/settings.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
templateUrl: './settings.html',
|
||||
styleUrls: ['./settings.css']
|
||||
})
|
||||
export class SettingsComponent {
|
||||
settings = {
|
||||
theme: 'dark',
|
||||
notifications: true,
|
||||
autoRefresh: false,
|
||||
refreshInterval: 30
|
||||
};
|
||||
|
||||
toggleNotifications() {
|
||||
this.settings.notifications = !this.settings.notifications;
|
||||
}
|
||||
|
||||
toggleAutoRefresh() {
|
||||
this.settings.autoRefresh = !this.settings.autoRefresh;
|
||||
}
|
||||
|
||||
changeTheme(theme: string) {
|
||||
this.settings.theme = theme;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user