Commit 16bb015f by Ooh-Ao

ssss

parent 24e076ae
......@@ -29,9 +29,9 @@ export class SwitcherComponent {
localStorage.setItem('ynex-menu-mode', type2);
if (localStorage.getItem('ynex-header-mode') == 'light') {
this.elementRef.nativeElement.ownerDocument.documentElement?.removeAttribute('style');
// localStorage.removeItem('ynexlight-background-light');
// this.body = document.querySelector('body');
// this.body?.classList.remove('dark');
localStorage.removeItem('ynexlight-background-light');
this.body = document.querySelector('body');
this.body?.classList.remove('dark');
}
if (localStorage.getItem('ynex-theme-mode') == 'light') {
this.elementRef.nativeElement.ownerDocument.documentElement?.removeAttribute('style');
......@@ -45,14 +45,14 @@ export class SwitcherComponent {
// this.body = document.querySelector('body');
// this.body?.classList.remove('dark');
this.body = document.querySelector('body');
this.body?.classList.remove('dark');
}
}
DirectionsChange(type: string) {
// this.elementRef.nativeElement.ownerDocument.documentElement?.setAttribute('dir', type);
// localStorage.setItem('ynex-dir', type);
this.elementRef.nativeElement.ownerDocument.documentElement?.setAttribute('dir', type);
localStorage.setItem('ynex-dir', type);
const htmlElement =
this.elementRef.nativeElement.ownerDocument.documentElement;
this.renderer.setAttribute(htmlElement, 'dir', type);
......@@ -76,8 +76,8 @@ export class SwitcherComponent {
mainContentElement.click();
}
}, 100);
}else{
this.renderer.setAttribute(htmlElement, 'data-menu-styles', 'dark');
......@@ -111,7 +111,7 @@ export class SwitcherComponent {
localStorage.removeItem('ynex-sidemenu-styles-toggled');
}
SideMenus(type: string, type1: string) {
this.navServices.items.subscribe((items) => {
this.menuItems = items;
......@@ -119,15 +119,15 @@ export class SwitcherComponent {
const htmlElement =
this.elementRef.nativeElement.ownerDocument.documentElement;
this.renderer.setAttribute(htmlElement, 'data-vertical-style', type1);
if(localStorage.getItem('ynex-sidemenu-styles') == 'closed'){
this.renderer.setAttribute(htmlElement, 'data-toggled', type);
}
else if (localStorage.getItem('ynex-sidemenu-styles') == 'closed'){
this.renderer.removeAttribute(htmlElement, 'data-toggled');
}
localStorage.setItem('ynex-sidemenu-styles', type1);
localStorage.setItem('ynex-sidemenu-styles-toggled', type);
this.renderer.setAttribute(htmlElement, 'data-toggled', type);
......@@ -202,7 +202,7 @@ export class SwitcherComponent {
this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--primary', type);
this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--primary-rgb', 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) {
this.elementRef.nativeElement.ownerDocument.documentElement?.style.setProperty('--light', lightBg);
......@@ -253,7 +253,7 @@ export class SwitcherComponent {
// removing data from session storage
// switcher.checkOptions();
// localStorage.removeItem('ynex-primary-mode');
localStorage.removeItem('ynex-primary-mode');
}
//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