50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
import BooleanSetting from '../helpers/boolean_setting.vue'
|
|
import ChoiceSetting from '../helpers/choice_setting.vue'
|
|
import UnitSetting from '../helpers/unit_setting.vue'
|
|
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
|
|
|
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|
|
|
const GeneralTab = {
|
|
props: {
|
|
parentCollapsed: {
|
|
required: true,
|
|
type: Boolean
|
|
}
|
|
},
|
|
data () {
|
|
return {
|
|
thirdColumnModeOptions: ['none', 'notifications', 'postform'].map(mode => ({
|
|
key: mode,
|
|
value: mode,
|
|
label: this.$t(`settings.third_column_mode_${mode}`)
|
|
}))
|
|
}
|
|
},
|
|
components: {
|
|
BooleanSetting,
|
|
ChoiceSetting,
|
|
UnitSetting,
|
|
ProfileSettingIndicator
|
|
},
|
|
computed: {
|
|
postFormats () {
|
|
return this.$store.state.instance.postFormats || []
|
|
},
|
|
instanceShoutboxPresent () { return this.$store.state.instance.shoutAvailable },
|
|
columns () {
|
|
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
|
|
|
const notif = mode === 'none' ? [] : ['notifs']
|
|
|
|
if (this.$store.getters.mergedConfig.sidebarRight || mode === 'postform') {
|
|
return [...notif, 'content', 'sidebar']
|
|
} else {
|
|
return ['sidebar', 'content', ...notif]
|
|
}
|
|
},
|
|
...SharedComputedObject(),
|
|
}
|
|
}
|
|
|
|
export default GeneralTab
|