mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -11,14 +12,27 @@ export class BackgroundService {
|
||||
funx: Function
|
||||
}[] = []
|
||||
|
||||
constructor() { }
|
||||
constructor(
|
||||
private themeservice: ThemeService
|
||||
) { }
|
||||
|
||||
online() {
|
||||
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`, "#45BAFF");
|
||||
if (this.themeservice.currentTheme == 'gov') {
|
||||
|
||||
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");
|
||||
|
||||
} else {
|
||||
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`, "#45BAFF");
|
||||
}
|
||||
|
||||
this.callBacks.forEach((e) => {
|
||||
if (e.type == 'Online') {
|
||||
e.funx()
|
||||
@@ -46,4 +60,56 @@ 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(`--login-background`, "linear-gradient(180deg, #c63527 60%, #000 100%) !important");
|
||||
document.body.style.setProperty(`--button-hover`, "#ffb81c");
|
||||
document.body.style.setProperty(`--inicio-open-page-from-box`, "#c63527");
|
||||
document.body.style.setProperty(`--header-tab-top-border`, "#000");
|
||||
document.body.style.setProperty(`--header-tab-text-white`, "rgb(0, 0, 0)");
|
||||
document.body.style.setProperty(`--header-tab-text-white`, "rgb(0, 0, 0)");
|
||||
|
||||
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");
|
||||
|
||||
document.body.style.setProperty(`--login-background`, "linear-gradient(180deg, #42b9fe 0%, #0782c9 100%) !importantt");
|
||||
document.body.style.setProperty(`--button-hover`, "#42b9fe");
|
||||
document.body.style.setProperty(`--inicio-open-page-from-box`, "#42b9fe");
|
||||
document.body.style.setProperty(`--header-tab-top-border`, "white");
|
||||
document.body.style.setProperty(`--header-tab-text-white`, "white");
|
||||
|
||||
}
|
||||
|
||||
default() {
|
||||
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`, "#45BAFF");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
<div *ngFor="let attendee of contacts;">
|
||||
<ion-item (click)="selectContact(attendee)" class="cursor-pointer" lines="none" *ngIf="filterSearchList(attendee)" >
|
||||
<div class="pr-10">
|
||||
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
</div>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
@@ -35,7 +36,8 @@
|
||||
<ion-item-sliding class="px-20">
|
||||
<ion-item lines="none" *ngFor="let attendee of taskParticipants;" class="d-flex">
|
||||
<div class="pr-10">
|
||||
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
</div>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
@@ -53,7 +55,8 @@
|
||||
<ion-item-sliding class="px-20">
|
||||
<ion-item lines="none" *ngFor="let attendee of taskParticipantsCc;" class="d-flex">
|
||||
<div class="pr-10">
|
||||
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||
</div>
|
||||
<ion-label>
|
||||
<h3>{{ attendee.Name }}</h3>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-attendees',
|
||||
@@ -25,7 +26,8 @@ export class AttendeesPageModal implements OnInit {
|
||||
private modalCtrl: ModalController,
|
||||
private contactsService: ContactsService,
|
||||
private navParams: NavParams,
|
||||
private modalController: ModalController) {
|
||||
private modalController: ModalController,
|
||||
public ThemeService: ThemeService) {
|
||||
|
||||
this.adding = this.navParams.get('adding');
|
||||
this.taskParticipants = this.navParams.get('taskParticipants');
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
.attach-document{
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
color: var(--title-text-color);
|
||||
margin: 5px 5px 5px 10px;
|
||||
padding: 5px;
|
||||
float: left;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ThemeService } from './theme.service';
|
||||
|
||||
describe('ThemeService', () => {
|
||||
let service: ThemeService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ThemeService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ThemeService {
|
||||
|
||||
themes = [
|
||||
'gov',
|
||||
'default',
|
||||
'tribunal'
|
||||
]
|
||||
|
||||
currentTheme = 'gov'
|
||||
|
||||
constructor(private storageservice: StorageService) { }
|
||||
|
||||
setTheme(theme: 'gov' | 'default' | 'tribunal') {
|
||||
|
||||
document.body.classList.remove("gov");
|
||||
document.body.classList.remove("default");
|
||||
document.body.classList.remove("tribunal");
|
||||
document.body.classList.add(theme);
|
||||
this.currentTheme = theme
|
||||
console.log('Current theme', theme);
|
||||
this.storageservice.store('theme',theme);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user