diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2024-07-24 18:51:17 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2024-07-24 18:51:17 +0000 |
| commit | 0c9893c8a07426d3e41046663d4072de50eb267c (patch) | |
| tree | dce14332df570a757bf78e769ac6cfd5fb189f58 /src/boot | |
| parent | 7a7d80270d1ae041f06c1fd9017135cb5b8c34d6 (diff) | |
| parent | aa7bdbae2173fdb921dd241683c3e0f9bd3aaa82 (diff) | |
Merge branch 'appearance-tab' into 'develop'
Themes 3: Intermission: Appearance Tab and fixes
See merge request pleroma/pleroma-fe!1920
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/after_store.js | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js index bcab7a66..a486bd4c 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -13,8 +13,7 @@ import VBodyScrollLock from 'src/directives/body_scroll_lock' import { windowWidth, windowHeight } from '../services/window_utils/window_utils' import { getOrCreateApp, getClientToken } from '../services/new_api/oauth.js' import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' -import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js' -import { applyTheme, applyConfig, tryLoadCache } from '../services/style_setter/style_setter.js' +import { applyConfig } from '../services/style_setter/style_setter.js' import FaviconService from '../services/favicon_service/favicon_service.js' import { initServiceWorker, updateFocus } from '../services/sw/sw.js' @@ -160,8 +159,6 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('showFeaturesPanel') copyInstanceOption('hideSitename') copyInstanceOption('sidebarRight') - - return store.dispatch('setTheme', config.theme) } const getTOS = async ({ store }) => { @@ -352,27 +349,7 @@ const afterStoreSetup = async ({ store, i18n }) => { store.dispatch('setInstanceOption', { name: 'server', value: server }) await setConfig({ store }) - - const { customTheme, customThemeSource, forceThemeRecompilation } = store.state.config - const { theme } = store.state.instance - const customThemePresent = customThemeSource || customTheme - - if (!forceThemeRecompilation && tryLoadCache()) { - store.commit('setThemeApplied') - } else { - if (customThemePresent) { - if (customThemeSource && customThemeSource.themeEngineVersion === CURRENT_VERSION) { - applyTheme(customThemeSource) - } else { - applyTheme(customTheme) - } - store.commit('setThemeApplied') - } else if (theme) { - // do nothing, it will load asynchronously - } else { - console.error('Failed to load any theme!') - } - } + await store.dispatch('setTheme') applyConfig(store.state.config) |
