mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2026-04-19 15:29:08 +00:00
Compare commits
34 Commits
v6.2.0-ske
...
v6.2.4-ske
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b08ab47715 | ||
|
|
798e2632bc | ||
|
|
19c960cc4c | ||
|
|
8dfc3e854b | ||
|
|
0ccb4211c5 | ||
|
|
04b80ca168 | ||
|
|
54451bb19e | ||
|
|
5e98d986e2 | ||
|
|
293192557f | ||
|
|
d61549d9e6 | ||
|
|
b2ceb02709 | ||
|
|
d25ce3601a | ||
|
|
ffbd000fe2 | ||
|
|
b6ebd2b839 | ||
|
|
4d4d52ba05 | ||
|
|
251732f221 | ||
|
|
4642b730cb | ||
|
|
0982d5369b | ||
|
|
1c34a65034 | ||
|
|
b8803a055f | ||
|
|
6b8cd41d5e | ||
|
|
fe7fdf0a00 | ||
|
|
2c7ef4de00 | ||
|
|
adc93d5d40 | ||
|
|
77f6062a55 | ||
|
|
fdb572fadd | ||
|
|
cef9e8a9c0 | ||
|
|
2f0d1e406f | ||
|
|
528c3f95e7 | ||
|
|
f395046945 | ||
|
|
b099022f5a | ||
|
|
25a6ca2684 | ||
|
|
0cd5d613e0 | ||
|
|
f45ad11861 |
690
package-lock.json
generated
690
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fuse",
|
"name": "fuse",
|
||||||
"version": "6.2.0",
|
"version": "6.2.4",
|
||||||
"license": "https://themeforest.net/licenses/terms/regular",
|
"license": "https://themeforest.net/licenses/terms/regular",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
@@ -19,19 +19,19 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@agm/core": "1.0.0-beta.3",
|
"@agm/core": "1.0.0-beta.3",
|
||||||
"@angular/animations": "6.0.7",
|
"@angular/animations": "6.0.9",
|
||||||
"@angular/cdk": "6.3.3",
|
"@angular/cdk": "6.3.3",
|
||||||
"@angular/common": "6.0.7",
|
"@angular/common": "6.0.9",
|
||||||
"@angular/compiler": "6.0.7",
|
"@angular/compiler": "6.0.9",
|
||||||
"@angular/core": "6.0.7",
|
"@angular/core": "6.0.9",
|
||||||
"@angular/flex-layout": "6.0.0-beta.16",
|
"@angular/flex-layout": "6.0.0-beta.16",
|
||||||
"@angular/forms": "6.0.7",
|
"@angular/forms": "6.0.9",
|
||||||
"@angular/http": "6.0.7",
|
"@angular/http": "6.0.9",
|
||||||
"@angular/material": "6.3.3",
|
"@angular/material": "6.3.3",
|
||||||
"@angular/material-moment-adapter": "6.3.3",
|
"@angular/material-moment-adapter": "6.3.3",
|
||||||
"@angular/platform-browser": "6.0.7",
|
"@angular/platform-browser": "6.0.9",
|
||||||
"@angular/platform-browser-dynamic": "6.0.7",
|
"@angular/platform-browser-dynamic": "6.0.9",
|
||||||
"@angular/router": "6.0.7",
|
"@angular/router": "6.0.9",
|
||||||
"@ngrx/effects": "6.0.1",
|
"@ngrx/effects": "6.0.1",
|
||||||
"@ngrx/router-store": "6.0.1",
|
"@ngrx/router-store": "6.0.1",
|
||||||
"@ngrx/store": "6.0.1",
|
"@ngrx/store": "6.0.1",
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"moment": "2.22.2",
|
"moment": "2.22.2",
|
||||||
"ng2-charts": "1.6.0",
|
"ng2-charts": "1.6.0",
|
||||||
"ngrx-store-freeze": "0.2.4",
|
"ngrx-store-freeze": "0.2.4",
|
||||||
"ngx-color-picker": "6.4.0",
|
"ngx-color-picker": "6.5.0",
|
||||||
"ngx-cookie-service": "1.0.10",
|
"ngx-cookie-service": "1.0.10",
|
||||||
"perfect-scrollbar": "1.4.0",
|
"perfect-scrollbar": "1.4.0",
|
||||||
"prismjs": "1.15.0",
|
"prismjs": "1.15.0",
|
||||||
@@ -63,13 +63,13 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/cli": "6.0.8",
|
"@angular/cli": "6.0.8",
|
||||||
"@angular/compiler-cli": "6.0.7",
|
"@angular/compiler-cli": "6.0.9",
|
||||||
"@angular/language-service": "6.0.7",
|
"@angular/language-service": "6.0.9",
|
||||||
"@angular-devkit/build-angular": "0.6.8",
|
"@angular-devkit/build-angular": "0.6.8",
|
||||||
"@angularclass/hmr": "2.1.3",
|
"@angularclass/hmr": "2.1.3",
|
||||||
"@types/jasmine": "2.8.8",
|
"@types/jasmine": "2.8.8",
|
||||||
"@types/jasminewd2": "2.0.3",
|
"@types/jasminewd2": "2.0.3",
|
||||||
"@types/lodash": "4.14.110",
|
"@types/lodash": "4.14.111",
|
||||||
"@types/node": "8.9.5",
|
"@types/node": "8.9.5",
|
||||||
"codelyzer": "4.2.1",
|
"codelyzer": "4.2.1",
|
||||||
"jasmine-core": "2.99.1",
|
"jasmine-core": "2.99.1",
|
||||||
|
|||||||
@@ -4,4 +4,5 @@
|
|||||||
background: #263238;
|
background: #263238;
|
||||||
cursor: text;
|
cursor: text;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ export * from './demo/demo.module';
|
|||||||
export * from './highlight/highlight.module';
|
export * from './highlight/highlight.module';
|
||||||
export * from './material-color-picker/material-color-picker.module';
|
export * from './material-color-picker/material-color-picker.module';
|
||||||
export * from './navigation/navigation.module';
|
export * from './navigation/navigation.module';
|
||||||
|
export * from './progress-bar/progress-bar.module';
|
||||||
export * from './search-bar/search-bar.module';
|
export * from './search-bar/search-bar.module';
|
||||||
export * from './shortcuts/shortcuts.module';
|
export * from './shortcuts/shortcuts.module';
|
||||||
export * from './sidebar/sidebar.module';
|
export * from './sidebar/sidebar.module';
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<ng-container *ngIf="visible">
|
||||||
|
|
||||||
|
<mat-progress-bar color="accent" [bufferValue]="bufferValue" [mode]="mode" [value]="value"></mat-progress-bar>
|
||||||
|
|
||||||
|
</ng-container>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
@import "src/@fuse/scss/fuse";
|
||||||
|
|
||||||
|
fuse-progress-bar {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 99998;
|
||||||
|
|
||||||
|
mat-progress-bar {
|
||||||
|
|
||||||
|
.mat-progress-bar-buffer {
|
||||||
|
background-color: #C5C6CB !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
93
src/@fuse/components/progress-bar/progress-bar.component.ts
Normal file
93
src/@fuse/components/progress-bar/progress-bar.component.ts
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
|
import { Subject } from 'rxjs';
|
||||||
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
|
||||||
|
import { FuseProgressBarService } from '@fuse/components/progress-bar/progress-bar.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector : 'fuse-progress-bar',
|
||||||
|
templateUrl : './progress-bar.component.html',
|
||||||
|
styleUrls : ['./progress-bar.component.scss'],
|
||||||
|
encapsulation: ViewEncapsulation.None
|
||||||
|
})
|
||||||
|
export class FuseProgressBarComponent implements OnInit, OnDestroy
|
||||||
|
{
|
||||||
|
bufferValue: number;
|
||||||
|
mode: 'determinate' | 'indeterminate' | 'buffer' | 'query';
|
||||||
|
value: number;
|
||||||
|
visible: boolean;
|
||||||
|
|
||||||
|
// Private
|
||||||
|
private _unsubscribeAll: Subject<any>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param {FuseProgressBarService} _fuseProgressBarService
|
||||||
|
*/
|
||||||
|
constructor(
|
||||||
|
private _fuseProgressBarService: FuseProgressBarService
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Set the defaults
|
||||||
|
|
||||||
|
// Set the private defaults
|
||||||
|
this._unsubscribeAll = new Subject();
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Lifecycle hooks
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On init
|
||||||
|
*/
|
||||||
|
ngOnInit(): void
|
||||||
|
{
|
||||||
|
// Subscribe to the progress bar service properties
|
||||||
|
|
||||||
|
// Buffer value
|
||||||
|
this._fuseProgressBarService.bufferValue
|
||||||
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
|
.subscribe((bufferValue) => {
|
||||||
|
this.bufferValue = bufferValue;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Mode
|
||||||
|
this._fuseProgressBarService.mode
|
||||||
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
|
.subscribe((mode) => {
|
||||||
|
this.mode = mode;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Value
|
||||||
|
this._fuseProgressBarService.value
|
||||||
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
|
.subscribe((value) => {
|
||||||
|
this.value = value;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Visible
|
||||||
|
this._fuseProgressBarService.visible
|
||||||
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
|
.subscribe((visible) => {
|
||||||
|
this.visible = visible;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On destroy
|
||||||
|
*/
|
||||||
|
ngOnDestroy(): void
|
||||||
|
{
|
||||||
|
// Unsubscribe from all subscriptions
|
||||||
|
this._unsubscribeAll.next();
|
||||||
|
this._unsubscribeAll.complete();
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Public methods
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
}
|
||||||
27
src/@fuse/components/progress-bar/progress-bar.module.ts
Normal file
27
src/@fuse/components/progress-bar/progress-bar.module.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { MatButtonModule, MatIconModule, MatProgressBarModule } from '@angular/material';
|
||||||
|
|
||||||
|
import { FuseProgressBarComponent } from './progress-bar.component';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
FuseProgressBarComponent
|
||||||
|
],
|
||||||
|
imports : [
|
||||||
|
CommonModule,
|
||||||
|
RouterModule,
|
||||||
|
|
||||||
|
MatButtonModule,
|
||||||
|
MatIconModule,
|
||||||
|
MatProgressBarModule
|
||||||
|
],
|
||||||
|
exports : [
|
||||||
|
FuseProgressBarComponent
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class FuseProgressBarModule
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -6,9 +6,12 @@ import { filter } from 'rxjs/operators';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class FuseLoadingBarService
|
export class FuseProgressBarService
|
||||||
{
|
{
|
||||||
// Private
|
// Private
|
||||||
|
private _bufferValue: BehaviorSubject<number>;
|
||||||
|
private _mode: BehaviorSubject<string>;
|
||||||
|
private _value: BehaviorSubject<number>;
|
||||||
private _visible: BehaviorSubject<boolean>;
|
private _visible: BehaviorSubject<boolean>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,9 +31,50 @@ export class FuseLoadingBarService
|
|||||||
// @ Accessors
|
// @ Accessors
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Buffer value
|
||||||
|
*/
|
||||||
|
get bufferValue(): Observable<any>
|
||||||
|
{
|
||||||
|
return this._bufferValue.asObservable();
|
||||||
|
}
|
||||||
|
|
||||||
|
setBufferValue(value: number): void
|
||||||
|
{
|
||||||
|
this._bufferValue.next(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mode
|
||||||
|
*/
|
||||||
|
get mode(): Observable<any>
|
||||||
|
{
|
||||||
|
return this._mode.asObservable();
|
||||||
|
}
|
||||||
|
|
||||||
|
setMode(value: 'determinate' | 'indeterminate' | 'buffer' | 'query'): void
|
||||||
|
{
|
||||||
|
this._mode.next(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Value
|
||||||
|
*/
|
||||||
|
get value(): Observable<any>
|
||||||
|
{
|
||||||
|
return this._value.asObservable();
|
||||||
|
}
|
||||||
|
|
||||||
|
setValue(value: number): void
|
||||||
|
{
|
||||||
|
this._value.next(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Visible
|
||||||
|
*/
|
||||||
get visible(): Observable<any>
|
get visible(): Observable<any>
|
||||||
{
|
{
|
||||||
// Return the _visible as observable
|
|
||||||
return this._visible.asObservable();
|
return this._visible.asObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,24 +89,23 @@ export class FuseLoadingBarService
|
|||||||
*/
|
*/
|
||||||
private _init(): void
|
private _init(): void
|
||||||
{
|
{
|
||||||
// Initialize the behavior subject
|
// Initialize the behavior subjects
|
||||||
|
this._bufferValue = new BehaviorSubject(0);
|
||||||
|
this._mode = new BehaviorSubject('indeterminate');
|
||||||
|
this._value = new BehaviorSubject(0);
|
||||||
this._visible = new BehaviorSubject(false);
|
this._visible = new BehaviorSubject(false);
|
||||||
|
|
||||||
// Subscribe to the router events to show/hide the loading bar
|
// Subscribe to the router events to show/hide the loading bar
|
||||||
this._router.events
|
this._router.events
|
||||||
.pipe(
|
.pipe(filter((event) => event instanceof NavigationStart))
|
||||||
filter((event) => event instanceof NavigationStart)
|
|
||||||
)
|
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
this.showLoadingBar();
|
this.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._router.events
|
this._router.events
|
||||||
.pipe(
|
.pipe(filter((event) => event instanceof NavigationEnd))
|
||||||
filter((event) => event instanceof NavigationEnd)
|
|
||||||
)
|
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
this.hideLoadingBar();
|
this.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,20 +114,18 @@ export class FuseLoadingBarService
|
|||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the loading bar
|
* Show the progress bar
|
||||||
*/
|
*/
|
||||||
showLoadingBar(): void
|
show(): void
|
||||||
{
|
{
|
||||||
// Show
|
|
||||||
this._visible.next(true);
|
this._visible.next(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the loading bar
|
* Hide the progress bar
|
||||||
*/
|
*/
|
||||||
hideLoadingBar(): void
|
hide(): void
|
||||||
{
|
{
|
||||||
// Hide
|
|
||||||
this._visible.next(false);
|
this._visible.next(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@import "src/@fuse/scss/fuse";
|
||||||
|
|
||||||
fuse-sidebar {
|
fuse-sidebar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -7,6 +9,7 @@ fuse-sidebar {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
width: 280px;
|
width: 280px;
|
||||||
min-width: 280px;
|
min-width: 280px;
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
@@ -14,6 +17,12 @@ fuse-sidebar {
|
|||||||
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.35);
|
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.35);
|
||||||
background: white;
|
background: white;
|
||||||
|
|
||||||
|
@include media-breakpoint-down('xs') {
|
||||||
|
min-width: 0 !important;
|
||||||
|
max-width: 80vw !important;
|
||||||
|
width: 80vw !important;
|
||||||
|
}
|
||||||
|
|
||||||
&.left-positioned {
|
&.left-positioned {
|
||||||
left: 0;
|
left: 0;
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
|
|||||||
@@ -132,6 +132,23 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- SIDE PANEL -->
|
||||||
|
<div class="group" formGroupName="sidepanel">
|
||||||
|
|
||||||
|
<h2>Side Panel</h2>
|
||||||
|
|
||||||
|
<mat-slide-toggle formControlName="hidden">
|
||||||
|
Hide
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
|
<h3 class="mt-24">Position:</h3>
|
||||||
|
<mat-radio-group fxLayout="column" fxLayoutAlign="start start" formControlName="position">
|
||||||
|
<mat-radio-button class="mb-12" value="left">Left</mat-radio-button>
|
||||||
|
<mat-radio-button class="mb-12" value="right">Right</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- VERTICAL LAYOUT #2 -->
|
<!-- VERTICAL LAYOUT #2 -->
|
||||||
@@ -226,6 +243,23 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- SIDE PANEL -->
|
||||||
|
<div class="group" formGroupName="sidepanel">
|
||||||
|
|
||||||
|
<h2>Side Panel</h2>
|
||||||
|
|
||||||
|
<mat-slide-toggle formControlName="hidden">
|
||||||
|
Hide
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
|
<h3 class="mt-24">Position:</h3>
|
||||||
|
<mat-radio-group fxLayout="column" fxLayoutAlign="start start" formControlName="position">
|
||||||
|
<mat-radio-button class="mb-12" value="left">Left</mat-radio-button>
|
||||||
|
<mat-radio-button class="mb-12" value="right">Right</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- VERTICAL LAYOUT #3 -->
|
<!-- VERTICAL LAYOUT #3 -->
|
||||||
@@ -318,6 +352,23 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- SIDE PANEL -->
|
||||||
|
<div class="group" formGroupName="sidepanel">
|
||||||
|
|
||||||
|
<h2>Side Panel</h2>
|
||||||
|
|
||||||
|
<mat-slide-toggle formControlName="hidden">
|
||||||
|
Hide
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
|
<h3 class="mt-24">Position:</h3>
|
||||||
|
<mat-radio-group fxLayout="column" fxLayoutAlign="start start" formControlName="position">
|
||||||
|
<mat-radio-button class="mb-12" value="left">Left</mat-radio-button>
|
||||||
|
<mat-radio-button class="mb-12" value="right">Right</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- HORIZONTAL LAYOUT #1 -->
|
<!-- HORIZONTAL LAYOUT #1 -->
|
||||||
@@ -405,6 +456,23 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- SIDE PANEL -->
|
||||||
|
<div class="group" formGroupName="sidepanel">
|
||||||
|
|
||||||
|
<h2>Side Panel</h2>
|
||||||
|
|
||||||
|
<mat-slide-toggle formControlName="hidden">
|
||||||
|
Hide
|
||||||
|
</mat-slide-toggle>
|
||||||
|
|
||||||
|
<h3 class="mt-24">Position:</h3>
|
||||||
|
<mat-radio-group fxLayout="column" fxLayoutAlign="start start" formControlName="position">
|
||||||
|
<mat-radio-button class="mb-12" value="left">Left</mat-radio-button>
|
||||||
|
<mat-radio-button class="mb-12" value="right">Right</mat-radio-button>
|
||||||
|
</mat-radio-group>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
padding: 40px 24px 24px 24px;
|
padding: 40px 24px 24px 24px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -62,24 +62,28 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
|||||||
// noinspection TypeScriptValidateTypes
|
// noinspection TypeScriptValidateTypes
|
||||||
this.form = this._formBuilder.group({
|
this.form = this._formBuilder.group({
|
||||||
layout : this._formBuilder.group({
|
layout : this._formBuilder.group({
|
||||||
style : new FormControl(),
|
style : new FormControl(),
|
||||||
width : new FormControl(),
|
width : new FormControl(),
|
||||||
navbar : this._formBuilder.group({
|
navbar : this._formBuilder.group({
|
||||||
background: new FormControl(),
|
background: new FormControl(),
|
||||||
folded : new FormControl(),
|
folded : new FormControl(),
|
||||||
hidden : new FormControl(),
|
hidden : new FormControl(),
|
||||||
position : new FormControl(),
|
position : new FormControl(),
|
||||||
variant : new FormControl()
|
variant : new FormControl()
|
||||||
}),
|
}),
|
||||||
toolbar: this._formBuilder.group({
|
toolbar : this._formBuilder.group({
|
||||||
background: new FormControl(),
|
background: new FormControl(),
|
||||||
hidden : new FormControl(),
|
hidden : new FormControl(),
|
||||||
position : new FormControl()
|
position : new FormControl()
|
||||||
}),
|
}),
|
||||||
footer : this._formBuilder.group({
|
footer : this._formBuilder.group({
|
||||||
background: new FormControl(),
|
background: new FormControl(),
|
||||||
hidden : new FormControl(),
|
hidden : new FormControl(),
|
||||||
position : new FormControl()
|
position : new FormControl()
|
||||||
|
}),
|
||||||
|
sidepanel: this._formBuilder.group({
|
||||||
|
hidden: new FormControl(),
|
||||||
|
position : new FormControl()
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
customScrollbars: new FormControl()
|
customScrollbars: new FormControl()
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix: "Smooth scrolling for iOS"
|
||||||
|
.mat-dialog-container {
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
}
|
||||||
|
|
||||||
// Fix: "Inconsistent font sizes across elements"
|
// Fix: "Inconsistent font sizes across elements"
|
||||||
.mat-form-field-wrapper {
|
.mat-form-field-wrapper {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -10,4 +10,15 @@ body {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
|
||||||
|
// Boxed
|
||||||
|
&.boxed {
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
@include mat-elevation(8);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -143,8 +143,9 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
|
|||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
|
||||||
> .content {
|
> .content {
|
||||||
overflow: auto;
|
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,6 +167,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
|
|||||||
|
|
||||||
.tab-content {
|
.tab-content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -346,6 +348,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,6 +361,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
|
|||||||
> .content {
|
> .content {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -379,6 +383,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
|
|||||||
|
|
||||||
.tab-content {
|
.tab-content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -500,12 +505,14 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .center {
|
> .center {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -528,12 +535,14 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .center {
|
> .center {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ owl-date-time {
|
|||||||
padding: .25em;
|
padding: .25em;
|
||||||
background-color: rgba(0, 0, 0, .1);
|
background-color: rgba(0, 0, 0, .1);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.owl-calendar-wrapper {
|
.owl-calendar-wrapper {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
height: 140px;
|
height: 140px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
> hr {
|
> hr {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ export interface FuseConfig
|
|||||||
background: string,
|
background: string,
|
||||||
hidden: boolean,
|
hidden: boolean,
|
||||||
position: 'above' | 'above-static' | 'above-fixed' | 'below' | 'below-static' | 'below-fixed'
|
position: 'above' | 'above-static' | 'above-fixed' | 'below' | 'below-static' | 'below-fixed'
|
||||||
|
},
|
||||||
|
sidepanel: {
|
||||||
|
hidden: boolean,
|
||||||
|
position: 'left' | 'right'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
customScrollbars: boolean;
|
customScrollbars: boolean;
|
||||||
|
|||||||
@@ -1,22 +1,30 @@
|
|||||||
|
<!-- PROGRESS BAR -->
|
||||||
|
<fuse-progress-bar></fuse-progress-bar>
|
||||||
|
<!-- / PROGRESS BAR -->
|
||||||
|
|
||||||
<!-- VERTICAL LAYOUT 1 -->
|
<!-- VERTICAL LAYOUT 1 -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.style === 'vertical-layout-1'">
|
<ng-container *ngIf="fuseConfig.layout.style === 'vertical-layout-1'">
|
||||||
<vertical-layout-1></vertical-layout-1>
|
<vertical-layout-1></vertical-layout-1>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<!-- / VERTICAL LAYOUT 1 -->
|
||||||
|
|
||||||
<!-- VERTICAL LAYOUT 2 -->
|
<!-- VERTICAL LAYOUT 2 -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.style === 'vertical-layout-2'">
|
<ng-container *ngIf="fuseConfig.layout.style === 'vertical-layout-2'">
|
||||||
<vertical-layout-2></vertical-layout-2>
|
<vertical-layout-2></vertical-layout-2>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<!-- / VERTICAL LAYOUT 2 -->
|
||||||
|
|
||||||
<!-- VERTICAL LAYOUT 3 -->
|
<!-- VERTICAL LAYOUT 3 -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.style === 'vertical-layout-3'">
|
<ng-container *ngIf="fuseConfig.layout.style === 'vertical-layout-3'">
|
||||||
<vertical-layout-3></vertical-layout-3>
|
<vertical-layout-3></vertical-layout-3>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<!-- / VERTICAL LAYOUT 3 -->
|
||||||
|
|
||||||
<!-- HORIZONTAL LAYOUT 1 -->
|
<!-- HORIZONTAL LAYOUT 1 -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.style === 'horizontal-layout-1'">
|
<ng-container *ngIf="fuseConfig.layout.style === 'horizontal-layout-1'">
|
||||||
<horizontal-layout-1></horizontal-layout-1>
|
<horizontal-layout-1></horizontal-layout-1>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<!-- / HORIZONTAL LAYOUT 1 -->
|
||||||
|
|
||||||
<!-- THEME OPTIONS PANEL -->
|
<!-- THEME OPTIONS PANEL -->
|
||||||
<button mat-icon-button class="mat-primary-bg mat-elevation-z2 theme-options-button"
|
<button mat-icon-button class="mat-primary-bg mat-elevation-z2 theme-options-button"
|
||||||
@@ -26,4 +34,5 @@
|
|||||||
|
|
||||||
<fuse-sidebar name="themeOptionsPanel" class="theme-options-sidebar" position="right" [invisibleOverlay]="true">
|
<fuse-sidebar name="themeOptionsPanel" class="theme-options-sidebar" position="right" [invisibleOverlay]="true">
|
||||||
<fuse-theme-options></fuse-theme-options>
|
<fuse-theme-options></fuse-theme-options>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
|
<!-- / THEME OPTIONS PANEL -->
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
.theme-options-button {
|
.theme-options-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 160px;
|
top: 160px;
|
||||||
right: 70px;
|
right: 0;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
line-height: 48px;
|
line-height: 48px;
|
||||||
@@ -23,10 +23,6 @@
|
|||||||
opacity: .90;
|
opacity: .90;
|
||||||
z-index: 998;
|
z-index: 998;
|
||||||
|
|
||||||
@include media-breakpoint-down('md') {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
mat-icon {
|
mat-icon {
|
||||||
animation: rotating 3s linear infinite;
|
animation: rotating 3s linear infinite;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
import { Component, Inject, OnDestroy, OnInit } from '@angular/core';
|
||||||
|
import { DOCUMENT } from '@angular/common';
|
||||||
|
import { Platform } from '@angular/cdk/platform';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
@@ -20,8 +22,8 @@ import { locale as navigationTurkish } from 'app/navigation/i18n/tr';
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit, OnDestroy
|
export class AppComponent implements OnInit, OnDestroy
|
||||||
{
|
{
|
||||||
navigation: any;
|
|
||||||
fuseConfig: any;
|
fuseConfig: any;
|
||||||
|
navigation: any;
|
||||||
|
|
||||||
// Private
|
// Private
|
||||||
private _unsubscribeAll: Subject<any>;
|
private _unsubscribeAll: Subject<any>;
|
||||||
@@ -29,20 +31,24 @@ export class AppComponent implements OnInit, OnDestroy
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
|
* @param {DOCUMENT} document
|
||||||
* @param {FuseConfigService} _fuseConfigService
|
* @param {FuseConfigService} _fuseConfigService
|
||||||
* @param {FuseNavigationService} _fuseNavigationService
|
* @param {FuseNavigationService} _fuseNavigationService
|
||||||
* @param {FuseSidebarService} _fuseSidebarService
|
* @param {FuseSidebarService} _fuseSidebarService
|
||||||
* @param {FuseSplashScreenService} _fuseSplashScreenService
|
* @param {FuseSplashScreenService} _fuseSplashScreenService
|
||||||
* @param {FuseTranslationLoaderService} _fuseTranslationLoaderService
|
* @param {FuseTranslationLoaderService} _fuseTranslationLoaderService
|
||||||
|
* @param {Platform} _platform
|
||||||
* @param {TranslateService} _translateService
|
* @param {TranslateService} _translateService
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
|
@Inject(DOCUMENT) private document: any,
|
||||||
private _fuseConfigService: FuseConfigService,
|
private _fuseConfigService: FuseConfigService,
|
||||||
private _fuseNavigationService: FuseNavigationService,
|
private _fuseNavigationService: FuseNavigationService,
|
||||||
private _fuseSidebarService: FuseSidebarService,
|
private _fuseSidebarService: FuseSidebarService,
|
||||||
private _fuseSplashScreenService: FuseSplashScreenService,
|
private _fuseSplashScreenService: FuseSplashScreenService,
|
||||||
private _fuseTranslationLoaderService: FuseTranslationLoaderService,
|
private _fuseTranslationLoaderService: FuseTranslationLoaderService,
|
||||||
private _translateService: TranslateService
|
private _translateService: TranslateService,
|
||||||
|
private _platform: Platform
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Get default navigation
|
// Get default navigation
|
||||||
@@ -66,6 +72,12 @@ export class AppComponent implements OnInit, OnDestroy
|
|||||||
// Use a language
|
// Use a language
|
||||||
this._translateService.use('en');
|
this._translateService.use('en');
|
||||||
|
|
||||||
|
// Add is-mobile class to the body if the platform is mobile
|
||||||
|
if ( this._platform.ANDROID || this._platform.IOS )
|
||||||
|
{
|
||||||
|
this.document.body.classList.add('is-mobile');
|
||||||
|
}
|
||||||
|
|
||||||
// Set the private defaults
|
// Set the private defaults
|
||||||
this._unsubscribeAll = new Subject();
|
this._unsubscribeAll = new Subject();
|
||||||
}
|
}
|
||||||
@@ -84,6 +96,15 @@ export class AppComponent implements OnInit, OnDestroy
|
|||||||
.pipe(takeUntil(this._unsubscribeAll))
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
.subscribe((config) => {
|
.subscribe((config) => {
|
||||||
this.fuseConfig = config;
|
this.fuseConfig = config;
|
||||||
|
|
||||||
|
if ( this.fuseConfig.layout.width === 'boxed' )
|
||||||
|
{
|
||||||
|
this.document.body.classList.add('boxed');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.document.body.classList.remove('boxed');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import 'hammerjs';
|
|||||||
|
|
||||||
import { FuseModule } from '@fuse/fuse.module';
|
import { FuseModule } from '@fuse/fuse.module';
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
import { FuseSharedModule } from '@fuse/shared.module';
|
||||||
import { FuseSidebarModule, FuseThemeOptionsModule } from '@fuse/components';
|
import { FuseProgressBarModule, FuseSidebarModule, FuseThemeOptionsModule } from '@fuse/components';
|
||||||
|
|
||||||
import { fuseConfig } from 'app/fuse-config';
|
import { fuseConfig } from 'app/fuse-config';
|
||||||
|
|
||||||
@@ -46,6 +46,7 @@ const appRoutes: Routes = [
|
|||||||
|
|
||||||
// Fuse modules
|
// Fuse modules
|
||||||
FuseModule.forRoot(fuseConfig),
|
FuseModule.forRoot(fuseConfig),
|
||||||
|
FuseProgressBarModule,
|
||||||
FuseSharedModule,
|
FuseSharedModule,
|
||||||
FuseSidebarModule,
|
FuseSidebarModule,
|
||||||
FuseThemeOptionsModule,
|
FuseThemeOptionsModule,
|
||||||
|
|||||||
@@ -10,24 +10,28 @@ import { FuseConfig } from '@fuse/types';
|
|||||||
|
|
||||||
export const fuseConfig: FuseConfig = {
|
export const fuseConfig: FuseConfig = {
|
||||||
layout : {
|
layout : {
|
||||||
style : 'vertical-layout-1',
|
style : 'vertical-layout-1',
|
||||||
width : 'fullwidth',
|
width : 'fullwidth',
|
||||||
navbar : {
|
navbar : {
|
||||||
background: 'mat-fuse-dark-700-bg',
|
background: 'mat-fuse-dark-700-bg',
|
||||||
folded : false,
|
folded : false,
|
||||||
hidden : false,
|
hidden : false,
|
||||||
position : 'left',
|
position : 'left',
|
||||||
variant : 'vertical-style-1'
|
variant : 'vertical-style-1'
|
||||||
},
|
},
|
||||||
toolbar: {
|
toolbar : {
|
||||||
background: 'mat-white-500-bg',
|
background: 'mat-white-500-bg',
|
||||||
hidden : false,
|
hidden : false,
|
||||||
position : 'below-static'
|
position : 'below-static'
|
||||||
},
|
},
|
||||||
footer : {
|
footer : {
|
||||||
background: 'mat-fuse-dark-900-bg',
|
background: 'mat-fuse-dark-900-bg',
|
||||||
hidden : false,
|
hidden : false,
|
||||||
position : 'below-fixed'
|
position : 'below-fixed'
|
||||||
|
},
|
||||||
|
sidepanel: {
|
||||||
|
hidden : false,
|
||||||
|
position: 'right'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customScrollbars: true
|
customScrollbars: true
|
||||||
|
|||||||
@@ -1,119 +0,0 @@
|
|||||||
<div class="header mat-elevation-z4 mat-primary-bg" fxLayout="row" fxLayoutAlign="space-between center">
|
|
||||||
|
|
||||||
<ng-container *ngIf="selectedContact === null">
|
|
||||||
|
|
||||||
<div class="title ml-16" fxLayout="row" fxLayoutAlign="start center">
|
|
||||||
<mat-icon class="s-32 white-fg">chat</mat-icon>
|
|
||||||
<h3 class="ml-12">Team Chat</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container *ngIf="selectedContact !== null">
|
|
||||||
|
|
||||||
<div class="title" fxLayout="row" fxLayoutAlign="start center">
|
|
||||||
<img [src]="selectedContact.avatar" class="avatar mx-16">
|
|
||||||
<h3 class="text-truncate">{{selectedContact.name}}</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<button mat-icon-button class="toggle-sidebar-folded mr-8" (click)="foldSidebarTemporarily()" fxHide fxShow.gt-md>
|
|
||||||
<mat-icon class="secondary-text s-20">arrow_forward</mat-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button mat-icon-button class="toggle-sidebar-folded mr-8" (click)="toggleSidebarOpen()" fxHide.gt-md>
|
|
||||||
<mat-icon class="secondary-text">arrow_forward</mat-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<!-- Contacts -->
|
|
||||||
<mat-list id="contacts-list" fusePerfectScrollbar [fusePerfectScrollbarOptions]="{suppressScrollX: true}">
|
|
||||||
|
|
||||||
<mat-list-item *ngFor="let contact of contacts"
|
|
||||||
[ngClass]="contact.status"
|
|
||||||
[class.active]="contact.id === selectedContact?.id"
|
|
||||||
(click)="goToChat(contact)"
|
|
||||||
[matTooltip]="contact.name"
|
|
||||||
matTooltipPosition="left"
|
|
||||||
matRipple>
|
|
||||||
|
|
||||||
<img matListAvatar [src]="contact.avatar">
|
|
||||||
<div class="unread-count" *ngIf="contact.unread">{{contact.unread}}</div>
|
|
||||||
<div class="status-icon" [ngClass]="contact.status"></div>
|
|
||||||
|
|
||||||
</mat-list-item>
|
|
||||||
|
|
||||||
</mat-list>
|
|
||||||
<!-- / Contacts -->
|
|
||||||
|
|
||||||
<!-- Chat -->
|
|
||||||
<div id="chat" fxLayout="column" fxFlex="1 1 auto">
|
|
||||||
|
|
||||||
<div id="messages" class="messages" fxFlex="1 1 auto" fusePerfectScrollbar>
|
|
||||||
|
|
||||||
<ng-container *ngIf="chat && chat.dialog && chat.dialog.length > 0">
|
|
||||||
|
|
||||||
<div *ngFor="let message of chat.dialog; let i = index" class="message-row"
|
|
||||||
[ngClass]="{
|
|
||||||
'me': message.who === user.id,
|
|
||||||
'contact': message.who !== user.id,
|
|
||||||
'first-of-group': isFirstMessageOfGroup(message, i),
|
|
||||||
'last-of-group': isLastMessageOfGroup(message, i)
|
|
||||||
}">
|
|
||||||
|
|
||||||
<img *ngIf="shouldShowContactAvatar(message, i)"
|
|
||||||
src="{{selectedContact.avatar}}"
|
|
||||||
class="avatar">
|
|
||||||
|
|
||||||
<div class="bubble">
|
|
||||||
<div class="message">{{message.message}}</div>
|
|
||||||
<div class="time secondary-text">{{message.time | date:'short'}}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container *ngIf="chat && chat.dialog && chat.dialog.length === 0">
|
|
||||||
|
|
||||||
<div class="no-messages-icon">
|
|
||||||
<mat-icon class="s-128">chat</mat-icon>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="no-messages secondary-text">
|
|
||||||
Start a conversation by typing your message below.
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="reply-form" fxFlex="0 0 auto" fxLayout="row" fxLayoutAlign="center center">
|
|
||||||
|
|
||||||
<form #replyForm="ngForm"
|
|
||||||
(ngSubmit)="reply($event)"
|
|
||||||
(keydown.enter)="reply($event)"
|
|
||||||
fxFlex
|
|
||||||
fxLayout="row"
|
|
||||||
fxLayoutAlign="start center">
|
|
||||||
|
|
||||||
<mat-form-field class="message-text" fxFlex floatLabel="never" appearance="standard">
|
|
||||||
<textarea matInput #replyInput ngModel name="message" placeholder="Type your message"
|
|
||||||
[rows]="1" [matTextareaAutosize]="true"></textarea>
|
|
||||||
</mat-form-field>
|
|
||||||
|
|
||||||
<button class="send-message-button" mat-icon-button type="submit" aria-label="Send message">
|
|
||||||
<mat-icon class="secondary-text">send</mat-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- / Chat -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@@ -1,374 +0,0 @@
|
|||||||
@import "src/@fuse/scss/fuse";
|
|
||||||
|
|
||||||
chat-panel {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
flex: 1 1 auto;
|
|
||||||
width: 360px;
|
|
||||||
min-width: 360px;
|
|
||||||
max-width: 360px;
|
|
||||||
z-index: 99;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.header {
|
|
||||||
height: 64px;
|
|
||||||
max-height: 64px;
|
|
||||||
min-height: 64px;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
|
|
||||||
mat-icon {
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
max-width: 120px;
|
|
||||||
transition: opacity 300ms ease-in-out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#contacts-list {
|
|
||||||
padding: 8px 0;
|
|
||||||
overflow: auto;
|
|
||||||
width: 72px;
|
|
||||||
min-width: 72px;
|
|
||||||
max-width: 72px;
|
|
||||||
|
|
||||||
// Perfect scrollbar
|
|
||||||
.ps__rail-y {
|
|
||||||
width: 3px !important;
|
|
||||||
|
|
||||||
.ps__thumb-y {
|
|
||||||
width: 3px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-list-item {
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
background-color: mat-color(mat-palette($mat-grey, 300));
|
|
||||||
@include mat-elevation(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.offline {
|
|
||||||
|
|
||||||
.mat-list-item-content {
|
|
||||||
|
|
||||||
img {
|
|
||||||
filter: grayscale(100%);
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-list-item-content {
|
|
||||||
|
|
||||||
.unread-count {
|
|
||||||
position: absolute;
|
|
||||||
min-width: 18px;
|
|
||||||
height: 18px;
|
|
||||||
top: 4px;
|
|
||||||
left: 10px;
|
|
||||||
border-radius: 9px;
|
|
||||||
padding: 0 5px;
|
|
||||||
font-size: 11px;
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background-color: mat-color(mat-palette($mat-indigo));
|
|
||||||
color: white;
|
|
||||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-icon {
|
|
||||||
position: absolute;
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
bottom: 3px;
|
|
||||||
left: 44px;
|
|
||||||
border: 2px solid white;
|
|
||||||
border-radius: 50%;
|
|
||||||
|
|
||||||
&.online {
|
|
||||||
background-color: #4CAF50;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.do-not-disturb {
|
|
||||||
background-color: #F44336;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.away {
|
|
||||||
background-color: #FFC107;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.offline {
|
|
||||||
background-color: #646464;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#chat {
|
|
||||||
background-color: mat-color(mat-palette($mat-grey, 300));
|
|
||||||
|
|
||||||
.messages {
|
|
||||||
position: relative;
|
|
||||||
overflow: auto;
|
|
||||||
padding: 16px 0 40px 40px;
|
|
||||||
|
|
||||||
.message-row {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 0 16px 4px 16px;
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
position: absolute;
|
|
||||||
left: -32px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 12px;
|
|
||||||
|
|
||||||
.message {
|
|
||||||
white-space: pre-wrap;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.time {
|
|
||||||
position: absolute;
|
|
||||||
display: none;
|
|
||||||
width: 100%;
|
|
||||||
font-size: 11px;
|
|
||||||
margin-top: 8px;
|
|
||||||
top: 100%;
|
|
||||||
color: $black-87-opacity;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.contact {
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
background-color: mat-color(mat-palette($mat-indigo));
|
|
||||||
color: white;
|
|
||||||
|
|
||||||
border-top-left-radius: 5px;
|
|
||||||
border-bottom-left-radius: 5px;
|
|
||||||
|
|
||||||
border-top-right-radius: 20px;
|
|
||||||
border-bottom-right-radius: 20px;
|
|
||||||
|
|
||||||
.time {
|
|
||||||
margin-left: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.first-of-group {
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
border-top-left-radius: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.last-of-group {
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
border-bottom-left-radius: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.me {
|
|
||||||
padding-left: 40px;
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
order: 2;
|
|
||||||
margin: 0 0 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
margin-left: auto;
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
color: $black-87-opacity;
|
|
||||||
|
|
||||||
border-top-left-radius: 20px;
|
|
||||||
border-bottom-left-radius: 20px;
|
|
||||||
|
|
||||||
border-top-right-radius: 5px;
|
|
||||||
border-bottom-right-radius: 5px;
|
|
||||||
|
|
||||||
.time {
|
|
||||||
justify-content: flex-end;
|
|
||||||
right: 0;
|
|
||||||
margin-right: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.first-of-group {
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
border-top-right-radius: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.last-of-group {
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
border-bottom-right-radius: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.contact + .me,
|
|
||||||
&.me + .contact {
|
|
||||||
padding-top: 20px;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.first-of-group {
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
border-top-left-radius: 20px;
|
|
||||||
padding-top: 13px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.last-of-group {
|
|
||||||
|
|
||||||
.bubble {
|
|
||||||
border-bottom-left-radius: 20px;
|
|
||||||
padding-bottom: 13px;
|
|
||||||
|
|
||||||
.time {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-messages-icon {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 0 24px;
|
|
||||||
margin-top: -64px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
mat-icon {
|
|
||||||
color: rgba(0, 0, 0, 0.06);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-messages {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 0 16px 24px 16px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.reply-form {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.message-text {
|
|
||||||
padding: 16px 8px;
|
|
||||||
|
|
||||||
.mat-form-field-wrapper {
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
.mat-form-field-flex {
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
.mat-form-field-infix {
|
|
||||||
padding: 0;
|
|
||||||
border: none;
|
|
||||||
background: white;
|
|
||||||
border-radius: 20px;
|
|
||||||
@include mat-elevation(2);
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
overflow: hidden;
|
|
||||||
margin: 16px 48px 16px 16px;
|
|
||||||
width: calc(100% - 64px);
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-form-field-underline {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.send-message-button {
|
|
||||||
position: absolute;
|
|
||||||
right: 16px;
|
|
||||||
bottom: 21px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fuse-sidebar {
|
|
||||||
|
|
||||||
&.chat-panel {
|
|
||||||
width: 360px;
|
|
||||||
min-width: 360px;
|
|
||||||
max-width: 360px;
|
|
||||||
|
|
||||||
// Folded
|
|
||||||
&.folded {
|
|
||||||
|
|
||||||
chat-panel {
|
|
||||||
|
|
||||||
.header {
|
|
||||||
|
|
||||||
.title {
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Folded unfolded
|
|
||||||
&.unfolded {
|
|
||||||
|
|
||||||
chat-panel {
|
|
||||||
|
|
||||||
.header {
|
|
||||||
|
|
||||||
.title {
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,269 +0,0 @@
|
|||||||
import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core';
|
|
||||||
import { NgForm } from '@angular/forms';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
|
|
||||||
import { Subject } from 'rxjs';
|
|
||||||
import { takeUntil } from 'rxjs/operators';
|
|
||||||
|
|
||||||
import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service';
|
|
||||||
import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive';
|
|
||||||
import { ChatPanelService } from 'app/layout/components/chat-panel/chat-panel.service';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector : 'chat-panel',
|
|
||||||
templateUrl : './chat-panel.component.html',
|
|
||||||
styleUrls : ['./chat-panel.component.scss'],
|
|
||||||
encapsulation: ViewEncapsulation.None
|
|
||||||
})
|
|
||||||
export class ChatPanelComponent implements OnInit, AfterViewInit, OnDestroy
|
|
||||||
{
|
|
||||||
contacts: any[];
|
|
||||||
chat: any;
|
|
||||||
selectedContact: any;
|
|
||||||
sidebarFolded: boolean;
|
|
||||||
user: any;
|
|
||||||
|
|
||||||
@ViewChild('replyForm')
|
|
||||||
set replyForm(content: NgForm)
|
|
||||||
{
|
|
||||||
this._replyForm = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewChild('replyInput')
|
|
||||||
set replyInput(content: ElementRef)
|
|
||||||
{
|
|
||||||
this._replyInput = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewChildren(FusePerfectScrollbarDirective)
|
|
||||||
private _fusePerfectScrollbarDirectives: QueryList<FusePerfectScrollbarDirective>;
|
|
||||||
|
|
||||||
// Private
|
|
||||||
private _chatViewScrollbar: FusePerfectScrollbarDirective;
|
|
||||||
private _replyForm: NgForm;
|
|
||||||
private _replyInput: ElementRef;
|
|
||||||
private _unsubscribeAll: Subject<any>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* @param {ChatPanelService} _chatPanelService
|
|
||||||
* @param {HttpClient} _httpClient
|
|
||||||
* @param {FuseSidebarService} _fuseSidebarService
|
|
||||||
*/
|
|
||||||
constructor(
|
|
||||||
private _chatPanelService: ChatPanelService,
|
|
||||||
private _httpClient: HttpClient,
|
|
||||||
private _fuseSidebarService: FuseSidebarService
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// Set the defaults
|
|
||||||
this.selectedContact = null;
|
|
||||||
this.sidebarFolded = true;
|
|
||||||
|
|
||||||
// Set the private defaults
|
|
||||||
this._unsubscribeAll = new Subject();
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
|
||||||
// @ Lifecycle hooks
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* On init
|
|
||||||
*/
|
|
||||||
ngOnInit(): void
|
|
||||||
{
|
|
||||||
// Load the contacts
|
|
||||||
this._chatPanelService.loadContacts().then(() => {
|
|
||||||
|
|
||||||
this.contacts = this._chatPanelService.contacts;
|
|
||||||
this.user = this._chatPanelService.user;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Subscribe to the foldedChanged observable
|
|
||||||
this._fuseSidebarService.getSidebar('chatPanel').foldedChanged
|
|
||||||
.pipe(takeUntil(this._unsubscribeAll))
|
|
||||||
.subscribe((folded) => {
|
|
||||||
this.sidebarFolded = folded;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* After view init
|
|
||||||
*/
|
|
||||||
ngAfterViewInit(): void
|
|
||||||
{
|
|
||||||
this._chatViewScrollbar = this._fusePerfectScrollbarDirectives.find((directive) => {
|
|
||||||
return directive.elementRef.nativeElement.id === 'messages';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* On destroy
|
|
||||||
*/
|
|
||||||
ngOnDestroy(): void
|
|
||||||
{
|
|
||||||
// Unsubscribe from all subscriptions
|
|
||||||
this._unsubscribeAll.next();
|
|
||||||
this._unsubscribeAll.complete();
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
|
||||||
// @ Private methods
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prepare the chat for the replies
|
|
||||||
*/
|
|
||||||
private _prepareChatForReplies(): void
|
|
||||||
{
|
|
||||||
setTimeout(() => {
|
|
||||||
|
|
||||||
// Reset the reply form
|
|
||||||
this._replyForm.reset();
|
|
||||||
|
|
||||||
// Focus to the reply input
|
|
||||||
this._replyInput.nativeElement.focus();
|
|
||||||
|
|
||||||
// Scroll to the bottom of the messages list
|
|
||||||
if ( this._chatViewScrollbar )
|
|
||||||
{
|
|
||||||
this._chatViewScrollbar.update();
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
this._chatViewScrollbar.scrollToBottom(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
|
||||||
// @ Public methods
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggle sidebar folded status
|
|
||||||
*/
|
|
||||||
toggleSidebarFolded(): void
|
|
||||||
{
|
|
||||||
this._fuseSidebarService.getSidebar('chatPanel').toggleFold();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fold the temporarily unfolded sidebar back
|
|
||||||
*/
|
|
||||||
foldSidebarTemporarily(): void
|
|
||||||
{
|
|
||||||
this._fuseSidebarService.getSidebar('chatPanel').foldTemporarily();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unfold the sidebar temporarily
|
|
||||||
*/
|
|
||||||
unfoldSidebarTemporarily(): void
|
|
||||||
{
|
|
||||||
this._fuseSidebarService.getSidebar('chatPanel').unfoldTemporarily();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggle sidebar opened status
|
|
||||||
*/
|
|
||||||
toggleSidebarOpen(): void
|
|
||||||
{
|
|
||||||
this._fuseSidebarService.getSidebar('chatPanel').toggleOpen();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Decide whether to show or not the contact's avatar in the message row
|
|
||||||
*
|
|
||||||
* @param message
|
|
||||||
* @param i
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
shouldShowContactAvatar(message, i): boolean
|
|
||||||
{
|
|
||||||
return (
|
|
||||||
message.who === this.selectedContact.id &&
|
|
||||||
((this.chat.dialog[i + 1] && this.chat.dialog[i + 1].who !== this.selectedContact.id) || !this.chat.dialog[i + 1])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the given message is the first message of a group
|
|
||||||
*
|
|
||||||
* @param message
|
|
||||||
* @param i
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
isFirstMessageOfGroup(message, i): boolean
|
|
||||||
{
|
|
||||||
return (i === 0 || this.chat.dialog[i - 1] && this.chat.dialog[i - 1].who !== message.who);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the given message is the last message of a group
|
|
||||||
*
|
|
||||||
* @param message
|
|
||||||
* @param i
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
isLastMessageOfGroup(message, i): boolean
|
|
||||||
{
|
|
||||||
return (i === this.chat.dialog.length - 1 || this.chat.dialog[i + 1] && this.chat.dialog[i + 1].who !== message.who);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Go to chat with the contact
|
|
||||||
*
|
|
||||||
* @param contact
|
|
||||||
*/
|
|
||||||
goToChat(contact): void
|
|
||||||
{
|
|
||||||
// Unfold the sidebar temporarily
|
|
||||||
this.unfoldSidebarTemporarily();
|
|
||||||
|
|
||||||
// Set the selected contact
|
|
||||||
this.selectedContact = contact;
|
|
||||||
|
|
||||||
// Load the chat
|
|
||||||
this._chatPanelService.getChat(contact.id).then((chat) => {
|
|
||||||
|
|
||||||
// Set the chat
|
|
||||||
this.chat = chat;
|
|
||||||
|
|
||||||
// Prepare the chat for the replies
|
|
||||||
this._prepareChatForReplies();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reply
|
|
||||||
*/
|
|
||||||
reply(event): void
|
|
||||||
{
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
if ( !this._replyForm.form.value.message )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Message
|
|
||||||
const message = {
|
|
||||||
who : this.user.id,
|
|
||||||
message: this._replyForm.form.value.message,
|
|
||||||
time : new Date().toISOString()
|
|
||||||
};
|
|
||||||
|
|
||||||
// Add the message to the chat
|
|
||||||
this.chat.dialog.push(message);
|
|
||||||
|
|
||||||
// Update the server
|
|
||||||
this._chatPanelService.updateChat(this.chat.id, this.chat.dialog).then(response => {
|
|
||||||
|
|
||||||
// Prepare the chat for the replies
|
|
||||||
this._prepareChatForReplies();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { MatButtonModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatRippleModule, MatTabsModule, MatTooltipModule } from '@angular/material';
|
|
||||||
|
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
|
||||||
|
|
||||||
import { ChatPanelComponent } from 'app/layout/components/chat-panel/chat-panel.component';
|
|
||||||
import { ChatPanelService } from 'app/layout/components/chat-panel/chat-panel.service';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [
|
|
||||||
ChatPanelComponent
|
|
||||||
],
|
|
||||||
providers : [
|
|
||||||
ChatPanelService
|
|
||||||
],
|
|
||||||
imports : [
|
|
||||||
MatButtonModule,
|
|
||||||
MatFormFieldModule,
|
|
||||||
MatIconModule,
|
|
||||||
MatInputModule,
|
|
||||||
MatListModule,
|
|
||||||
MatTabsModule,
|
|
||||||
MatTooltipModule,
|
|
||||||
MatRippleModule,
|
|
||||||
|
|
||||||
FuseSharedModule
|
|
||||||
],
|
|
||||||
exports : [
|
|
||||||
ChatPanelComponent
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class ChatPanelModule
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
|
|
||||||
import { FuseUtils } from '@fuse/utils';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class ChatPanelService
|
|
||||||
{
|
|
||||||
contacts: any[];
|
|
||||||
chats: any[];
|
|
||||||
user: any;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* @param {HttpClient} _httpClient
|
|
||||||
*/
|
|
||||||
constructor(
|
|
||||||
private _httpClient: HttpClient
|
|
||||||
)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loader
|
|
||||||
*
|
|
||||||
* @returns {Promise<any> | any}
|
|
||||||
*/
|
|
||||||
loadContacts(): Promise<any> | any
|
|
||||||
{
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
Promise.all([
|
|
||||||
this.getContacts(),
|
|
||||||
this.getUser()
|
|
||||||
]).then(
|
|
||||||
([contacts, user]) => {
|
|
||||||
this.contacts = contacts;
|
|
||||||
this.user = user;
|
|
||||||
resolve();
|
|
||||||
},
|
|
||||||
reject
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get chat
|
|
||||||
*
|
|
||||||
* @param contactId
|
|
||||||
* @returns {Promise<any>}
|
|
||||||
*/
|
|
||||||
getChat(contactId): Promise<any>
|
|
||||||
{
|
|
||||||
const chatItem = this.user.chatList.find((item) => {
|
|
||||||
return item.contactId === contactId;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Get the chat
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
|
|
||||||
// If there is a chat with this user, return that.
|
|
||||||
if ( chatItem )
|
|
||||||
{
|
|
||||||
this._httpClient.get('api/chat-panel-chats/' + chatItem.chatId)
|
|
||||||
.subscribe((chat) => {
|
|
||||||
|
|
||||||
// Resolve the promise
|
|
||||||
resolve(chat);
|
|
||||||
|
|
||||||
}, reject);
|
|
||||||
}
|
|
||||||
// If there is no chat with this user, create one...
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.createNewChat(contactId).then(() => {
|
|
||||||
|
|
||||||
// and then recall the getChat method
|
|
||||||
this.getChat(contactId).then((chat) => {
|
|
||||||
resolve(chat);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create new chat
|
|
||||||
*
|
|
||||||
* @param contactId
|
|
||||||
* @returns {Promise<any>}
|
|
||||||
*/
|
|
||||||
createNewChat(contactId): Promise<any>
|
|
||||||
{
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
|
|
||||||
// Generate a new id
|
|
||||||
const chatId = FuseUtils.generateGUID();
|
|
||||||
|
|
||||||
// Prepare the chat object
|
|
||||||
const chat = {
|
|
||||||
id : chatId,
|
|
||||||
dialog: []
|
|
||||||
};
|
|
||||||
|
|
||||||
// Prepare the chat list entry
|
|
||||||
const chatListItem = {
|
|
||||||
chatId : chatId,
|
|
||||||
contactId : contactId,
|
|
||||||
lastMessageTime: '2017-02-18T10:30:18.931Z'
|
|
||||||
};
|
|
||||||
|
|
||||||
// Add new chat list item to the user's chat list
|
|
||||||
this.user.chatList.push(chatListItem);
|
|
||||||
|
|
||||||
// Post the created chat to the server
|
|
||||||
this._httpClient.post('api/chat-panel-chats', {...chat})
|
|
||||||
.subscribe(() => {
|
|
||||||
|
|
||||||
// Post the updated user data to the server
|
|
||||||
this._httpClient.post('api/chat-panel-user/' + this.user.id, this.user)
|
|
||||||
.subscribe(() => {
|
|
||||||
|
|
||||||
// Resolve the promise
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
}, reject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the chat
|
|
||||||
*
|
|
||||||
* @param chatId
|
|
||||||
* @param dialog
|
|
||||||
* @returns {Promise<any>}
|
|
||||||
*/
|
|
||||||
updateChat(chatId, dialog): Promise<any>
|
|
||||||
{
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
|
|
||||||
const newData = {
|
|
||||||
id : chatId,
|
|
||||||
dialog: dialog
|
|
||||||
};
|
|
||||||
|
|
||||||
this._httpClient.post('api/chat-panel-chats/' + chatId, newData)
|
|
||||||
.subscribe(updatedChat => {
|
|
||||||
resolve(updatedChat);
|
|
||||||
}, reject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get contacts
|
|
||||||
*
|
|
||||||
* @returns {Promise<any>}
|
|
||||||
*/
|
|
||||||
getContacts(): Promise<any>
|
|
||||||
{
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
this._httpClient.get('api/chat-panel-contacts')
|
|
||||||
.subscribe((response: any) => {
|
|
||||||
resolve(response);
|
|
||||||
}, reject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get user
|
|
||||||
*
|
|
||||||
* @returns {Promise<any>}
|
|
||||||
*/
|
|
||||||
getUser(): Promise<any>
|
|
||||||
{
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
this._httpClient.get('api/chat-panel-user')
|
|
||||||
.subscribe((response: any) => {
|
|
||||||
resolve(response[0]);
|
|
||||||
}, reject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,16 @@
|
|||||||
navbar-horizontal-style-1 {
|
navbar-horizontal-style-1 {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
navbar {
|
||||||
|
|
||||||
|
&.horizontal-style-1 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 56px;
|
||||||
|
max-height: 56px;
|
||||||
|
min-height: 56px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
navbar {
|
navbar {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
import { Component, ElementRef, Input, Renderer2, ViewEncapsulation } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector : 'navbar',
|
selector : 'navbar',
|
||||||
@@ -8,16 +8,46 @@ import { Component, Input, ViewEncapsulation } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class NavbarComponent
|
export class NavbarComponent
|
||||||
{
|
{
|
||||||
// Variant
|
// Private
|
||||||
@Input()
|
_variant: string;
|
||||||
variant;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param {ElementRef} _elementRef
|
||||||
|
* @param {Renderer2} _renderer
|
||||||
*/
|
*/
|
||||||
constructor()
|
constructor(
|
||||||
|
private _elementRef: ElementRef,
|
||||||
|
private _renderer: Renderer2
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Set the defaults
|
// Set the private defaults
|
||||||
this.variant = 'vertical-style-1';
|
this._variant = 'vertical-style-1';
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Accessors
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Variant
|
||||||
|
*/
|
||||||
|
get variant(): string
|
||||||
|
{
|
||||||
|
return this._variant;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
set variant(value: string)
|
||||||
|
{
|
||||||
|
// Remove the old class name
|
||||||
|
this._renderer.removeClass(this._elementRef.nativeElement, this.variant);
|
||||||
|
|
||||||
|
// Store the variant value
|
||||||
|
this._variant = value;
|
||||||
|
|
||||||
|
// Add the new class name
|
||||||
|
this._renderer.addClass(this._elementRef.nativeElement, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +1,65 @@
|
|||||||
@import "src/@fuse/scss/fuse";
|
@import "src/@fuse/scss/fuse";
|
||||||
|
|
||||||
fuse-sidebar {
|
fuse-sidebar {
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
&.folded:not(.unfolded) {
|
&.navbar-fuse-sidebar {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
navbar {
|
&.folded:not(.unfolded) {
|
||||||
|
|
||||||
navbar-vertical-style-1 {
|
navbar {
|
||||||
|
|
||||||
.navbar-top {
|
navbar-vertical-style-1 {
|
||||||
padding: 12px 0;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.buttons {
|
.navbar-top {
|
||||||
display: none;
|
padding: 12px 0;
|
||||||
}
|
justify-content: center;
|
||||||
|
|
||||||
.logo {
|
.buttons {
|
||||||
|
|
||||||
.logo-icon {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-text {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
|
||||||
|
.logo-icon {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-text {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-scroll-container {
|
.navbar-scroll-container {
|
||||||
|
|
||||||
.user {
|
.user {
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
|
|
||||||
.avatar-container {
|
.avatar-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: auto;
|
top: auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
transform: translateX(0);
|
||||||
|
left: auto;
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.username,
|
||||||
|
.email {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.username,
|
.navbar-content {
|
||||||
.email {
|
margin-top: 0;
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-content {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,6 +68,24 @@ fuse-sidebar {
|
|||||||
|
|
||||||
navbar {
|
navbar {
|
||||||
|
|
||||||
|
&.vertical-style-1 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
&.right-navbar {
|
||||||
|
|
||||||
|
.toggle-sidebar-opened {
|
||||||
|
|
||||||
|
mat-icon {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
navbar-vertical-style-1 {
|
navbar-vertical-style-1 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -76,11 +99,13 @@ navbar {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
min-height: 64px;
|
min-height: 64px;
|
||||||
|
max-height: 64px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
padding: 12px 12px 12px 20px;
|
padding: 12px 12px 12px 20px;
|
||||||
|
|
||||||
@include media-breakpoint('xs') {
|
@include media-breakpoint('xs') {
|
||||||
min-height: 56px;
|
min-height: 56px;
|
||||||
|
max-height: 56px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +135,7 @@ navbar {
|
|||||||
|
|
||||||
.navbar-scroll-container {
|
.navbar-scroll-container {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
background: linear-gradient(rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 30%),
|
background: linear-gradient(rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 30%),
|
||||||
linear-gradient(rgba(0, 0, 0, 0.25) 0, rgba(0, 0, 0, 0) 40%);
|
linear-gradient(rgba(0, 0, 0, 0.25) 0, rgba(0, 0, 0, 0) 40%);
|
||||||
@@ -131,6 +157,8 @@ navbar {
|
|||||||
top: 92px;
|
top: 92px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
left: 50%;
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 72px;
|
width: 72px;
|
||||||
@@ -146,14 +174,4 @@ navbar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.right-navbar {
|
|
||||||
|
|
||||||
.toggle-sidebar-opened {
|
|
||||||
|
|
||||||
mat-icon {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,22 +1,25 @@
|
|||||||
@import "src/@fuse/scss/fuse";
|
@import "src/@fuse/scss/fuse";
|
||||||
|
|
||||||
fuse-sidebar {
|
fuse-sidebar {
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
&.folded:not(.unfolded) {
|
&.navbar-fuse-sidebar {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
navbar {
|
&.folded:not(.unfolded) {
|
||||||
|
|
||||||
navbar-vertical-style-2 {
|
navbar {
|
||||||
|
|
||||||
.navbar-header {
|
navbar-vertical-style-2 {
|
||||||
padding: 0 13px;
|
|
||||||
|
|
||||||
.logo {
|
.navbar-header {
|
||||||
|
padding: 0 13px;
|
||||||
|
|
||||||
.logo-text {
|
.logo {
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 200ms ease;
|
.logo-text {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 200ms ease;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,6 +30,24 @@ fuse-sidebar {
|
|||||||
|
|
||||||
navbar {
|
navbar {
|
||||||
|
|
||||||
|
&.vertical-style-2 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
&.right-navbar {
|
||||||
|
|
||||||
|
.toggle-sidebar-opened {
|
||||||
|
|
||||||
|
mat-icon {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
navbar-vertical-style-2 {
|
navbar-vertical-style-2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -65,17 +86,8 @@ navbar {
|
|||||||
.navbar-content {
|
.navbar-content {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.right-navbar {
|
|
||||||
|
|
||||||
.toggle-sidebar-opened {
|
|
||||||
|
|
||||||
mat-icon {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<mat-toolbar class="p-0 mat-elevation-z1">
|
<mat-toolbar class="p-0 mat-elevation-z1">
|
||||||
|
|
||||||
<mat-progress-bar *ngIf="showLoadingBar" class="loading-bar" color="accent" mode="indeterminate"></mat-progress-bar>
|
|
||||||
|
|
||||||
<div fxFlex fxFill fxLayout="row" fxLayoutAlign="start center">
|
<div fxFlex fxFill fxLayout="row" fxLayoutAlign="start center">
|
||||||
|
|
||||||
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
|
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
|
||||||
@@ -83,15 +81,6 @@
|
|||||||
|
|
||||||
<div class="toolbar-separator" fxHide fxShow.gt-xs></div>
|
<div class="toolbar-separator" fxHide fxShow.gt-xs></div>
|
||||||
|
|
||||||
<button mat-icon-button fxHide.gt-md
|
|
||||||
class="chat-panel-toggle-button"
|
|
||||||
(click)="toggleSidebarOpen('chatPanel')"
|
|
||||||
aria-label="Toggle chat panel">
|
|
||||||
<mat-icon class="icon">chat</mat-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="toolbar-separator" fxHide.gt-md></div>
|
|
||||||
|
|
||||||
<button mat-icon-button
|
<button mat-icon-button
|
||||||
class="quick-panel-toggle-button"
|
class="quick-panel-toggle-button"
|
||||||
(click)="toggleSidebarOpen('quickPanel')"
|
(click)="toggleSidebarOpen('quickPanel')"
|
||||||
|
|||||||
@@ -11,17 +11,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mat-toolbar {
|
.mat-toolbar {
|
||||||
|
position: relative;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.loading-bar {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { FuseConfigService } from '@fuse/services/config.service';
|
|||||||
import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service';
|
import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service';
|
||||||
|
|
||||||
import { navigation } from 'app/navigation/navigation';
|
import { navigation } from 'app/navigation/navigation';
|
||||||
import { FuseLoadingBarService } from '@fuse/services/loading-bar.service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector : 'toolbar',
|
selector : 'toolbar',
|
||||||
@@ -24,9 +23,7 @@ export class ToolbarComponent implements OnInit, OnDestroy
|
|||||||
languages: any;
|
languages: any;
|
||||||
navigation: any;
|
navigation: any;
|
||||||
selectedLanguage: any;
|
selectedLanguage: any;
|
||||||
showLoadingBar: boolean;
|
|
||||||
userStatusOptions: any[];
|
userStatusOptions: any[];
|
||||||
chatPanelLockedOpen: string;
|
|
||||||
|
|
||||||
// Private
|
// Private
|
||||||
private _unsubscribeAll: Subject<any>;
|
private _unsubscribeAll: Subject<any>;
|
||||||
@@ -35,13 +32,11 @@ export class ToolbarComponent implements OnInit, OnDestroy
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param {FuseConfigService} _fuseConfigService
|
* @param {FuseConfigService} _fuseConfigService
|
||||||
* @param {FuseLoadingBarService} _fuseLoadingBarService
|
|
||||||
* @param {FuseSidebarService} _fuseSidebarService
|
* @param {FuseSidebarService} _fuseSidebarService
|
||||||
* @param {TranslateService} _translateService
|
* @param {TranslateService} _translateService
|
||||||
*/
|
*/
|
||||||
constructor(
|
constructor(
|
||||||
private _fuseConfigService: FuseConfigService,
|
private _fuseConfigService: FuseConfigService,
|
||||||
private _fuseLoadingBarService: FuseLoadingBarService,
|
|
||||||
private _fuseSidebarService: FuseSidebarService,
|
private _fuseSidebarService: FuseSidebarService,
|
||||||
private _translateService: TranslateService
|
private _translateService: TranslateService
|
||||||
)
|
)
|
||||||
@@ -103,13 +98,6 @@ export class ToolbarComponent implements OnInit, OnDestroy
|
|||||||
*/
|
*/
|
||||||
ngOnInit(): void
|
ngOnInit(): void
|
||||||
{
|
{
|
||||||
// Subscribe to the Fuse loading bar service
|
|
||||||
this._fuseLoadingBarService.visible
|
|
||||||
.pipe(takeUntil(this._unsubscribeAll))
|
|
||||||
.subscribe((visible) => {
|
|
||||||
this.showLoadingBar = visible;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Subscribe to the config changes
|
// Subscribe to the config changes
|
||||||
this._fuseConfigService.config
|
this._fuseConfigService.config
|
||||||
.pipe(takeUntil(this._unsubscribeAll))
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
@@ -147,28 +135,6 @@ export class ToolbarComponent implements OnInit, OnDestroy
|
|||||||
this._fuseSidebarService.getSidebar(key).toggleOpen();
|
this._fuseSidebarService.getSidebar(key).toggleOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleChatPanel(): void
|
|
||||||
{
|
|
||||||
// Get the chat panel sidebar
|
|
||||||
const chatPanelSidebar = this._fuseSidebarService.getSidebar('chatPanel');
|
|
||||||
|
|
||||||
// Store the original value
|
|
||||||
if ( chatPanelSidebar.lockedOpen !== '' )
|
|
||||||
{
|
|
||||||
this.chatPanelLockedOpen = chatPanelSidebar.lockedOpen;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Toggle
|
|
||||||
if ( chatPanelSidebar.lockedOpen === this.chatPanelLockedOpen )
|
|
||||||
{
|
|
||||||
chatPanelSidebar.lockedOpen = '';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
chatPanelSidebar.lockedOpen = this.chatPanelLockedOpen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search
|
* Search
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { MatButtonModule, MatIconModule, MatMenuModule, MatProgressBarModule, MatToolbarModule } from '@angular/material';
|
import { MatButtonModule, MatIconModule, MatMenuModule, MatToolbarModule } from '@angular/material';
|
||||||
|
|
||||||
import { FuseSearchBarModule, FuseShortcutsModule } from '@fuse/components';
|
import { FuseSearchBarModule, FuseShortcutsModule } from '@fuse/components';
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
import { FuseSharedModule } from '@fuse/shared.module';
|
||||||
@@ -16,7 +16,6 @@ import { ToolbarComponent } from 'app/layout/components/toolbar/toolbar.componen
|
|||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
MatMenuModule,
|
MatMenuModule,
|
||||||
MatProgressBarModule,
|
|
||||||
MatToolbarModule,
|
MatToolbarModule,
|
||||||
|
|
||||||
FuseSharedModule,
|
FuseSharedModule,
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<div id="main" [ngClass]="{'boxed':fuseConfig.layout.width === 'boxed'}">
|
<!-- SIDE PANEL -->
|
||||||
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'left'">
|
||||||
|
|
||||||
|
<!-- PANEL CONTENT -->
|
||||||
|
|
||||||
|
</ng-container>
|
||||||
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
<!-- TOOLBAR: Above -->
|
<!-- TOOLBAR: Above -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above'">
|
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above'">
|
||||||
@@ -55,13 +63,13 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- CHAT PANEL -->
|
<!-- SIDE PANEL -->
|
||||||
<fuse-sidebar class="chat-panel" name="chatPanel" position="right"
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'right'">
|
||||||
[folded]="true" [foldedWidth]="70" [foldedAutoTriggerOnHover]="false"
|
|
||||||
lockedOpen="gt-md">
|
<!-- PANEL CONTENT -->
|
||||||
<chat-panel></chat-panel>
|
|
||||||
</fuse-sidebar>
|
</ng-container>
|
||||||
<!-- / CHAT PANEL -->
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
<!-- QUICK PANEL -->
|
<!-- QUICK PANEL -->
|
||||||
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
||||||
@@ -99,7 +107,7 @@
|
|||||||
|
|
||||||
<!-- LEFT NAVBAR -->
|
<!-- LEFT NAVBAR -->
|
||||||
<ng-template #leftNavbar>
|
<ng-template #leftNavbar>
|
||||||
<fuse-sidebar name="navbar"
|
<fuse-sidebar name="navbar" class="navbar-fuse-sidebar"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar [variant]="fuseConfig.layout.navbar.variant"
|
<navbar [variant]="fuseConfig.layout.navbar.variant"
|
||||||
|
|||||||
@@ -16,13 +16,6 @@ horizontal-layout-1 {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
// Boxed
|
|
||||||
&.boxed {
|
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
@include mat-elevation(8);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Container 1
|
// Container 1
|
||||||
> .container {
|
> .container {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -49,6 +42,7 @@ horizontal-layout-1 {
|
|||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
// Content component
|
// Content component
|
||||||
content {
|
content {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { MatSidenavModule } from '@angular/material';
|
|||||||
import { FuseSidebarModule, FuseThemeOptionsModule } from '@fuse/components';
|
import { FuseSidebarModule, FuseThemeOptionsModule } from '@fuse/components';
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
import { FuseSharedModule } from '@fuse/shared.module';
|
||||||
|
|
||||||
import { ChatPanelModule } from 'app/layout/components/chat-panel/chat-panel.module';
|
|
||||||
import { ContentModule } from 'app/layout/components/content/content.module';
|
import { ContentModule } from 'app/layout/components/content/content.module';
|
||||||
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
||||||
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
||||||
@@ -24,7 +23,6 @@ import { HorizontalLayout1Component } from 'app/layout/horizontal/layout-1/layou
|
|||||||
FuseSidebarModule,
|
FuseSidebarModule,
|
||||||
FuseThemeOptionsModule,
|
FuseThemeOptionsModule,
|
||||||
|
|
||||||
ChatPanelModule,
|
|
||||||
ContentModule,
|
ContentModule,
|
||||||
FooterModule,
|
FooterModule,
|
||||||
NavbarModule,
|
NavbarModule,
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<div id="main" [ngClass]="{'boxed':fuseConfig.layout.width === 'boxed'}">
|
<!-- SIDE PANEL -->
|
||||||
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'left'">
|
||||||
|
|
||||||
|
<!-- PANEL CONTENT -->
|
||||||
|
|
||||||
|
</ng-container>
|
||||||
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
<!-- TOOLBAR: Above -->
|
<!-- TOOLBAR: Above -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above'">
|
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above'">
|
||||||
@@ -67,13 +75,13 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- CHAT PANEL -->
|
<!-- SIDE PANEL -->
|
||||||
<fuse-sidebar class="chat-panel" name="chatPanel" position="right"
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'right'">
|
||||||
[folded]="true" [foldedWidth]="70" [foldedAutoTriggerOnHover]="false"
|
|
||||||
lockedOpen="gt-md">
|
<!-- PANEL CONTENT -->
|
||||||
<chat-panel></chat-panel>
|
|
||||||
</fuse-sidebar>
|
</ng-container>
|
||||||
<!-- / CHAT PANEL -->
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
<!-- QUICK PANEL -->
|
<!-- QUICK PANEL -->
|
||||||
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
||||||
@@ -101,7 +109,7 @@
|
|||||||
|
|
||||||
<!-- LEFT NAVBAR -->
|
<!-- LEFT NAVBAR -->
|
||||||
<ng-template #leftNavbar>
|
<ng-template #leftNavbar>
|
||||||
<fuse-sidebar name="navbar"
|
<fuse-sidebar name="navbar" class="navbar-fuse-sidebar"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
lockedOpen="gt-md"
|
lockedOpen="gt-md"
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
@@ -113,7 +121,7 @@
|
|||||||
|
|
||||||
<!-- RIGHT NAVBAR -->
|
<!-- RIGHT NAVBAR -->
|
||||||
<ng-template #rightNavbar>
|
<ng-template #rightNavbar>
|
||||||
<fuse-sidebar name="navbar" position="right"
|
<fuse-sidebar name="navbar" position="right" class="navbar-fuse-sidebar"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
lockedOpen="gt-md"
|
lockedOpen="gt-md"
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
|
|||||||
@@ -16,13 +16,6 @@ vertical-layout-1 {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
// Boxed
|
|
||||||
&.boxed {
|
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
@include mat-elevation(8);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Container 1
|
// Container 1
|
||||||
> .container {
|
> .container {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -49,6 +42,7 @@ vertical-layout-1 {
|
|||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
// Content component
|
// Content component
|
||||||
content {
|
content {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { RouterModule } from '@angular/router';
|
|||||||
import { FuseSidebarModule } from '@fuse/components';
|
import { FuseSidebarModule } from '@fuse/components';
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
import { FuseSharedModule } from '@fuse/shared.module';
|
||||||
|
|
||||||
import { ChatPanelModule } from 'app/layout/components/chat-panel/chat-panel.module';
|
|
||||||
import { ContentModule } from 'app/layout/components/content/content.module';
|
import { ContentModule } from 'app/layout/components/content/content.module';
|
||||||
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
||||||
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
||||||
@@ -23,7 +22,6 @@ import { VerticalLayout1Component } from 'app/layout/vertical/layout-1/layout-1.
|
|||||||
FuseSharedModule,
|
FuseSharedModule,
|
||||||
FuseSidebarModule,
|
FuseSidebarModule,
|
||||||
|
|
||||||
ChatPanelModule,
|
|
||||||
ContentModule,
|
ContentModule,
|
||||||
FooterModule,
|
FooterModule,
|
||||||
NavbarModule,
|
NavbarModule,
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<div id="main" [ngClass]="{'boxed':fuseConfig.layout.width === 'boxed'}">
|
<!-- SIDE PANEL -->
|
||||||
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'left'">
|
||||||
|
|
||||||
|
<!-- PANEL CONTENT -->
|
||||||
|
|
||||||
|
</ng-container>
|
||||||
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
<!-- TOOLBAR: Above fixed -->
|
<!-- TOOLBAR: Above fixed -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above-fixed'">
|
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above-fixed'">
|
||||||
@@ -67,13 +75,13 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- CHAT PANEL -->
|
<!-- SIDE PANEL -->
|
||||||
<fuse-sidebar class="chat-panel" name="chatPanel" position="right"
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'right'">
|
||||||
[folded]="true" [foldedWidth]="70" [foldedAutoTriggerOnHover]="false"
|
|
||||||
lockedOpen="gt-md">
|
<!-- PANEL CONTENT -->
|
||||||
<chat-panel></chat-panel>
|
|
||||||
</fuse-sidebar>
|
</ng-container>
|
||||||
<!-- / CHAT PANEL -->
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
<!-- QUICK PANEL -->
|
<!-- QUICK PANEL -->
|
||||||
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
||||||
@@ -101,7 +109,7 @@
|
|||||||
|
|
||||||
<!-- LEFT NAVBAR -->
|
<!-- LEFT NAVBAR -->
|
||||||
<ng-template #leftNavbar>
|
<ng-template #leftNavbar>
|
||||||
<fuse-sidebar name="navbar"
|
<fuse-sidebar name="navbar" class="navbar-fuse-sidebar"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
lockedOpen="gt-md"
|
lockedOpen="gt-md"
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
@@ -113,7 +121,7 @@
|
|||||||
|
|
||||||
<!-- RIGHT NAVBAR -->
|
<!-- RIGHT NAVBAR -->
|
||||||
<ng-template #rightNavbar>
|
<ng-template #rightNavbar>
|
||||||
<fuse-sidebar name="navbar" position="right"
|
<fuse-sidebar name="navbar" position="right" class="navbar-fuse-sidebar"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
lockedOpen="gt-md"
|
lockedOpen="gt-md"
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
|
|||||||
@@ -16,13 +16,6 @@ vertical-layout-2 {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
// Boxed
|
|
||||||
&.boxed {
|
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
@include mat-elevation(8);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Container 1 (Scrollable)
|
// Container 1 (Scrollable)
|
||||||
> .container {
|
> .container {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -32,6 +25,7 @@ vertical-layout-2 {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
|
|
||||||
// Container 2
|
// Container 2
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { RouterModule } from '@angular/router';
|
|||||||
import { FuseSidebarModule } from '@fuse/components';
|
import { FuseSidebarModule } from '@fuse/components';
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
import { FuseSharedModule } from '@fuse/shared.module';
|
||||||
|
|
||||||
import { ChatPanelModule } from 'app/layout/components/chat-panel/chat-panel.module';
|
|
||||||
import { ContentModule } from 'app/layout/components/content/content.module';
|
import { ContentModule } from 'app/layout/components/content/content.module';
|
||||||
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
||||||
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
||||||
@@ -23,7 +22,6 @@ import { VerticalLayout2Component } from 'app/layout/vertical/layout-2/layout-2.
|
|||||||
FuseSharedModule,
|
FuseSharedModule,
|
||||||
FuseSidebarModule,
|
FuseSidebarModule,
|
||||||
|
|
||||||
ChatPanelModule,
|
|
||||||
ContentModule,
|
ContentModule,
|
||||||
FooterModule,
|
FooterModule,
|
||||||
NavbarModule,
|
NavbarModule,
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<div id="main" [ngClass]="{'boxed':fuseConfig.layout.width === 'boxed'}">
|
<!-- SIDE PANEL -->
|
||||||
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'left'">
|
||||||
|
|
||||||
|
<!-- PANEL CONTENT -->
|
||||||
|
|
||||||
|
</ng-container>
|
||||||
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
<!-- TOOLBAR: Above fixed -->
|
<!-- TOOLBAR: Above fixed -->
|
||||||
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above-fixed'">
|
<ng-container *ngIf="fuseConfig.layout.toolbar.position === 'above-fixed'">
|
||||||
@@ -53,13 +61,13 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- CHAT PANEL -->
|
<!-- SIDE PANEL -->
|
||||||
<fuse-sidebar class="chat-panel" name="chatPanel" position="right"
|
<ng-container *ngIf="!fuseConfig.layout.sidepanel.hidden && fuseConfig.layout.sidepanel.position === 'right'">
|
||||||
[folded]="true" [foldedWidth]="70" [foldedAutoTriggerOnHover]="false"
|
|
||||||
lockedOpen="gt-md">
|
<!-- PANEL CONTENT -->
|
||||||
<chat-panel></chat-panel>
|
|
||||||
</fuse-sidebar>
|
</ng-container>
|
||||||
<!-- / CHAT PANEL -->
|
<!-- / SIDE PANEL -->
|
||||||
|
|
||||||
<!-- QUICK PANEL -->
|
<!-- QUICK PANEL -->
|
||||||
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
<fuse-sidebar name="quickPanel" position="right" class="quick-panel">
|
||||||
@@ -87,7 +95,7 @@
|
|||||||
|
|
||||||
<!-- LEFT NAVBAR -->
|
<!-- LEFT NAVBAR -->
|
||||||
<ng-template #leftNavbar>
|
<ng-template #leftNavbar>
|
||||||
<fuse-sidebar name="navbar"
|
<fuse-sidebar name="navbar" class="navbar-fuse-sidebar"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
lockedOpen="gt-md"
|
lockedOpen="gt-md"
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
@@ -99,7 +107,7 @@
|
|||||||
|
|
||||||
<!-- RIGHT NAVBAR -->
|
<!-- RIGHT NAVBAR -->
|
||||||
<ng-template #rightNavbar>
|
<ng-template #rightNavbar>
|
||||||
<fuse-sidebar name="navbar" position="right"
|
<fuse-sidebar name="navbar" position="right" class="navbar-fuse-sidebar"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
lockedOpen="gt-md"
|
lockedOpen="gt-md"
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
|
|||||||
@@ -16,13 +16,6 @@ vertical-layout-3 {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
// Boxed
|
|
||||||
&.boxed {
|
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
@include mat-elevation(8);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Container 1 (Scrollable)
|
// Container 1 (Scrollable)
|
||||||
> .container {
|
> .container {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -32,6 +25,7 @@ vertical-layout-3 {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
|
|
||||||
// Container 2
|
// Container 2
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { RouterModule } from '@angular/router';
|
|||||||
import { FuseSidebarModule } from '@fuse/components/index';
|
import { FuseSidebarModule } from '@fuse/components/index';
|
||||||
import { FuseSharedModule } from '@fuse/shared.module';
|
import { FuseSharedModule } from '@fuse/shared.module';
|
||||||
|
|
||||||
import { ChatPanelModule } from 'app/layout/components/chat-panel/chat-panel.module';
|
|
||||||
import { ContentModule } from 'app/layout/components/content/content.module';
|
import { ContentModule } from 'app/layout/components/content/content.module';
|
||||||
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
import { FooterModule } from 'app/layout/components/footer/footer.module';
|
||||||
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
import { NavbarModule } from 'app/layout/components/navbar/navbar.module';
|
||||||
@@ -23,7 +22,6 @@ import { VerticalLayout3Component } from 'app/layout/vertical/layout-3/layout-3.
|
|||||||
FuseSharedModule,
|
FuseSharedModule,
|
||||||
FuseSidebarModule,
|
FuseSidebarModule,
|
||||||
|
|
||||||
ChatPanelModule,
|
|
||||||
ContentModule,
|
ContentModule,
|
||||||
FooterModule,
|
FooterModule,
|
||||||
NavbarModule,
|
NavbarModule,
|
||||||
|
|||||||
Reference in New Issue
Block a user