aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-04-12 21:18:06 +0300
committerHenry Jameson <me@hjkos.com>2022-04-12 21:18:06 +0300
commit3d37b9d8e1cad78fb1f666b3cfb7f28b1fdc1c2d (patch)
tree97a924d0e4e274f89e1aa6060fd8e780b5db0886 /src/App.js
parentb37932fdf434d23777eaa58fccbf7afb07a052ea (diff)
unified layout-setting code and made an option to control or disable
third column behavior
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/App.js b/src/App.js
index 9cfaf4fa..19c58595 100644
--- a/src/App.js
+++ b/src/App.js
@@ -98,22 +98,22 @@ export default {
},
layoutType () { return this.$store.state.interface.layoutType },
privateMode () { return this.$store.state.instance.private },
- reverseLayout () { return this.$store.getters.mergedConfig.sidebarRight },
+ reverseLayout () {
+ const { thirdColumnMode, sidebarRight: reverseSetting } = this.$store.getters.mergedConfig
+ if (this.layoutType !== 'wide') {
+ return reverseSetting
+ } else {
+ return thirdColumnMode === 'notifications' ? reverseSetting : !reverseSetting
+ }
+ },
noSticky () { return this.$store.getters.mergedConfig.disableStickyHeaders },
showScrollbars () { return this.$store.getters.mergedConfig.showScrollbars },
...mapGetters(['mergedConfig'])
},
methods: {
updateMobileState () {
- const mobileLayout = windowWidth() <= 800
- const wideLayout = windowWidth() >= 1300
- const layoutHeight = windowHeight()
- const layoutType = wideLayout ? 'wide' : (mobileLayout ? 'mobile' : 'normal')
- const changed = layoutType !== this.layoutType
- if (changed) {
- this.$store.dispatch('setLayoutType', layoutType)
- }
- this.$store.dispatch('setLayoutHeight', layoutHeight)
+ this.$store.dispatch('setLayoutWidth', windowWidth())
+ this.$store.dispatch('setLayoutHeight', windowHeight())
}
}
}