Merge branch 'master' into skeleton
|
@ -1,6 +1,12 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { FuseSplashScreenService } from './core/services/splash-screen.service';
|
import { FuseSplashScreenService } from './core/services/splash-screen.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { FuseTranslationLoaderService } from './core/services/translation-loader.service';
|
||||||
|
|
||||||
|
import { FuseNavigationService } from './core/components/navigation/navigation.service';
|
||||||
|
import { FuseNavigationModel } from './navigation/navigation.model';
|
||||||
|
import { locale as navigationEnglish } from './navigation/i18n/en';
|
||||||
|
import { locale as navigationTurkish } from './navigation/i18n/tr';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector : 'fuse-root',
|
selector : 'fuse-root',
|
||||||
|
@ -10,8 +16,10 @@ import { TranslateService } from '@ngx-translate/core';
|
||||||
export class AppComponent
|
export class AppComponent
|
||||||
{
|
{
|
||||||
constructor(
|
constructor(
|
||||||
|
private fuseNavigationService: FuseNavigationService,
|
||||||
private fuseSplashScreen: FuseSplashScreenService,
|
private fuseSplashScreen: FuseSplashScreenService,
|
||||||
private translate: TranslateService
|
private translate: TranslateService,
|
||||||
|
private translationLoader: FuseTranslationLoaderService
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Add languages
|
// Add languages
|
||||||
|
@ -22,5 +30,11 @@ export class AppComponent
|
||||||
|
|
||||||
// Use a language
|
// Use a language
|
||||||
this.translate.use('en');
|
this.translate.use('en');
|
||||||
|
|
||||||
|
// Set the navigation model
|
||||||
|
this.fuseNavigationService.setNavigationModel(new FuseNavigationModel());
|
||||||
|
|
||||||
|
// Set the navigation translations
|
||||||
|
this.translationLoader.loadTranslations(navigationEnglish, navigationTurkish);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { HttpModule } from '@angular/http';
|
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
@ -27,7 +26,6 @@ const appRoutes: Routes = [
|
||||||
],
|
],
|
||||||
imports : [
|
imports : [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
HttpModule,
|
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
RouterModule.forRoot(appRoutes),
|
RouterModule.forRoot(appRoutes),
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<a class="nav-link" matRipple>
|
<a class="nav-link" matRipple>
|
||||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||||
<span class="nav-link-title">{{item.title}}</span>
|
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||||
|
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||||
|
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||||
|
{{item.badge.title}}
|
||||||
|
</span>
|
||||||
<mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon>
|
<mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active"
|
<a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active"
|
||||||
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
|
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
|
||||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||||
<span class="nav-link-title">{{item.title}}</span>
|
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||||
<span class="nav-link-badge" *ngIf="item.badge"
|
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||||
{{item.badge.title}}
|
{{item.badge.title}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple>
|
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple>
|
||||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||||
<span class="nav-link-title">{{item.title}}</span>
|
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||||
<span class="nav-link-badge" *ngIf="item.badge"
|
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||||
{{item.badge.title}}
|
{{item.badge.title}}
|
||||||
</span>
|
</span>
|
||||||
|
|
5
src/app/core/components/navigation/navigation.model.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
export interface FuseNavigationModelInterface
|
||||||
|
{
|
||||||
|
model: any[];
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { EventEmitter, Injectable } from '@angular/core';
|
import { EventEmitter, Injectable } from '@angular/core';
|
||||||
import { NavigationModel } from '../../../navigation.model';
|
|
||||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||||
|
import { FuseNavigationModelInterface } from './navigation.model';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FuseNavigationService
|
export class FuseNavigationService
|
||||||
|
@ -8,13 +8,11 @@ export class FuseNavigationService
|
||||||
onNavCollapseToggle = new EventEmitter<any>();
|
onNavCollapseToggle = new EventEmitter<any>();
|
||||||
onNavCollapseToggled = new EventEmitter<any>();
|
onNavCollapseToggled = new EventEmitter<any>();
|
||||||
onNavigationModelChange: BehaviorSubject<any> = new BehaviorSubject({});
|
onNavigationModelChange: BehaviorSubject<any> = new BehaviorSubject({});
|
||||||
navigationModel: NavigationModel;
|
navigationModel: FuseNavigationModelInterface;
|
||||||
flatNavigation: any[] = [];
|
flatNavigation: any[] = [];
|
||||||
|
|
||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
this.navigationModel = new NavigationModel();
|
|
||||||
this.onNavigationModelChange.next(this.navigationModel.model);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -155,8 +153,15 @@ export class FuseNavigationService
|
||||||
*/
|
*/
|
||||||
getFlatNavigation(navigationItems?)
|
getFlatNavigation(navigationItems?)
|
||||||
{
|
{
|
||||||
|
// If navigation items not provided,
|
||||||
|
// that means we are running the function
|
||||||
|
// for the first time...
|
||||||
if ( !navigationItems )
|
if ( !navigationItems )
|
||||||
{
|
{
|
||||||
|
// Reset the flat navigation
|
||||||
|
this.flatNavigation = [];
|
||||||
|
|
||||||
|
// Get the entire navigation model
|
||||||
navigationItems = this.navigationModel.model;
|
navigationItems = this.navigationModel.model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +186,10 @@ export class FuseNavigationService
|
||||||
|
|
||||||
if ( navItem.type === 'collapse' || navItem.type === 'group' )
|
if ( navItem.type === 'collapse' || navItem.type === 'group' )
|
||||||
{
|
{
|
||||||
this.getFlatNavigation(navItem.children);
|
if ( navItem.children )
|
||||||
|
{
|
||||||
|
this.getFlatNavigation(navItem.children);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
<a class="nav-link" matRipple (click)="toggleOpen($event)">
|
<a class="nav-link" matRipple (click)="toggleOpen($event)">
|
||||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||||
<span class="nav-link-title">{{item.title}}</span>
|
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||||
|
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||||
|
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||||
|
{{item.badge.title}}
|
||||||
|
</span>
|
||||||
<mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon>
|
<mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="children" [@slideInOut]="isOpen">
|
<div class="children" [@slideInOut]="isOpen">
|
||||||
<ng-container *ngFor="let item of item.children">
|
<ng-container *ngFor="let item of item.children">
|
||||||
<fuse-nav-vertical-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-vertical-item>
|
<fuse-nav-vertical-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-vertical-item>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<div class="group-title">
|
<div class="group-title">
|
||||||
<span class="hint-text">{{ item.title }}</span>
|
<span class="hint-text" [translate]="item.translate">{{ item.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="group-items">
|
<div class="group-items">
|
||||||
<ng-container *ngFor="let item of item.children">
|
<ng-container *ngFor="let item of item.children">
|
||||||
<fuse-nav-vertical-group *ngIf="item.type=='group'" [item]="item"></fuse-nav-vertical-group>
|
<fuse-nav-vertical-group *ngIf="item.type=='group'" [item]="item"></fuse-nav-vertical-group>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active"
|
<a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active"
|
||||||
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
|
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
|
||||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||||
<span class="nav-link-title">{{item.title}}</span>
|
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||||
<span class="nav-link-badge" *ngIf="item.badge"
|
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||||
{{item.badge.title}}
|
{{item.badge.title}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple>
|
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple>
|
||||||
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
|
||||||
<span class="nav-link-title">{{item.title}}</span>
|
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
|
||||||
<span class="nav-link-badge" *ngIf="item.badge"
|
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
|
||||||
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
|
||||||
{{item.badge.title}}
|
{{item.badge.title}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { CommonModule } from '@angular/common';
|
||||||
import { MaterialModule } from './material.module';
|
import { MaterialModule } from './material.module';
|
||||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||||
import { ColorPickerModule } from 'ngx-color-picker';
|
import { ColorPickerModule } from 'ngx-color-picker';
|
||||||
import { NgxDnDModule } from '@withinpixels/ngx-dnd';
|
import { NgxDnDModule } from '@swimlane/ngx-dnd';
|
||||||
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
||||||
|
|
||||||
import { FuseMatSidenavHelperDirective, FuseMatSidenavTogglerDirective } from '../directives/fuse-mat-sidenav-helper/fuse-mat-sidenav-helper.directive';
|
import { FuseMatSidenavHelperDirective, FuseMatSidenavTogglerDirective } from '../directives/fuse-mat-sidenav-helper/fuse-mat-sidenav-helper.directive';
|
||||||
|
|
|
@ -47,14 +47,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link-badge {
|
.nav-link-badge {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px;
|
|
||||||
padding: 0 7px;
|
padding: 0 7px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
transition: opacity 0.2s ease-in-out 0.1s;
|
transition: opacity 0.2s ease-in-out 0.1s;
|
||||||
|
margin-left: 8px;
|
||||||
|
|
||||||
|
+ .collapse-arrow {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
@ -3,20 +3,21 @@
|
||||||
.color-picker {
|
.color-picker {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
|
|
||||||
@include mat-elevation(4);
|
@include mat-elevation(4);
|
||||||
|
|
||||||
.preset-area {
|
.preset-area {
|
||||||
//padding: 4px 15px;
|
padding: 0 0 16px 16px !important;
|
||||||
padding: 0 0 12px 12px !important;
|
|
||||||
height: 140px;
|
height: 140px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
> hr {
|
> hr {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preset-label {
|
.preset-label {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.preset-color {
|
.preset-color {
|
||||||
|
@ -25,7 +26,8 @@
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
border-radius: 0 !important;
|
border-radius: 0 !important;
|
||||||
&:nth-child(14n+3) {
|
|
||||||
|
&:nth-child(14n+1) {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
24
src/app/navigation/i18n/en.ts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
export const locale = {
|
||||||
|
lang: 'en',
|
||||||
|
data: {
|
||||||
|
'NAV': {
|
||||||
|
'APPLICATIONS': 'Applications',
|
||||||
|
'DASHBOARDS' : 'Dashboards',
|
||||||
|
'CALENDAR' : 'Calendar',
|
||||||
|
'ECOMMERCE' : 'E-Commerce',
|
||||||
|
'MAIL' : {
|
||||||
|
'TITLE': 'Mail',
|
||||||
|
'BADGE': '25'
|
||||||
|
},
|
||||||
|
'MAIL_NGRX' : {
|
||||||
|
'TITLE': 'Mail Ngrx',
|
||||||
|
'BADGE': '13'
|
||||||
|
},
|
||||||
|
'CHAT' : 'Chat',
|
||||||
|
'FILE_MANAGER': 'File Manager',
|
||||||
|
'CONTACTS' : 'Contacts',
|
||||||
|
'TODO' : 'To-Do',
|
||||||
|
'SCRUMBOARD' : 'Scrumboard'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
24
src/app/navigation/i18n/tr.ts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
export const locale = {
|
||||||
|
lang: 'tr',
|
||||||
|
data: {
|
||||||
|
'NAV': {
|
||||||
|
'APPLICATIONS': 'Programlar',
|
||||||
|
'DASHBOARDS' : 'Kontrol Paneli',
|
||||||
|
'CALENDAR' : 'Takvim',
|
||||||
|
'ECOMMERCE' : 'E-Ticaret',
|
||||||
|
'MAIL' : {
|
||||||
|
'TITLE': 'Posta',
|
||||||
|
'BADGE': '15'
|
||||||
|
},
|
||||||
|
'MAIL_NGRX' : {
|
||||||
|
'TITLE': 'Posta Ngrx',
|
||||||
|
'BADGE': '13'
|
||||||
|
},
|
||||||
|
'CHAT' : 'Sohbet',
|
||||||
|
'FILE_MANAGER': 'Dosya Yöneticisi',
|
||||||
|
'CONTACTS' : 'Kişiler',
|
||||||
|
'TODO' : 'Yapılacaklar',
|
||||||
|
'SCRUMBOARD' : 'Proje'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,4 +1,6 @@
|
||||||
export class NavigationModel
|
import { FuseNavigationModelInterface } from '../core/components/navigation/navigation.model';
|
||||||
|
|
||||||
|
export class FuseNavigationModel implements FuseNavigationModelInterface
|
||||||
{
|
{
|
||||||
public model: any[];
|
public model: any[];
|
||||||
|
|
||||||
|
@ -8,16 +10,19 @@ export class NavigationModel
|
||||||
{
|
{
|
||||||
'id' : 'applications',
|
'id' : 'applications',
|
||||||
'title' : 'Applications',
|
'title' : 'Applications',
|
||||||
|
'translate': 'NAV.APPLICATIONS',
|
||||||
'type' : 'group',
|
'type' : 'group',
|
||||||
'children': [
|
'children': [
|
||||||
{
|
{
|
||||||
'id' : 'sample',
|
'id' : 'sample',
|
||||||
'title': 'Sample',
|
'title': 'Sample',
|
||||||
|
'translate': 'NAV.MAIL.TITLE',
|
||||||
'type' : 'item',
|
'type' : 'item',
|
||||||
'icon' : 'email',
|
'icon' : 'email',
|
||||||
'url' : '/sample',
|
'url' : '/sample',
|
||||||
'badge': {
|
'badge': {
|
||||||
'title': 25,
|
'title': 25,
|
||||||
|
'translate': 'NAV.MAIL.BADGE',
|
||||||
'bg' : '#F44336',
|
'bg' : '#F44336',
|
||||||
'fg' : '#FFFFFF'
|
'fg' : '#FFFFFF'
|
||||||
}
|
}
|
Before Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 125 KiB |
BIN
src/assets/images/backgrounds/autumn.jpg
Normal file
After Width: | Height: | Size: 250 KiB |
BIN
src/assets/images/backgrounds/dark-material-bg.jpg
Normal file
After Width: | Height: | Size: 385 KiB |
Before Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 146 KiB |
BIN
src/assets/images/backgrounds/spring.jpg
Normal file
After Width: | Height: | Size: 363 KiB |
BIN
src/assets/images/backgrounds/summer.jpg
Normal file
After Width: | Height: | Size: 274 KiB |
BIN
src/assets/images/backgrounds/winter.jpg
Normal file
After Width: | Height: | Size: 280 KiB |