This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch STREAMPIPES-145 in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 9a86406deaaaa12dce71d385647ee6ed59319493 Author: Dominik Riemer <[email protected]> AuthorDate: Fri Jul 31 22:48:40 2020 +0200 [STREAMPIPES-145] Improve CSS theming --- ui/angular.json | 2 +- ui/src/app/add/add.controller.ts | 3 +- .../add-endpoint/add-endpoint.controller.ts | 4 +- .../endpoint-installation.controller.ts | 4 +- ui/src/app/applinks/applinks.controller.ts | 4 +- .../components/pipeline/pipeline.component.ts | 2 - ui/src/scss/main.scss | 4 +- ui/src/scss/sp/buttons.scss | 2 +- ui/src/scss/sp/sp-theme.scss | 79 ++++++++++++++++++++++ 9 files changed, 95 insertions(+), 9 deletions(-) diff --git a/ui/angular.json b/ui/angular.json index 0b1fd67..d2d34ea 100644 --- a/ui/angular.json +++ b/ui/angular.json @@ -26,7 +26,7 @@ } ], "styles": [ - "src/scss/main.scss", + "src/scss/main.scss" ], "scripts": [ "node_modules/systemjs/dist/system.js", diff --git a/ui/src/app/add/add.controller.ts b/ui/src/app/add/add.controller.ts index 17844eb..eb11da1 100644 --- a/ui/src/app/add/add.controller.ts +++ b/ui/src/app/add/add.controller.ts @@ -19,12 +19,13 @@ import {AddEndpointController} from './dialogs/add-endpoint/add-endpoint.controller'; import {EndpointInstallationController} from './dialogs/endpoint-installation/endpoint-installation.controller'; import * as angular from 'angular'; +import {RestApi} from "../services/rest-api.service"; declare const require: any; export class AddCtrl { - RestApi: any; + RestApi: RestApi; $mdDialog: any; ElementIconText: any; elements: any; diff --git a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.controller.ts b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.controller.ts index bec800b..7648553 100644 --- a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.controller.ts +++ b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.controller.ts @@ -16,10 +16,12 @@ * */ +import {RestApi} from "../../../services/rest-api.service"; + export class AddEndpointController { $mdDialog: any; - RestApi: any; + RestApi: RestApi; rdfEndpoints: any; addSelected: any; newEndpoint: any; diff --git a/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.controller.ts b/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.controller.ts index 16836f6..2f53911 100644 --- a/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.controller.ts +++ b/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.controller.ts @@ -16,10 +16,12 @@ * */ +import {RestApi} from "../../../services/rest-api.service"; + export class EndpointInstallationController { $mdDialog: any; - RestApi: any; + RestApi: RestApi; endpointItems : any; install: any; endpointItemsToInstall: any; diff --git a/ui/src/app/applinks/applinks.controller.ts b/ui/src/app/applinks/applinks.controller.ts index 77d12ea..0c5f8b3 100644 --- a/ui/src/app/applinks/applinks.controller.ts +++ b/ui/src/app/applinks/applinks.controller.ts @@ -16,9 +16,11 @@ * */ +import {RestApi} from "../services/rest-api.service"; + export class AppLinksCtrl { - RestApi: any; + RestApi: RestApi; $window: any; applicationLinks: any; diff --git a/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts b/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts index dafc62e..bcdfcb6 100644 --- a/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts +++ b/ui/src/app/editor-v2/components/pipeline/pipeline.component.ts @@ -19,7 +19,6 @@ import * as angular from "angular"; import {PipelineValidationService} from "../../../editor-v2/services/pipeline-validation.service"; -import {RestApi} from "../../../services/rest-api.service"; import {JsplumbService} from "../../services/jsplumb.service"; import {PipelineEditorService} from "../../services/pipeline-editor.service"; import {JsplumbBridge} from "../../services/jsplumb-bridge.service"; @@ -99,7 +98,6 @@ export class PipelineComponent implements OnInit { private EditorService: EditorService, private ShepherdService: ShepherdService, private PipelineValidationService: PipelineValidationService, - private RestApi: RestApi, private dialogService: DialogService, private dialog: MatDialog) { this.plumbReady = false; diff --git a/ui/src/scss/main.scss b/ui/src/scss/main.scss index 3f495b8..eb3c486 100644 --- a/ui/src/scss/main.scss +++ b/ui/src/scss/main.scss @@ -20,7 +20,7 @@ @import '~angular-tree-component/dist/angular-tree-component.css'; @import '~angular-material/angular-material.scss'; -@import '~@angular/material/prebuilt-themes/indigo-pink.css'; +//@import '~@angular/material/prebuilt-themes/indigo-pink.css'; @import '~bootstrap/dist/css/bootstrap.css'; @import '~slick-carousel/slick/slick-theme.css'; @import '~slick-carousel/slick/slick.css'; @@ -43,6 +43,8 @@ @import './sp/shepherd-new'; +@import './sp/sp-theme'; + @import './sp/main'; @import './sp/loading-bar'; @import './sp/buttons'; diff --git a/ui/src/scss/sp/buttons.scss b/ui/src/scss/sp/buttons.scss index 5fa9803..27aef0f 100644 --- a/ui/src/scss/sp/buttons.scss +++ b/ui/src/scss/sp/buttons.scss @@ -96,7 +96,7 @@ .mat-raised-button.mat-basic:enabled { background: #e5e5e5; - color: rgba(0, 0, 0, 0.75); + color: rgba(0, 0, 0, 0.67); } .mat-raised-button.mat-basic:hover:enabled { diff --git a/ui/src/scss/sp/sp-theme.scss b/ui/src/scss/sp/sp-theme.scss new file mode 100644 index 0000000..9812e9f --- /dev/null +++ b/ui/src/scss/sp/sp-theme.scss @@ -0,0 +1,79 @@ + +@import '~@angular/material/theming'; +@import '../variables'; + +@include mat-core(); + +$mat-streampipes-accent: ( + 50: #ffebee, + 100: #ffcdd2, + 200: #72e879, + 300: #49e750, + 400: #49e750, + 500: $sp-color-primary, + 600: #06c12a, + 700: #01a51d, + 800: #00841b, + 900: #005818, + A100: #ff8a80, + A200: #ff5252, + A400: #ff1744, + A700: #d50000, + contrast: ( + 50: $black-87-opacity, + 100: $black-87-opacity, + 200: $black-87-opacity, + 300: $black-87-opacity, + 400: $black-87-opacity, + 500: white, + 600: white, + 700: white, + 800: $white-87-opacity, + 900: $white-87-opacity, + A100: $black-87-opacity, + A200: white, + A400: white, + A700: white, + ) +); + +$mat-streampipes: ( + 50: #ffebee, + 100: #ffcdd2, + 200: #4e3c93, + 300: #2a0c9a, + 400: #395481, + 500: $sp-color-accent, + 600: #0303a3, + 700: #01016a, + 800: #000039, + 900: #00002b, + A100: #ff8a80, + A200: #ff5252, + A400: #ff1744, + A700: #d50000, + contrast: ( + 50: $black-87-opacity, + 100: $black-87-opacity, + 200: $black-87-opacity, + 300: $black-87-opacity, + 400: $black-87-opacity, + 500: white, + 600: white, + 700: white, + 800: $white-87-opacity, + 900: $white-87-opacity, + A100: $black-87-opacity, + A200: white, + A400: white, + A700: white, + ) +); + +$custom-theme-primary: mat-palette($mat-streampipes); +$custom-theme-accent: mat-palette($mat-streampipes-accent); +$custom-theme-warn: mat-palette($mat-red); + +$custom-theme: mat-light-theme($custom-theme-primary, $custom-theme-accent, $custom-theme-warn); + +@include angular-material-theme($custom-theme); \ No newline at end of file
