mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -13,7 +13,8 @@ export class ThemeService {
|
||||
'doneIt'
|
||||
]
|
||||
|
||||
currentTheme: 'gov' | 'default' | 'doneIt' = 'gov'
|
||||
private defaultTheme: any = 'doneIt'
|
||||
currentTheme: 'gov' | 'default' | 'doneIt' = this.defaultTheme
|
||||
keyName: string
|
||||
|
||||
constructor(
|
||||
@@ -22,19 +23,18 @@ export class ThemeService {
|
||||
|
||||
this.keyName = (SHA1(this.constructor.name)).toString()
|
||||
let restore = localstoreService.get(this.keyName, {
|
||||
theme: "gov"
|
||||
theme: this.defaultTheme
|
||||
})
|
||||
|
||||
this.setTheme(restore.theme)
|
||||
|
||||
}
|
||||
|
||||
setTheme(theme: 'gov' | 'default') {
|
||||
setTheme(theme: 'gov' | 'default' | 'doneIt') {
|
||||
|
||||
if(this.themes.includes(theme)) {
|
||||
document.body.classList.remove("gov");
|
||||
document.body.classList.remove("default");
|
||||
document.body.classList.remove("tribunal");
|
||||
document.body.classList.remove("doneIt");
|
||||
|
||||
document.body.classList.add(theme);
|
||||
|
||||
Reference in New Issue
Block a user