Commit 16bb015f by Ooh-Ao

ssss

parent 24e076ae
...@@ -29,9 +29,9 @@ export class SwitcherComponent { ...@@ -29,9 +29,9 @@ export class SwitcherComponent {
localStorage.setItem('ynex-menu-mode', type2); localStorage.setItem('ynex-menu-mode', type2);
if (localStorage.getItem('ynex-header-mode') == 'light') { if (localStorage.getItem('ynex-header-mode') == 'light') {
this.elementRef.nativeElement.ownerDocument.documentElement?.removeAttribute('style'); this.elementRef.nativeElement.ownerDocument.documentElement?.removeAttribute('style');
// localStorage.removeItem('ynexlight-background-light'); localStorage.removeItem('ynexlight-background-light');
// this.body = document.querySelector('body'); this.body = document.querySelector('body');
// this.body?.classList.remove('dark'); this.body?.classList.remove('dark');
} }
if (localStorage.getItem('ynex-theme-mode') == 'light') { if (localStorage.getItem('ynex-theme-mode') == 'light') {
this.elementRef.nativeElement.ownerDocument.documentElement?.removeAttribute('style'); this.elementRef.nativeElement.ownerDocument.documentElement?.removeAttribute('style');
...@@ -45,14 +45,14 @@ export class SwitcherComponent { ...@@ -45,14 +45,14 @@ export class SwitcherComponent {
// this.body = document.querySelector('body'); this.body = document.querySelector('body');
// this.body?.classList.remove('dark'); this.body?.classList.remove('dark');
} }
} }
DirectionsChange(type: string) { DirectionsChange(type: string) {
// this.elementRef.nativeElement.ownerDocument.documentElement?.setAttribute('dir', type); this.elementRef.nativeElement.ownerDocument.documentElement?.setAttribute('dir', type);
// localStorage.setItem('ynex-dir', type); localStorage.setItem('ynex-dir', type);
const htmlElement = const htmlElement =
this.elementRef.nativeElement.ownerDocument.documentElement; this.elementRef.nativeElement.ownerDocument.documentElement;
this.renderer.setAttribute(htmlElement, 'dir', type); this.renderer.setAttribute(htmlElement, 'dir', type);
...@@ -202,7 +202,7 @@ export class SwitcherComponent { ...@@ -202,7 +202,7 @@ export class SwitcherComponent {
this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--primary', type); this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--primary', type);
this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--primary-rgb', type); this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--primary-rgb', type);
localStorage.setItem('ynex-primary-mode', type); localStorage.setItem('ynex-primary-mode', type);
// localStorage.removeItem('ynexlight-primary-color'); localStorage.removeItem('ynexlight-primary-color');
} }
background(lightBg:string,inputBorder:string,bodyBg: string, darkBg: string, type: string, type1: string) { background(lightBg:string,inputBorder:string,bodyBg: string, darkBg: string, type: string, type1: string) {
this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--light', lightBg); this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--light', lightBg);
...@@ -253,7 +253,7 @@ export class SwitcherComponent { ...@@ -253,7 +253,7 @@ export class SwitcherComponent {
// removing data from session storage // removing data from session storage
// switcher.checkOptions(); // switcher.checkOptions();
// localStorage.removeItem('ynex-primary-mode'); localStorage.removeItem('ynex-primary-mode');
} }
//background theme change //background theme change
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment