Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5444661

Browse files
committedOct 12, 2022
refactoring layout
1 parent 49ce259 commit 5444661

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed
 

‎src/app/shared/themes/components/header/header.component.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ export class HeaderComponent implements OnInit {
5959

6060
public loading$: Observable<boolean> = this.store.select(selectLoading);
6161

62-
public logout() {
63-
this.store.dispatch(logoutAction());
64-
}
65-
6662
get openCloseTrigger() {
6763
return this.mobileMenuOpen ? 'open' : 'closed';
6864
}
6965

66+
logout(): void {
67+
this.store.dispatch(logoutAction());
68+
}
69+
7070
toggleMobileMenu(): void {
7171
this.showDialog = false;
7272
this.mobileMenuOpen = !this.mobileMenuOpen;
@@ -104,9 +104,11 @@ export class HeaderComponent implements OnInit {
104104
this.currentTheme = window.localStorage.getItem('theme')!;
105105
}
106106

107-
updateTheme(theme: string) {
107+
updateTheme(theme: string): void {
108108
document.documentElement.setAttribute('data-theme', theme);
109109
window.localStorage.setItem('theme', theme);
110+
110111
this.currentTheme = theme;
112+
this.showDialog = false;
111113
}
112114
}

‎src/app/shared/themes/components/sidebar/sidebar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="relative flex items-center px-6 py-8 shrink-0 md:hidden">
44
<logo-svg class="h-auto w-36 text-slate-900 dark:text-white"></logo-svg>
55
</div>
6-
<nav class="flex flex-col h-full pt-4 pb-8 space-y-8" aria-label="Sidebar">
6+
<nav class="flex flex-col h-full pt-4 pb-8 space-y-8 lg:pt-10" aria-label="Sidebar">
77
<div *ngFor="let menu of menus">
88
<h5 class="px-6 font-mono text-xs font-semibold leading-5 tracking-widest uppercase text-slate-400 sm:px-8 dark:text-slate-300">{{ menu.group }}</h5>
99
<div class="mt-3 space-y-1">

0 commit comments

Comments
 (0)
Please sign in to comment.