diff --git a/src/app/fuse-fake-db/fuse-fake-db.service.ts b/src/app/fuse-fake-db/fuse-fake-db.service.ts index a2126885..ae14d596 100644 --- a/src/app/fuse-fake-db/fuse-fake-db.service.ts +++ b/src/app/fuse-fake-db/fuse-fake-db.service.ts @@ -9,6 +9,7 @@ import { ContactsFakeDb } from './contacts'; import { InvoiceFakeDb } from './invoice'; import { FileManagerFakeDb } from './file-manager'; import { SearchFakeDb } from './search'; +import { QuickPanelFakeDb } from './quick-panel'; import { IconsFakeDb } from './icons'; export class FuseFakeDbService implements InMemoryDbService @@ -36,6 +37,8 @@ export class FuseFakeDbService implements InMemoryDbService 'file-manager' : FileManagerFakeDb.files, 'search-classic' : SearchFakeDb.classic, 'search-table' : SearchFakeDb.table, + 'quick-panel-notes' : QuickPanelFakeDb.notes, + 'quick-panel-events' : QuickPanelFakeDb.events, 'icons' : IconsFakeDb.icons }; } diff --git a/src/app/fuse-fake-db/quick-panel.ts b/src/app/fuse-fake-db/quick-panel.ts new file mode 100644 index 00000000..81c89e66 --- /dev/null +++ b/src/app/fuse-fake-db/quick-panel.ts @@ -0,0 +1,32 @@ +export class QuickPanelFakeDb +{ + public static notes = [ + { + 'title' : 'Best songs to listen while working', + 'detail': 'Last edit: May 8th, 2015' + }, + { + 'title' : 'Useful subreddits', + 'detail': 'Last edit: January 12th, 2015' + } + ]; + + public static events = [ + { + 'title' : 'Group Meeting', + 'detail': 'In 32 Minutes, Room 1B' + }, + { + 'title' : 'Public Beta Release', + 'detail': '11:00 PM' + }, + { + 'title' : 'Dinner with David', + 'detail': '17:30 PM' + }, + { + 'title' : 'Q&A Session', + 'detail': '20:30 PM' + } + ]; +} diff --git a/src/app/main/main.component.html b/src/app/main/main.component.html index 330addb2..4d334600 100644 --- a/src/app/main/main.component.html +++ b/src/app/main/main.component.html @@ -44,7 +44,7 @@ - quick-panel + diff --git a/src/app/main/main.module.ts b/src/app/main/main.module.ts index 6f298957..2232b565 100644 --- a/src/app/main/main.module.ts +++ b/src/app/main/main.module.ts @@ -8,6 +8,7 @@ import { FuseNavbarComponent } from './navbar/navbar.component'; import { FuseToolbarComponent } from './toolbar/toolbar.component'; import { FuseNavigationModule } from '../core/components/navigation/navigation.module'; import { FuseNavbarToggleDirective } from './navbar/navbar-toggle.directive'; +import { QuickPanelComponent } from './quick-panel/quick-panel.component'; @NgModule({ declarations: [ @@ -16,7 +17,8 @@ import { FuseNavbarToggleDirective } from './navbar/navbar-toggle.directive'; FuseMainComponent, FuseNavbarComponent, FuseToolbarComponent, - FuseNavbarToggleDirective + FuseNavbarToggleDirective, + QuickPanelComponent ], imports : [ SharedModule, diff --git a/src/app/main/quick-panel/quick-panel.component.html b/src/app/main/quick-panel/quick-panel.component.html new file mode 100644 index 00000000..96ca90ec --- /dev/null +++ b/src/app/main/quick-panel/quick-panel.component.html @@ -0,0 +1,69 @@ + + +

+ Today +

+ +
+
+ {{date | date:'EEEE'}} +
+
+ {{date | date:'d'}} + th + {{date | date:'MMMM'}} +
+
+
+ + + + +

+ Events +

+ + +

{{event.title}}

+

{{event.detail}}

+
+
+ + + + +

+ Notes +

+ + +

{{note.title}}

+

{{note.detail}}

+
+
+ + + + +

+ Quick Settings +

+ + + +

Notifications

+
+
+ + + +

Cloud Sync

+
+
+ + + +

Retro Thrusters

+
+
+
diff --git a/src/app/main/quick-panel/quick-panel.component.scss b/src/app/main/quick-panel/quick-panel.component.scss new file mode 100644 index 00000000..adf1239c --- /dev/null +++ b/src/app/main/quick-panel/quick-panel.component.scss @@ -0,0 +1,12 @@ +fuse-quick-panel { + display: flex; + width: 330px; + min-width: 330px; + max-width: 330px; + z-index: 99; + flex-direction: column; + + .mat-slide-toggle-content { + flex: 1; + } +} diff --git a/src/app/main/quick-panel/quick-panel.component.ts b/src/app/main/quick-panel/quick-panel.component.ts new file mode 100644 index 00000000..e353c555 --- /dev/null +++ b/src/app/main/quick-panel/quick-panel.component.ts @@ -0,0 +1,42 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { Http } from '@angular/http'; + +@Component({ + selector : 'fuse-quick-panel', + templateUrl : './quick-panel.component.html', + styleUrls : ['./quick-panel.component.scss'], + encapsulation: ViewEncapsulation.None +}) +export class QuickPanelComponent implements OnInit +{ + date: Date; + settings: any; + notes: any[]; + events: any[]; + + constructor(private http: Http) + { + this.date = new Date(); + this.settings = { + notify: true, + cloud : false, + retro : true + }; + + } + + ngOnInit() + { + this.http.get('api/quick-panel-notes') + .subscribe(response => { + this.notes = response.json().data; + }); + + this.http.get('api/quick-panel-events') + .subscribe(response => { + this.events = response.json().data; + }); + + } + +}