aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-04-05 18:38:05 +0300
committerHenry Jameson <me@hjkos.com>2022-04-05 18:38:05 +0300
commit4a068483ed9b1334780402cbe64dfa3f4a0e8a3a (patch)
tree4f65244922dbcb4f3fb534971aedbb0b62431ba3 /src/App.js
parent9e5037c71564c041c6bf518109d21e84df435855 (diff)
wide mode initial implementation + cleanup
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/App.js b/src/App.js
index 4a59f412..b2ec95d4 100644
--- a/src/App.js
+++ b/src/App.js
@@ -79,7 +79,7 @@ export default {
hideShoutbox () {
return this.$store.getters.mergedConfig.hideShoutbox
},
- isMobileLayout () { return this.$store.state.interface.mobileLayout },
+ layoutType () { return this.$store.state.interface.layoutType },
privateMode () { return this.$store.state.instance.private },
reverseLayout () { return this.$store.getters.mergedConfig.sidebarRight },
...mapGetters(['mergedConfig'])
@@ -87,10 +87,12 @@ export default {
methods: {
updateMobileState () {
const mobileLayout = windowWidth() <= 800
+ const wideLayout = windowWidth() >= 1300
const layoutHeight = windowHeight()
- const changed = mobileLayout !== this.isMobileLayout
+ const layoutType = wideLayout ? 'wide' : (mobileLayout ? 'mobile' : 'normal')
+ const changed = layoutType !== this.layoutType
if (changed) {
- this.$store.dispatch('setMobileLayout', mobileLayout)
+ this.$store.dispatch('setLayoutType', layoutType)
}
this.$store.dispatch('setLayoutHeight', layoutHeight)
}