App.js
This commit is contained in:
parent
dbc9bd9c46
commit
b08df84282
1 changed files with 10 additions and 9 deletions
19
src/App.js
19
src/App.js
|
|
@ -26,6 +26,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||||
import { useShoutStore } from 'src/stores/shout.js'
|
import { useShoutStore } from 'src/stores/shout.js'
|
||||||
|
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'app',
|
name: 'app',
|
||||||
|
|
@ -72,7 +73,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// Load the locale from the storage
|
// Load the locale from the storage
|
||||||
const val = this.$store.getters.mergedConfig.interfaceLanguage
|
const val = useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||||
this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
|
this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
|
||||||
document.getElementById('modal').classList = ['-' + this.layoutType]
|
document.getElementById('modal').classList = ['-' + this.layoutType]
|
||||||
|
|
||||||
|
|
@ -122,7 +123,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
navClasses() {
|
navClasses() {
|
||||||
const { navbarColumnStretch } = this.$store.getters.mergedConfig
|
const { navbarColumnStretch } = useSyncConfigStore().mergedConfig
|
||||||
return [
|
return [
|
||||||
'-' + this.layoutType,
|
'-' + this.layoutType,
|
||||||
...(navbarColumnStretch ? ['-column-stretch'] : []),
|
...(navbarColumnStretch ? ['-column-stretch'] : []),
|
||||||
|
|
@ -160,19 +161,19 @@ export default {
|
||||||
if (this.isChats) return false
|
if (this.isChats) return false
|
||||||
if (this.isListEdit) return false
|
if (this.isListEdit) return false
|
||||||
return (
|
return (
|
||||||
this.$store.getters.mergedConfig.alwaysShowNewPostButton ||
|
useSyncConfigStore().mergedConfig.alwaysShowNewPostButton ||
|
||||||
this.layoutType === 'mobile'
|
this.layoutType === 'mobile'
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
shoutboxPosition() {
|
shoutboxPosition() {
|
||||||
return this.$store.getters.mergedConfig.alwaysShowNewPostButton || false
|
return useSyncConfigStore().mergedConfig.alwaysShowNewPostButton || false
|
||||||
},
|
},
|
||||||
hideShoutbox() {
|
hideShoutbox() {
|
||||||
return this.$store.getters.mergedConfig.hideShoutbox
|
return useSyncConfigStore().mergedConfig.hideShoutbox
|
||||||
},
|
},
|
||||||
reverseLayout() {
|
reverseLayout() {
|
||||||
const { thirdColumnMode, sidebarRight: reverseSetting } =
|
const { thirdColumnMode, sidebarRight: reverseSetting } =
|
||||||
this.$store.getters.mergedConfig
|
useSyncConfigStore().mergedConfig
|
||||||
if (this.layoutType !== 'wide') {
|
if (this.layoutType !== 'wide') {
|
||||||
return reverseSetting
|
return reverseSetting
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -182,10 +183,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
noSticky() {
|
noSticky() {
|
||||||
return this.$store.getters.mergedConfig.disableStickyHeaders
|
return useSyncConfigStore().mergedConfig.disableStickyHeaders
|
||||||
},
|
},
|
||||||
showScrollbars() {
|
showScrollbars() {
|
||||||
return this.$store.getters.mergedConfig.showScrollbars
|
return useSyncConfigStore().mergedConfig.showScrollbars
|
||||||
},
|
},
|
||||||
scrollParent() {
|
scrollParent() {
|
||||||
return window /* this.$refs.appContentRef */
|
return window /* this.$refs.appContentRef */
|
||||||
|
|
@ -193,7 +194,7 @@ export default {
|
||||||
showInstanceSpecificPanel() {
|
showInstanceSpecificPanel() {
|
||||||
return (
|
return (
|
||||||
this.instanceSpecificPanelPresent &&
|
this.instanceSpecificPanelPresent &&
|
||||||
!this.$store.getters.mergedConfig.hideISP
|
!useSyncConfigStore().mergedConfig.hideISP
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
...mapGetters(['mergedConfig']),
|
...mapGetters(['mergedConfig']),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue