Added function on edit-perfil button to change themes

This commit is contained in:
Eudes Inácio
2021-10-22 14:00:07 +01:00
parent e7d70f4736
commit 509824d0c5
6 changed files with 29 additions and 12 deletions
@@ -5,6 +5,7 @@ import { PinPage } from 'src/app/shared/pin/pin.page';
import { SessionStore } from 'src/app/store/session.service';
import { environment } from 'src/environments/environment';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service';
@Component({
selector: 'app-edit-profile',
@@ -19,7 +20,8 @@ export class EditProfilePage implements OnInit {
constructor(private modalController:ModalController,
private animationController: AnimationController,
public platform: Platform,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
private themeservice: ThemeService
) {}
ngOnInit() {}
@@ -115,13 +117,7 @@ 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();
}
this.themeservice.setTheme(name)
}
}