From 55f5fd822dfbb6560f24e9bd447ed5c2d75e711e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Wed, 20 Oct 2021 17:46:03 +0100 Subject: [PATCH] New themes added --- package-lock.json | 8 + package.json | 1 + src/app/app.module.ts | 5 +- .../edit-profile/edit-profile.page.html | 50 ++++-- .../profile/edit-profile/edit-profile.page.ts | 15 +- .../diplomas-assinar/diplomas-assinar.page.ts | 2 +- src/app/services/background.service.ts | 31 ++++ src/app/shared/header/header.page.html | 161 ++++++++++-------- .../images/icons-nav-home-active-black.svg | 18 ++ src/global.scss | 22 +++ 10 files changed, 222 insertions(+), 91 deletions(-) create mode 100644 src/assets/images/icons-nav-home-active-black.svg diff --git a/package-lock.json b/package-lock.json index 1f90ffb86..3fb80d1ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4417,6 +4417,14 @@ } } }, + "angular-svg-icon": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/angular-svg-icon/-/angular-svg-icon-12.0.0.tgz", + "integrity": "sha512-nPAbF/U6sHdY+Dt/J5TZuUNOGRZmxoqJioRfLGMeNt8ycbBbTwq1OmkZ7DLuF02+XGafGHwzmI5/2y9OWAl+TA==", + "requires": { + "tslib": "^2.2.0" + } + }, "angular-tag-cloud-module": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/angular-tag-cloud-module/-/angular-tag-cloud-module-5.3.0.tgz", diff --git a/package.json b/package.json index 7a56af1fc..2db5a1299 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "@types/jest-environment-puppeteer": "^4.4.1", "@types/puppeteer": "^5.4.4", "angular-calendar": "^0.28.22", + "angular-svg-icon": "^12.0.0", "angular-tag-cloud-module": "^5.2.2", "bootstrap": "^4.5.0", "build": "0.1.4", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index b3a8964f6..432651851 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -58,6 +58,7 @@ import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx'; import { PdfViewerModule } from 'ng2-pdf-viewer'; import { SQLite } from '@ionic-native/sqlite/ngx'; import { CookieService } from 'ngx-cookie-service'; +import { AngularSvgIconModule } from 'angular-svg-icon'; @NgModule({ declarations: [AppComponent], @@ -92,6 +93,7 @@ import { CookieService } from 'ngx-cookie-service'; // PdfViewerModule, HammerModule, + AngularSvgIconModule.forRoot() ], providers: [ { provide: MAT_DATE_LOCALE, useValue: 'pt' }, @@ -112,7 +114,8 @@ import { CookieService } from 'ngx-cookie-service'; Network, File, SQLite, - CookieService + CookieService, + AngularSvgIconModule ], bootstrap: [AppComponent], schemas: [CUSTOM_ELEMENTS_SCHEMA] diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.html b/src/app/modals/profile/edit-profile/edit-profile.page.html index 74fc9bf48..fbce6b95a 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.html +++ b/src/app/modals/profile/edit-profile/edit-profile.page.html @@ -21,9 +21,9 @@ --> -
+
- +
@@ -51,15 +51,41 @@
+ +
+
+
Tema
+
+
+ +
+
+
+ + +
+ +
+ +
+ +
+ +
+ +
+
+ +
Preferência Login
-
- +
+ PIN
@@ -77,15 +103,15 @@
- - - - - + + + +
- + \ No newline at end of file diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.ts b/src/app/modals/profile/edit-profile/edit-profile.page.ts index e535c7127..76bd6d6ab 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.ts +++ b/src/app/modals/profile/edit-profile/edit-profile.page.ts @@ -1,10 +1,10 @@ import { Component, OnInit } from '@angular/core'; -import { AnimationController, ModalController } from '@ionic/angular'; +import { AnimationController, ModalController,Platform } from '@ionic/angular'; import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page'; import { PinPage } from 'src/app/shared/pin/pin.page'; import { SessionStore } from 'src/app/store/session.service'; import { environment } from 'src/environments/environment'; -import { Platform } from '@ionic/angular'; +import { BackgroundService } from 'src/app/services/background.service'; @Component({ selector: 'app-edit-profile', @@ -19,6 +19,7 @@ export class EditProfilePage implements OnInit { constructor(private modalController:ModalController, private animationController: AnimationController, public platform: Platform, + private backgroundservice: BackgroundService ) {} ngOnInit() {} @@ -113,5 +114,15 @@ export class EditProfilePage implements OnInit { } + changeTheme(name) { + /* this.theme.setTheme(themes[name]); */ + if(name == 'grey') { + this.backgroundservice.greyTheme(); + } else if (name == 'blue') { + this.backgroundservice.blueTheme(); + } + + } + } diff --git a/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts b/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts index 690222b2a..51172c2f5 100644 --- a/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts +++ b/src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts @@ -3,7 +3,7 @@ import { NavigationEnd, NavigationExtras, Router } from '@angular/router'; import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model'; import { ProcessesService } from 'src/app/services/processes.service'; import { formatDate } from '@angular/common'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController, NavParams, Platform } from '@ionic/angular'; import { AlertService } from 'src/app/services/alert.service'; import { DiplomaPage } from 'src/app/pages/gabinete-digital/diplomas/diploma/diploma.page'; import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe'; diff --git a/src/app/services/background.service.ts b/src/app/services/background.service.ts index 84ed29d7c..8f8818147 100644 --- a/src/app/services/background.service.ts +++ b/src/app/services/background.service.ts @@ -46,4 +46,35 @@ export class BackgroundService { object }) } + + + greyTheme() { + document.body.style.setProperty(`--color`, "#D9D9D9"); + document.body.style.setProperty(`--color2`, "#f0f0f0"); + document.body.style.setProperty(`--color3`, "#D9D9D9"); + document.body.style.setProperty(`--color4`, "#d9d9d9ee"); + document.body.style.setProperty(`--color5`, "#ececec"); + + document.body.style.setProperty(`--header-container-background`, "#fff"); + document.body.style.setProperty(`--headercolor`, "#000"); + + document.body.style.setProperty(`--header-bottom-line-background`, "rgb(255, 0, 0)"); + document.body.style.setProperty(`--header-bottom-line-background-image`, "linear-gradient(to right, #C63527, #FFB81C, #FFC72C)"); + } + + blueTheme() { + + document.body.style.setProperty(`--color`, "#0782C9"); + document.body.style.setProperty(`--color2`, "#45BAFF"); + document.body.style.setProperty(`--color3`, "#0782C9"); + document.body.style.setProperty(`--color4`, "#0782c9f0"); + document.body.style.setProperty(`--color5`, "#f7f5f2"); + + document.body.style.setProperty(`--header-container-background`, "linear-gradient(270deg, var(--color2) 0%, var(--color3) 23.44%, var(--color4) 78.13%, var(--color5) 100%) !important"); + document.body.style.setProperty(`--headercolor`, "#000"); + + document.body.style.setProperty(`--header-bottom-line-background`, "linear-gradient(270deg, var(--color2) 0%, var(--color3) 23.44%, var(--color4) 78.13%, var(--color5) 100%) !important"); + document.body.style.setProperty(`--header-bottom-line-background-image`, "linear-gradient(270deg, var(--color2) 0%, var(--color3) 23.44%, var(--color4) 78.13%, var(--color5) 100%) !important"); + + } } diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html index 6c0d2b66c..a63e6df67 100644 --- a/src/app/shared/header/header.page.html +++ b/src/app/shared/header/header.page.html @@ -1,94 +1,105 @@ -
+
+
-
-