[develop | DONE | ADDED ] Customization add custom css
This commit is contained in:
parent
6165778970
commit
9b88d4be2a
|
@ -91,6 +91,7 @@ export class CustomizationOptions {
|
||||||
identity: {
|
identity: {
|
||||||
mainColor: string;
|
mainColor: string;
|
||||||
secondaryColor: string;
|
secondaryColor: string;
|
||||||
|
customCss: string;
|
||||||
};
|
};
|
||||||
identityIsCustom: boolean;
|
identityIsCustom: boolean;
|
||||||
backgroundsIsCustom: boolean;
|
backgroundsIsCustom: boolean;
|
||||||
|
@ -114,11 +115,12 @@ export class CustomizationOptions {
|
||||||
darkBackground: ButtonsCustomization;
|
darkBackground: ButtonsCustomization;
|
||||||
lightBackground: ButtonsCustomization;
|
lightBackground: ButtonsCustomization;
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(mainColor: string = null, secondaryColor: string = null) {
|
constructor(mainColor: string = null, secondaryColor: string = null) {
|
||||||
this.identity = {
|
this.identity = {
|
||||||
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
||||||
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||||
|
customCss: ""
|
||||||
};
|
};
|
||||||
this.identityIsCustom = false;
|
this.identityIsCustom = false;
|
||||||
this.backgroundsIsCustom = false;
|
this.backgroundsIsCustom = false;
|
||||||
|
@ -185,6 +187,9 @@ export class CustomizationOptions {
|
||||||
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
||||||
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
||||||
}
|
}
|
||||||
|
if(!current.identity.customCss){
|
||||||
|
current.identity.customCss = defaultCO.identity.customCss;
|
||||||
|
}
|
||||||
if (!current.backgrounds) {
|
if (!current.backgrounds) {
|
||||||
current.backgrounds = Object.assign({}, updated.backgrounds);
|
current.backgrounds = Object.assign({}, updated.backgrounds);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue