Customization: more changes for the new mocks
This commit is contained in:
parent
de493c8492
commit
bdcf1d6bdf
|
@ -13,7 +13,8 @@ export class CustomizationOptions {
|
|||
secondaryColor: string;
|
||||
};
|
||||
identityIsCustom:boolean;
|
||||
backgroundsAndButtonsIsCustom:boolean;
|
||||
backgroundsIsCustom:boolean;
|
||||
buttonsIsCustom:boolean;
|
||||
backgrounds: {
|
||||
dark: {
|
||||
color: string; //background
|
||||
|
@ -39,7 +40,8 @@ export class CustomizationOptions {
|
|||
secondaryColor : secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||
};
|
||||
this.identityIsCustom = false;
|
||||
this.backgroundsAndButtonsIsCustom = false;
|
||||
this.backgroundsIsCustom = false;
|
||||
this.buttonsIsCustom = false;
|
||||
this.backgrounds={
|
||||
dark : {
|
||||
color: this.identity.mainColor,
|
||||
|
@ -121,8 +123,9 @@ export class CustomizationOptions {
|
|||
if(!current.hasOwnProperty('identityIsCustom')){
|
||||
current.identityIsCustom = (JSON.stringify(current.identity) != JSON.stringify(defaultCO.identity));
|
||||
}
|
||||
if(!current.hasOwnProperty('backgroundsAndButtonsIsCustom')){
|
||||
current.identityIsCustom = (JSON.stringify(current.backgrounds) != JSON.stringify(updated.backgrounds) || JSON.stringify(current.buttons) != JSON.stringify(updated.buttons)) ;
|
||||
if(!current.hasOwnProperty('backgroundsAndButtonsIsCustom') || (!current.hasOwnProperty('backgroundsIsCustom') || (!current.hasOwnProperty('buttonsIsCustom')))){
|
||||
current.identityIsCustom = (JSON.stringify(current.backgrounds) !=
|
||||
JSON.stringify(updated.backgrounds) || JSON.stringify(current.buttons) != JSON.stringify(updated.buttons)) ;
|
||||
}
|
||||
return current;
|
||||
|
||||
|
|
Loading…
Reference in New Issue