From 434cce25f242c5240e1dd82e1c4ae4d73b08c7af Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 14 Aug 2019 10:53:23 +0200 Subject: [PATCH] layouting (I LIKE BIG BOXES) --- .../apiclient-consumptions.component.ts | 74 ++++++------- .../apiclient-settings-form.component.ts | 100 +++++++++--------- .../apiclient-subscriptions.component.ts | 83 ++++++++------- .../app/PluginManager/plugins.component.ts | 16 ++- .../dashboard/src/app/app.component.html | 9 +- .../dashboard/src/app/app.component.scss | 3 + .../src/app/content-area/main.component.html | 3 +- .../dynamic-loader.component.html | 5 +- .../dynamic-loader.component.scss | 3 + .../dynamic-loader.component.ts | 17 +-- .../app/header-bar/header-bar.component.html | 6 +- .../app/header-bar/header-bar.component.ts | 4 +- .../src/app/sidebar/sidebar.component.html | 3 +- .../src/app/sidebar/sidebar.component.ts | 2 + 14 files changed, 163 insertions(+), 165 deletions(-) diff --git a/src/frontend/dashboard/src/app/ApiClient/apiclient-consumptions.component.ts b/src/frontend/dashboard/src/app/ApiClient/apiclient-consumptions.component.ts index e2a3a50..480536f 100644 --- a/src/frontend/dashboard/src/app/ApiClient/apiclient-consumptions.component.ts +++ b/src/frontend/dashboard/src/app/ApiClient/apiclient-consumptions.component.ts @@ -31,45 +31,47 @@ const fb = !isDevMode() ? window["fb"] : { @Component({ selector: 'consumptions', template: ` -
-
- Consumptions -
- - - - {{entry.message}} - - - +
+
+
+ Consumptions +
+ + + + {{entry.message}} + + + -
- -
-
-
- - UUID - Expiry - Creation - +
+ +
+
+
+ + UUID + Expiry + Creation - - {{line.uid}} - {{line.expiry}} - {{line.created | date}} - - - - - - {{entries.length}} entries - + + {{line.uid}} + {{line.expiry}} + {{line.created | date}} + + + + + + + {{entries.length}} entries + + +
+
+ -
-
` }) diff --git a/src/frontend/dashboard/src/app/ApiClient/apiclient-settings-form.component.ts b/src/frontend/dashboard/src/app/ApiClient/apiclient-settings-form.component.ts index d6e4b27..5f0ba9a 100644 --- a/src/frontend/dashboard/src/app/ApiClient/apiclient-settings-form.component.ts +++ b/src/frontend/dashboard/src/app/ApiClient/apiclient-settings-form.component.ts @@ -17,58 +17,58 @@ const fb = !isDevMode ? window["fb"] : { @Component({ selector: 'settings', template: ` -
-
- Settings -
-
-
-
-
- -
- -
-
- - - - - - - - - - This field is required! - - -
- -
- -
-
- - - - - Valid range 1024 - 65536 - - - - -
+
+
+
+ Settings
-
-
` diff --git a/src/frontend/dashboard/src/app/ApiClient/apiclient-subscriptions.component.ts b/src/frontend/dashboard/src/app/ApiClient/apiclient-subscriptions.component.ts index 1eec5b3..3508009 100644 --- a/src/frontend/dashboard/src/app/ApiClient/apiclient-subscriptions.component.ts +++ b/src/frontend/dashboard/src/app/ApiClient/apiclient-subscriptions.component.ts @@ -32,46 +32,49 @@ const fb = !isDevMode() ? window["fb"] : { @Component({ selector: 'subscriptions', template: ` -
-
- Subscriptions -
- - - - {{entry.message}} - - - - -
- -
-
-
- - UUID - Expiry - Creation - - - - {{line.uid}} - {{line.expiry}} - {{line.created | date}} - - - - - - {{entries.length}} entries - -
-
- +
+
+
+ Subscriptions +
+ + + + {{entry.message}} + + + + +
+ +
+
+
+ + UUID + Expiry + Creation + + + {{line.uid}} + {{line.expiry}} + {{line.created | date}} + + + + + + + {{entries.length}} entries + + +
+
+ +
` }) diff --git a/src/frontend/dashboard/src/app/PluginManager/plugins.component.ts b/src/frontend/dashboard/src/app/PluginManager/plugins.component.ts index 99a47a7..0bb93ad 100644 --- a/src/frontend/dashboard/src/app/PluginManager/plugins.component.ts +++ b/src/frontend/dashboard/src/app/PluginManager/plugins.component.ts @@ -26,15 +26,13 @@ declare const fb {{entry.name}} -
- - - - - -
+ + + + +
diff --git a/src/frontend/dashboard/src/app/app.component.html b/src/frontend/dashboard/src/app/app.component.html index 709f08f..a9c930a 100644 --- a/src/frontend/dashboard/src/app/app.component.html +++ b/src/frontend/dashboard/src/app/app.component.html @@ -1,8 +1,5 @@ -
+ -
- - -
-
\ No newline at end of file + + diff --git a/src/frontend/dashboard/src/app/app.component.scss b/src/frontend/dashboard/src/app/app.component.scss index e69de29..b3c8c89 100644 --- a/src/frontend/dashboard/src/app/app.component.scss +++ b/src/frontend/dashboard/src/app/app.component.scss @@ -0,0 +1,3 @@ +.heightmax{ + height: 100% +} \ No newline at end of file diff --git a/src/frontend/dashboard/src/app/content-area/main.component.html b/src/frontend/dashboard/src/app/content-area/main.component.html index 786f275..717dc5e 100644 --- a/src/frontend/dashboard/src/app/content-area/main.component.html +++ b/src/frontend/dashboard/src/app/content-area/main.component.html @@ -1,4 +1,3 @@ - -
+
diff --git a/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.html b/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.html index 070e254..7220eed 100644 --- a/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.html +++ b/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.html @@ -1,3 +1,4 @@ -
- +
+ +
\ No newline at end of file diff --git a/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.scss b/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.scss index e69de29..878d184 100644 --- a/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.scss +++ b/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.scss @@ -0,0 +1,3 @@ +.heightmax{ + height: 100%!important; +} \ No newline at end of file diff --git a/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.ts b/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.ts index b9897db..9d100e2 100644 --- a/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.ts +++ b/src/frontend/dashboard/src/app/dynamic-loader/dynamic-loader.component.ts @@ -35,7 +35,7 @@ SystemJS.set('frontblock-generic/Types', SystemJS.newModule(frontblockGenericTyp SystemJS.config({ meta: { '*': { authorization: true } } }); /** --------- */ -import { AfterViewInit, Component } from '@angular/core'; +import { AfterViewInit, Component, ViewChild } from '@angular/core'; import { SidebarComponent } from '../sidebar/sidebar.component'; import { Router } from '@angular/router'; import { FrontendPlugin, SidebarEntries, SidebarEntry } from "frontblock-generic/Plugin" @@ -54,25 +54,16 @@ const fb = environment.production ? window["fb"] : { styleUrls: ['./dynamic-loader.component.scss'] }) export class DynamicLoaderComponent implements AfterViewInit { - sidebar: SidebarComponent + @ViewChild(SidebarComponent, {static:false}) + private sidebar:SidebarComponent constructor( private router: Router, - private sidebarService: SidebarEntryService ) { } ngAfterViewInit() { - const _this = this; - (function awaitSidebar() { - const sb = _this.sidebarService.getSidebar() - if (sb != null) { - _this.sidebar = sb - _this.loadWidgets() - return - } - setTimeout(awaitSidebar, 25) - })() + this.loadWidgets() } private async loadWidgets() { diff --git a/src/frontend/dashboard/src/app/header-bar/header-bar.component.html b/src/frontend/dashboard/src/app/header-bar/header-bar.component.html index 1372a16..258258d 100644 --- a/src/frontend/dashboard/src/app/header-bar/header-bar.component.html +++ b/src/frontend/dashboard/src/app/header-bar/header-bar.component.html @@ -1,4 +1,4 @@ -
+
Frontblock @@ -6,7 +6,7 @@ -
+ diff --git a/src/frontend/dashboard/src/app/header-bar/header-bar.component.ts b/src/frontend/dashboard/src/app/header-bar/header-bar.component.ts index d3310d0..6dda03f 100644 --- a/src/frontend/dashboard/src/app/header-bar/header-bar.component.ts +++ b/src/frontend/dashboard/src/app/header-bar/header-bar.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, isDevMode } from '@angular/core'; @Component({ selector: 'header-bar', @@ -6,7 +6,7 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./header-bar.component.scss'] }) export class HeaderBarComponent implements OnInit { - + devmode = isDevMode()?"{ DEV }":"" constructor() { } ngOnInit() { diff --git a/src/frontend/dashboard/src/app/sidebar/sidebar.component.html b/src/frontend/dashboard/src/app/sidebar/sidebar.component.html index 8caf06a..7170ac0 100644 --- a/src/frontend/dashboard/src/app/sidebar/sidebar.component.html +++ b/src/frontend/dashboard/src/app/sidebar/sidebar.component.html @@ -1,4 +1,4 @@ - + {{e.text}} @@ -16,5 +16,4 @@ {{entry.text}} - \ No newline at end of file diff --git a/src/frontend/dashboard/src/app/sidebar/sidebar.component.ts b/src/frontend/dashboard/src/app/sidebar/sidebar.component.ts index 715a058..50a9c3e 100644 --- a/src/frontend/dashboard/src/app/sidebar/sidebar.component.ts +++ b/src/frontend/dashboard/src/app/sidebar/sidebar.component.ts @@ -9,6 +9,8 @@ import { environment } from 'src/environments/environment'; }) export class SidebarComponent implements OnInit { + collapsed = true + entries:SidebarEntry[] = [ ]