Skip to content

Commit e8797b9

Browse files
committed
refactor: rename containers
1 parent 9b3da01 commit e8797b9

File tree

9 files changed

+34
-33
lines changed

9 files changed

+34
-33
lines changed

src/app/containers/full-layout/full-layout.component.html renamed to src/app/containers/default-layout/default-layout.component.html

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</app-header>
5050
<div class="app-body">
5151
<app-sidebar [fixed]="true" [display]="'lg'">
52-
<app-sidebar-nav [navItems]="navItems" [perfectScrollbar]="config"></app-sidebar-nav>
52+
<app-sidebar-nav [navItems]="navItems" [perfectScrollbar] [disabled]="sidebarMinimized"></app-sidebar-nav>
5353
<app-sidebar-minimizer></app-sidebar-minimizer>
5454
</app-sidebar>
5555
<!-- Main content -->
@@ -255,10 +255,9 @@ <h6>Settings</h6>
255255
<div class="aside-options">
256256
<div class="clearfix mt-4">
257257
<small><b>Option 1</b></small>
258-
<label class="switch switch-text switch-pill switch-success switch-sm float-right">
258+
<label class="switch switch-label switch-pill switch-success switch-sm float-right">
259259
<input type="checkbox" class="switch-input" checked>
260-
<span class="switch-label" data-on="On" data-off="Off"></span>
261-
<span class="switch-handle"></span>
260+
<span class="switch-slider" data-checked="On" data-unchecked="Off"></span>
262261
</label>
263262
</div>
264263
<div>
@@ -268,10 +267,9 @@ <h6>Settings</h6>
268267
<div class="aside-options">
269268
<div class="clearfix mt-3">
270269
<small><b>Option 2</b></small>
271-
<label class="switch switch-text switch-pill switch-success switch-sm float-right">
270+
<label class="switch switch-label switch-pill switch-success switch-sm float-right">
272271
<input type="checkbox" class="switch-input">
273-
<span class="switch-label" data-on="On" data-off="Off"></span>
274-
<span class="switch-handle"></span>
272+
<span class="switch-slider" data-checked="On" data-unchecked="Off"></span>
275273
</label>
276274
</div>
277275
<div>
@@ -281,20 +279,19 @@ <h6>Settings</h6>
281279
<div class="aside-options">
282280
<div class="clearfix mt-3">
283281
<small><b>Option 3</b></small>
284-
<label class="switch switch-text switch-pill switch-success switch-sm float-right">
282+
<label class="switch switch-label switch-pill switch-success switch-sm float-right">
285283
<input type="checkbox" class="switch-input">
286-
<span class="switch-label" data-on="On" data-off="Off"></span>
284+
<span class="switch-slider" data-checked="On" data-unchecked="Off"></span>
287285
<span class="switch-handle"></span>
288286
</label>
289287
</div>
290288
</div>
291289
<div class="aside-options">
292290
<div class="clearfix mt-3">
293291
<small><b>Option 4</b></small>
294-
<label class="switch switch-text switch-pill switch-success switch-sm float-right">
292+
<label class="switch switch-label switch-pill switch-success switch-sm float-right">
295293
<input type="checkbox" class="switch-input" checked>
296-
<span class="switch-label" data-on="On" data-off="Off"></span>
297-
<span class="switch-handle"></span>
294+
<span class="switch-slider" data-checked="On" data-unchecked="Off"></span>
298295
</label>
299296
</div>
300297
</div>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Component, Input } from '@angular/core';
2+
import { navItems } from './../../_nav';
3+
4+
@Component({
5+
selector: 'app-dashboard',
6+
templateUrl: './default-layout.component.html'
7+
})
8+
export class DefaultLayoutComponent {
9+
public navItems = navItems;
10+
public sidebarMinimized = true;
11+
private changes: MutationObserver;
12+
public element: HTMLElement = document.body;
13+
constructor() {
14+
15+
this.changes = new MutationObserver((mutations) => {
16+
this.sidebarMinimized = document.body.classList.contains('sidebar-minimized')
17+
});
18+
19+
this.changes.observe(<Element>this.element, {
20+
attributes: true
21+
});
22+
}
23+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './default-layout.component';

src/app/containers/full-layout/full-layout.component.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/containers/full-layout/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/containers/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export * from './full-layout';
2-
export * from './simple-layout';
1+
export * from './default-layout';

src/app/containers/simple-layout/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/containers/simple-layout/simple-layout.component.html

Whitespace-only changes.

src/app/containers/simple-layout/simple-layout.component.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)