web: skip initiation for theme builder

This commit is contained in:
Abdullah Atta
2023-08-10 07:18:49 +05:00
parent 18d0b72785
commit 1289a025a5
4 changed files with 5 additions and 3 deletions

View File

@@ -147,5 +147,5 @@ export async function init() {
}
function shouldSkipInitiation() {
return localStorage.getItem("skipInitiation") || false;
return IS_THEME_BUILDER || localStorage.getItem("skipInitiation") || false;
}

View File

@@ -30,6 +30,7 @@ declare global {
var PLATFORM: "web" | "desktop";
var IS_BETA: boolean;
var APP_TITLE: string;
var IS_THEME_BUILDER: boolean;
interface Window {
os?: () => NodeJS.Platform | "mas";

View File

@@ -51,7 +51,7 @@ class ThemeStore extends BaseStore {
/**
* @param {import("@notesnook/theme").ThemeDefinition} theme
*/
setTheme = async (theme) => {
setTheme = (theme) => {
Config.set(`theme:${theme.colorScheme}`, theme);
this.set({
[getKey(theme)]: theme,

View File

@@ -71,7 +71,8 @@ export default defineConfig({
IS_DESKTOP_APP: isDesktop,
PLATFORM: `"${process.env.PLATFORM}"`,
IS_TESTING: process.env.TEST === "true",
IS_BETA: process.env.BETA === "true"
IS_BETA: process.env.BETA === "true",
IS_THEME_BUILDER: isThemeBuilder
},
logLevel: process.env.NODE_ENV === "production" ? "warn" : "info",
resolve: {