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/App.js | |
| parent | b37932fdf434d23777eaa58fccbf7afb07a052ea (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.js | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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()) } } } |
