mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'themesDeveloper' of bitbucket.org:equilibriumito/gabinete-digital into themesDeveloper
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -11,14 +12,27 @@ export class BackgroundService {
|
||||
funx: Function
|
||||
}[] = []
|
||||
|
||||
constructor() { }
|
||||
constructor(
|
||||
private themeservice: ThemeService
|
||||
) { }
|
||||
|
||||
online() {
|
||||
document.body.style.setProperty(`--color`, "#0782C9");
|
||||
document.body.style.setProperty(`--color2`, "#45BAFF");
|
||||
document.body.style.setProperty(`--color3`, "#0782C9");
|
||||
document.body.style.setProperty(`--color4`, "#0782c9f0");
|
||||
document.body.style.setProperty(`--color5`, "#45BAFF");
|
||||
if (this.themeservice.currentTheme == 'gov') {
|
||||
|
||||
document.body.style.setProperty(`--color`, "#d9d9d9");
|
||||
document.body.style.setProperty(`--color2`, "#f0f0f0");
|
||||
document.body.style.setProperty(`--color3`, "#d9d9d9");
|
||||
document.body.style.setProperty(`--color4`, "#d9d9d9ee");
|
||||
document.body.style.setProperty(`--color5`, "#ececec");
|
||||
|
||||
} else {
|
||||
document.body.style.setProperty(`--color`, "#0782C9");
|
||||
document.body.style.setProperty(`--color2`, "#45BAFF");
|
||||
document.body.style.setProperty(`--color3`, "#0782C9");
|
||||
document.body.style.setProperty(`--color4`, "#0782c9f0");
|
||||
document.body.style.setProperty(`--color5`, "#45BAFF");
|
||||
}
|
||||
|
||||
this.callBacks.forEach((e) => {
|
||||
if (e.type == 'Online') {
|
||||
e.funx()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -12,7 +13,7 @@ export class ThemeService {
|
||||
|
||||
currentTheme = 'gov'
|
||||
|
||||
constructor() { }
|
||||
constructor(private storageservice: StorageService) { }
|
||||
|
||||
setTheme(theme: 'gov' | 'default') {
|
||||
|
||||
@@ -20,7 +21,8 @@ export class ThemeService {
|
||||
document.body.classList.remove("default");
|
||||
document.body.classList.add(theme);
|
||||
this.currentTheme = theme
|
||||
console.log('Current theme', theme)
|
||||
console.log('Current theme', theme);
|
||||
this.storageservice.store('theme',theme);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user