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;
|
secondaryColor: string;
|
||||||
};
|
};
|
||||||
identityIsCustom:boolean;
|
identityIsCustom:boolean;
|
||||||
backgroundsAndButtonsIsCustom:boolean;
|
backgroundsIsCustom:boolean;
|
||||||
|
buttonsIsCustom:boolean;
|
||||||
backgrounds: {
|
backgrounds: {
|
||||||
dark: {
|
dark: {
|
||||||
color: string; //background
|
color: string; //background
|
||||||
|
@ -39,7 +40,8 @@ export class CustomizationOptions {
|
||||||
secondaryColor : secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
secondaryColor : secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||||
};
|
};
|
||||||
this.identityIsCustom = false;
|
this.identityIsCustom = false;
|
||||||
this.backgroundsAndButtonsIsCustom = false;
|
this.backgroundsIsCustom = false;
|
||||||
|
this.buttonsIsCustom = false;
|
||||||
this.backgrounds={
|
this.backgrounds={
|
||||||
dark : {
|
dark : {
|
||||||
color: this.identity.mainColor,
|
color: this.identity.mainColor,
|
||||||
|
@ -121,8 +123,9 @@ export class CustomizationOptions {
|
||||||
if(!current.hasOwnProperty('identityIsCustom')){
|
if(!current.hasOwnProperty('identityIsCustom')){
|
||||||
current.identityIsCustom = (JSON.stringify(current.identity) != JSON.stringify(defaultCO.identity));
|
current.identityIsCustom = (JSON.stringify(current.identity) != JSON.stringify(defaultCO.identity));
|
||||||
}
|
}
|
||||||
if(!current.hasOwnProperty('backgroundsAndButtonsIsCustom')){
|
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)) ;
|
current.identityIsCustom = (JSON.stringify(current.backgrounds) !=
|
||||||
|
JSON.stringify(updated.backgrounds) || JSON.stringify(current.buttons) != JSON.stringify(updated.buttons)) ;
|
||||||
}
|
}
|
||||||
return current;
|
return current;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue