wide mode initial implementation + cleanup

This commit is contained in:
Henry Jameson 2022-04-05 18:38:05 +03:00
parent 9e5037c715
commit 4a068483ed
8 changed files with 89 additions and 73 deletions

View file

@ -332,8 +332,11 @@ const checkOAuthToken = async ({ store }) => {
}
const afterStoreSetup = async ({ store, i18n }) => {
const width = windowWidth()
store.dispatch('setMobileLayout', width <= 800)
// TODO cleanup copypasta
const mobileLayout = windowWidth() <= 800
const wideLayout = windowWidth() >= 1300
const layoutType = wideLayout ? 'wide' : (mobileLayout ? 'mobile' : 'normal')
store.dispatch('setLayoutType', layoutType)
FaviconService.initFaviconService()