Fix custom font size

This commit is contained in:
Julia Radzhabova 2022-12-21 15:53:29 +03:00
parent 040b3b98c8
commit 3e92e53ed1
3 changed files with 13 additions and 12 deletions

View file

@ -391,6 +391,11 @@ define([
}
document.documentElement.style.setProperty("--font-family-base-custom", arr.join(','));
}
if (this.appOptions.customization.font.size) {
var size = parseInt(this.appOptions.customization.font.size);
!isNaN(size) && document.documentElement.style.setProperty("--font-size-base-app-custom", size + "px");
}
}
this.editorConfig.user =
@ -398,10 +403,6 @@ define([
Common.localStorage.getItem("guest-id") || ('uid-' + Date.now()));
this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id);
if (this.appOptions.customization.font) {
this.appOptions.customization.font.size && document.documentElement.style.setProperty("--font-size-base-app-custom", this.appOptions.customization.font.size);
}
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive();
this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length;
this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;

View file

@ -350,6 +350,10 @@ define([
}
document.documentElement.style.setProperty("--font-family-base-custom", arr.join(','));
}
if (this.appOptions.customization.font.size) {
var size = parseInt(this.appOptions.customization.font.size);
!isNaN(size) && document.documentElement.style.setProperty("--font-size-base-app-custom", size + "px");
}
}
this.editorConfig.user =
@ -357,10 +361,6 @@ define([
Common.localStorage.getItem("guest-id") || ('uid-' + Date.now()));
this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id);
if (this.appOptions.customization.font) {
this.appOptions.customization.font.size && document.documentElement.style.setProperty("--font-size-base-app-custom", this.appOptions.customization.font.size);
}
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive();
this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length;
this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;

View file

@ -388,6 +388,10 @@ define([
}
document.documentElement.style.setProperty("--font-family-base-custom", arr.join(','));
}
if (this.appOptions.customization.font.size) {
var size = parseInt(this.appOptions.customization.font.size);
!isNaN(size) && document.documentElement.style.setProperty("--font-size-base-app-custom", size + "px");
}
}
this.editorConfig.user =
@ -395,10 +399,6 @@ define([
Common.localStorage.getItem("guest-id") || ('uid-' + Date.now()));
this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id);
if (this.appOptions.customization.font) {
this.appOptions.customization.font.size && document.documentElement.style.setProperty("--font-size-base-app-custom", this.appOptions.customization.font.size);
}
this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop' || Common.Controllers.Desktop.isActive();
this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length;
this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp;