From fb2dcc065354dee80a3ce52d870755d65adda914 Mon Sep 17 00:00:00 2001 From: mustafahlvc Date: Mon, 31 Jul 2017 16:32:29 +0300 Subject: [PATCH 1/2] Width, height percentage class helpers added. --- src/app/core/scss/partials/_helpers.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/core/scss/partials/_helpers.scss b/src/app/core/scss/partials/_helpers.scss index f4c12ed2..50b87164 100644 --- a/src/app/core/scss/partials/_helpers.scss +++ b/src/app/core/scss/partials/_helpers.scss @@ -13,6 +13,16 @@ max-#{$prop}: $length !important; } } + + // Percentage + @for $i from 0 through 20 { + $i-p: 5 * $i; + $size-p: 5% * $i; + + .#{$abbrev}-#{$i-p}-p { + #{$prop}: $size-p !important; + } + } } // ###################### From 3c4cc440459ab1fd49fac817f9ca1b67c45ab03a Mon Sep 17 00:00:00 2001 From: mustafahlvc Date: Mon, 31 Jul 2017 16:32:58 +0300 Subject: [PATCH 2/2] Some works on toolbar --- .../layout/toolbar/toolbar.component.html | 90 +++++++++++++++++-- .../layout/toolbar/toolbar.component.scss | 21 +++++ .../layout/toolbar/toolbar.component.ts | 68 +++++++++++++- 3 files changed, 170 insertions(+), 9 deletions(-) diff --git a/src/app/core/components/layout/toolbar/toolbar.component.html b/src/app/core/components/layout/toolbar/toolbar.component.html index fa571c5c..d59b9b02 100644 --- a/src/app/core/components/layout/toolbar/toolbar.component.html +++ b/src/app/core/components/layout/toolbar/toolbar.component.html @@ -1,13 +1,87 @@ - + - +
- Toolbar +
- + +
+ +
Shortcuts
+
+ +
+ + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +
+
diff --git a/src/app/core/components/layout/toolbar/toolbar.component.scss b/src/app/core/components/layout/toolbar/toolbar.component.scss index e69de29b..3b9d779d 100644 --- a/src/app/core/components/layout/toolbar/toolbar.component.scss +++ b/src/app/core/components/layout/toolbar/toolbar.component.scss @@ -0,0 +1,21 @@ +:host { + + .loading-spinner { + width: 32px; + height: 32px; + } + + .user-button, + .search-button, + .language-button, + .quick-panel-toggle-button { + min-width: 64px; + height: 64px; + } + + .toolbar-separator { + height: 64px; + width: 1px; + background: rgba(0, 0, 0, .12); + } +} diff --git a/src/app/core/components/layout/toolbar/toolbar.component.ts b/src/app/core/components/layout/toolbar/toolbar.component.ts index 128daaec..f767ffea 100644 --- a/src/app/core/components/layout/toolbar/toolbar.component.ts +++ b/src/app/core/components/layout/toolbar/toolbar.component.ts @@ -1,4 +1,5 @@ import { Component } from '@angular/core'; +import { NavigationEnd, NavigationStart, Router } from '@angular/router'; @Component({ selector : 'fuse-toolbar', @@ -8,7 +9,72 @@ import { Component } from '@angular/core'; export class FuseToolbarComponent { - constructor() + userStatusOptions: any[]; + languages: any; + selectedLanguage: any; + showSpinner: boolean; + + constructor(private router: Router) { + + this.userStatusOptions = [ + { + 'title': 'Online', + 'icon' : 'icon-checkbox-marked-circle', + 'color': '#4CAF50' + }, + { + 'title': 'Away', + 'icon' : 'icon-clock', + 'color': '#FFC107' + }, + { + 'title': 'Do not Disturb', + 'icon' : 'icon-minus-circle', + 'color': '#F44336' + }, + { + 'title': 'Invisible', + 'icon' : 'icon-checkbox-blank-circle-outline', + 'color': '#BDBDBD' + }, + { + 'title': 'Offline', + 'icon' : 'icon-checkbox-blank-circle-outline', + 'color': '#616161' + } + ]; + + this.languages = [ + { + 'id' : 'en', + 'title': 'English', + 'flag' : 'us' + }, + { + 'id' : 'es', + 'title': 'Spanish', + 'flag' : 'es' + }, + { + 'id' : 'tr', + 'title': 'Turkish', + 'flag' : 'tr' + } + ]; + + this.selectedLanguage = this.languages[0]; + + router.events.subscribe( + (event) => { + if ( event instanceof NavigationStart ) + { + this.showSpinner = true; + } + if ( event instanceof NavigationEnd ) + { + this.showSpinner = false; + } + }); } }