mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 12:35:07 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6b368d2e79
|
@ -21,6 +21,12 @@
|
||||||
<mat-radio-button class="mr-8 mb-8" value="none">None</mat-radio-button>
|
<mat-radio-button class="mr-8 mb-8" value="none">None</mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
|
|
||||||
|
<h3>Navigation Fold (for vertical navigation):</h3>
|
||||||
|
<mat-slide-toggle [(ngModel)]="fuseSettings.layout.navigationFolded"
|
||||||
|
(change)="onSettingsChange()">
|
||||||
|
Folded
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
<h3 class="mt-24">Toolbar:</h3>
|
<h3 class="mt-24">Toolbar:</h3>
|
||||||
<mat-radio-group [(ngModel)]="fuseSettings.layout.toolbar" (ngModelChange)="onSettingsChange()"
|
<mat-radio-group [(ngModel)]="fuseSettings.layout.toolbar" (ngModelChange)="onSettingsChange()"
|
||||||
fxLayout="column" fxLayout.gt-xs="row" fxLayoutAlign="start start" fxLayoutWrap>
|
fxLayout="column" fxLayout.gt-xs="row" fxLayoutAlign="start start" fxLayoutWrap>
|
||||||
|
|
|
@ -23,6 +23,7 @@ export class FuseConfigService
|
||||||
this.defaultSettings = {
|
this.defaultSettings = {
|
||||||
layout : {
|
layout : {
|
||||||
navigation : 'left', // 'right', 'left', 'top', 'none'
|
navigation : 'left', // 'right', 'left', 'top', 'none'
|
||||||
|
navigationFolded: false, // true, false
|
||||||
toolbar : 'below', // 'above', 'below', 'none'
|
toolbar : 'below', // 'above', 'below', 'none'
|
||||||
footer : 'below', // 'above', 'below', 'none'
|
footer : 'below', // 'above', 'below', 'none'
|
||||||
mode : 'fullwidth' // 'boxed', 'fullwidth'
|
mode : 'fullwidth' // 'boxed', 'fullwidth'
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
|
|
||||||
<!-- NAVBAR: Left -->
|
<!-- NAVBAR: Left -->
|
||||||
<fuse-navbar-vertical [folded]="false"
|
<fuse-navbar-vertical [folded]="fuseSettings.layout.navigationFolded"
|
||||||
class="left-navbar"
|
class="left-navbar"
|
||||||
[class]="fuseSettings.colorClasses.navbar"
|
[class]="fuseSettings.colorClasses.navbar"
|
||||||
*ngIf="fuseSettings.layout.navigation === 'left' || fuseSettings.layout.navigation === 'top'">
|
*ngIf="fuseSettings.layout.navigation === 'left' || fuseSettings.layout.navigation === 'top'">
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- NAVBAR: Right -->
|
<!-- NAVBAR: Right -->
|
||||||
<fuse-navbar-vertical [folded]="false"
|
<fuse-navbar-vertical [folded]="fuseSettings.layout.navigationFolded"
|
||||||
class="right-navbar"
|
class="right-navbar"
|
||||||
[class]="fuseSettings.colorClasses.navbar"
|
[class]="fuseSettings.colorClasses.navbar"
|
||||||
*ngIf="fuseSettings.layout.navigation === 'right'">
|
*ngIf="fuseSettings.layout.navigation === 'right'">
|
||||||
|
|
|
@ -18,13 +18,34 @@ import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/anim
|
||||||
export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
|
export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
|
||||||
{
|
{
|
||||||
private _backdropElement: HTMLElement | null = null;
|
private _backdropElement: HTMLElement | null = null;
|
||||||
|
private _folded = false;
|
||||||
|
|
||||||
@HostBinding('class.close') isClosed: boolean;
|
@HostBinding('class.close') isClosed: boolean;
|
||||||
@HostBinding('class.folded') isFoldedActive: boolean;
|
@HostBinding('class.folded') isFoldedActive: boolean;
|
||||||
@HostBinding('class.folded-open') isFoldedOpen: boolean;
|
@HostBinding('class.folded-open') isFoldedOpen: boolean;
|
||||||
@HostBinding('class.initialized') initialized: boolean;
|
@HostBinding('class.initialized') initialized: boolean;
|
||||||
@Input('folded') foldedByDefault = false;
|
|
||||||
@ViewChild(FusePerfectScrollbarDirective) fusePerfectScrollbarDirective;
|
@ViewChild(FusePerfectScrollbarDirective) fusePerfectScrollbarDirective;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
set folded(value: boolean)
|
||||||
|
{
|
||||||
|
this._folded = value;
|
||||||
|
|
||||||
|
if ( this._folded )
|
||||||
|
{
|
||||||
|
this.activateFolded();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.deActivateFolded();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get folded(): boolean
|
||||||
|
{
|
||||||
|
return this._folded;
|
||||||
|
}
|
||||||
|
|
||||||
matchMediaWatcher: Subscription;
|
matchMediaWatcher: Subscription;
|
||||||
navigationServiceWatcher: Subscription;
|
navigationServiceWatcher: Subscription;
|
||||||
fusePerfectScrollbarUpdateTimeout;
|
fusePerfectScrollbarUpdateTimeout;
|
||||||
|
@ -88,7 +109,7 @@ export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
|
||||||
ngOnInit()
|
ngOnInit()
|
||||||
{
|
{
|
||||||
this.isClosed = false;
|
this.isClosed = false;
|
||||||
this.isFoldedActive = this.foldedByDefault;
|
this.isFoldedActive = this._folded;
|
||||||
this.isFoldedOpen = false;
|
this.isFoldedOpen = false;
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
this.updateCssClasses();
|
this.updateCssClasses();
|
||||||
|
@ -104,7 +125,7 @@ export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( !this.foldedByDefault )
|
if ( !this._folded )
|
||||||
{
|
{
|
||||||
this.deActivateFolded();
|
this.deActivateFolded();
|
||||||
}
|
}
|
||||||
|
@ -124,6 +145,11 @@ export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
|
||||||
|
|
||||||
openBar()
|
openBar()
|
||||||
{
|
{
|
||||||
|
if ( !this.isClosed )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.isClosed = false;
|
this.isClosed = false;
|
||||||
this.updateCssClasses();
|
this.updateCssClasses();
|
||||||
if ( this.media.isActive('lt-lg') )
|
if ( this.media.isActive('lt-lg') )
|
||||||
|
@ -134,6 +160,11 @@ export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
|
||||||
|
|
||||||
closeBar()
|
closeBar()
|
||||||
{
|
{
|
||||||
|
if ( this.isClosed )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.isClosed = true;
|
this.isClosed = true;
|
||||||
this.updateCssClasses();
|
this.updateCssClasses();
|
||||||
this._detachBackdrop();
|
this._detachBackdrop();
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
|
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
|
||||||
|
|
||||||
<button mat-button class="toggle-button-navbar mat-icon-button"
|
<button mat-button class="toggle-button-navbar mat-icon-button"
|
||||||
fuseNavbarVertical="openBar" fxHide.gt-md>
|
fuseNavbarVertical="toggleBar" fxHide.gt-md>
|
||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user