mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-22 21:08:47 +00:00
fix(console): migrate from tslint to eslint, project delete from table (#2490)
* es lint * modify tsconfig, auto lint some stuff * lint * lint * lint * lint * html ts lint * lint * lint, tsconfig * fix project delete, state table * eslint config, remove cnslHint directive * mfa selector, info row fixes * lint * fix login policy, granted orgs table state, lint Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
parent
bdf63800f7
commit
b1caef81da
+20
-17
@@ -3,27 +3,30 @@ import { Subscription } from 'rxjs';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-theme-setting',
|
||||
templateUrl: './theme-setting.component.html',
|
||||
styleUrls: ['./theme-setting.component.scss'],
|
||||
selector: 'cnsl-theme-setting',
|
||||
templateUrl: './theme-setting.component.html',
|
||||
styleUrls: ['./theme-setting.component.scss'],
|
||||
})
|
||||
export class ThemeSettingComponent implements OnInit, OnDestroy {
|
||||
public isDarkTheme: boolean = true;
|
||||
private sub: Subscription = new Subscription();
|
||||
constructor(private themeService: ThemeService) {
|
||||
const theme = localStorage.getItem('theme');
|
||||
this.isDarkTheme = theme === 'dark-theme' ? true : theme === 'light-theme' ? false : true;
|
||||
}
|
||||
public isDarkTheme: boolean = true;
|
||||
private sub: Subscription = new Subscription();
|
||||
constructor(private themeService: ThemeService) {
|
||||
const theme = localStorage.getItem('theme');
|
||||
this.isDarkTheme = theme === 'dark-theme' ? true : theme === 'light-theme' ? false : true;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.sub = this.themeService.isDarkTheme.subscribe(d => this.isDarkTheme = d);
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.sub = this.themeService.isDarkTheme.subscribe(d => this.isDarkTheme = d);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
ngOnDestroy(): void {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
||||
public change(checked: boolean): void {
|
||||
this.themeService.setDarkTheme(checked);
|
||||
public change(event: any): void {
|
||||
if (event.target) {
|
||||
const checked = event.target.checked;
|
||||
this.themeService.setDarkTheme(checked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user