Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BookingMyHrManagement
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chanachai
BookingMyHrManagement
Commits
16bb015f
Commit
16bb015f
authored
Mar 17, 2025
by
Ooh-Ao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ssss
parent
24e076ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
switcher.component.ts
.../src/app/shared/components/switcher/switcher.component.ts
+9
-9
No files found.
Web-Manage/src/app/shared/components/switcher/switcher.component.ts
View file @
16bb015f
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment