diff options
| author | Henry Jameson <me@hjkos.com> | 2022-04-12 21:18:06 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-04-12 21:18:06 +0300 |
| commit | 3d37b9d8e1cad78fb1f666b3cfb7f28b1fdc1c2d (patch) | |
| tree | 97a924d0e4e274f89e1aa6060fd8e780b5db0886 /src/boot | |
| parent | b37932fdf434d23777eaa58fccbf7afb07a052ea (diff) | |
unified layout-setting code and made an option to control or disable
third column behavior
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/after_store.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js index ce96141d..f655c38f 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -8,7 +8,7 @@ import App from '../App.vue' import routes from './routes' import VBodyScrollLock from 'src/directives/body_scroll_lock' -import { windowWidth } from '../services/window_utils/window_utils' +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' @@ -332,11 +332,8 @@ const checkOAuthToken = async ({ store }) => { } const afterStoreSetup = async ({ store, i18n }) => { - // TODO cleanup copypasta - const mobileLayout = windowWidth() <= 800 - const wideLayout = windowWidth() >= 1300 - const layoutType = wideLayout ? 'wide' : (mobileLayout ? 'mobile' : 'normal') - store.dispatch('setLayoutType', layoutType) + store.dispatch('setLayoutWidth', windowWidth()) + store.dispatch('setLayoutHeight', windowHeight()) FaviconService.initFaviconService() |
