mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
32 lines
641 B
TypeScript
32 lines
641 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { StorageService } from 'src/app/services/storage.service';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class ThemeService {
|
|
|
|
themes = [
|
|
'gov',
|
|
'default',
|
|
'tribunal'
|
|
]
|
|
|
|
currentTheme = 'gov'
|
|
|
|
constructor(private storageservice: StorageService) { }
|
|
|
|
setTheme(theme: 'gov' | 'default' | 'tribunal') {
|
|
|
|
document.body.classList.remove("gov");
|
|
document.body.classList.remove("default");
|
|
document.body.classList.remove("tribunal");
|
|
document.body.classList.add(theme);
|
|
this.currentTheme = theme
|
|
|
|
this.storageservice.store('theme',theme);
|
|
|
|
}
|
|
|
|
}
|