2026-01-29 21:06:42 +02:00
|
|
|
import { mapState } from 'pinia'
|
|
|
|
|
|
2025-11-24 17:06:55 +02:00
|
|
|
import BooleanSetting from '../helpers/boolean_setting.vue'
|
|
|
|
|
import ChoiceSetting from '../helpers/choice_setting.vue'
|
|
|
|
|
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
|
|
|
|
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
2026-01-06 16:23:17 +02:00
|
|
|
import UnitSetting from '../helpers/unit_setting.vue'
|
2025-11-24 17:06:55 +02:00
|
|
|
|
2026-01-29 20:40:00 +02:00
|
|
|
import { useInstanceStore } from 'src/stores/instance.js'
|
|
|
|
|
|
2025-11-24 17:06:55 +02:00
|
|
|
const GeneralTab = {
|
|
|
|
|
props: {
|
|
|
|
|
parentCollapsed: {
|
|
|
|
|
required: true,
|
2026-01-06 16:22:52 +02:00
|
|
|
type: Boolean,
|
|
|
|
|
},
|
2025-11-24 17:06:55 +02:00
|
|
|
},
|
2026-01-06 16:22:52 +02:00
|
|
|
data() {
|
2025-11-24 17:06:55 +02:00
|
|
|
return {
|
2026-01-06 16:22:52 +02:00
|
|
|
thirdColumnModeOptions: ['none', 'notifications', 'postform'].map(
|
|
|
|
|
(mode) => ({
|
|
|
|
|
key: mode,
|
|
|
|
|
value: mode,
|
|
|
|
|
label: this.$t(`settings.third_column_mode_${mode}`),
|
|
|
|
|
}),
|
|
|
|
|
),
|
2025-11-24 17:06:55 +02:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
BooleanSetting,
|
|
|
|
|
ChoiceSetting,
|
|
|
|
|
UnitSetting,
|
2026-01-06 16:22:52 +02:00
|
|
|
ProfileSettingIndicator,
|
2025-11-24 17:06:55 +02:00
|
|
|
},
|
|
|
|
|
computed: {
|
2026-01-29 21:06:42 +02:00
|
|
|
...mapState(useInstanceStore, {
|
|
|
|
|
postFormats: (store) => store.featureSet.postFormats || [],
|
|
|
|
|
instanceSpecificPanelPresent: (store) =>
|
|
|
|
|
store.instanceIdentity.instanceSpecificPanelPresent,
|
|
|
|
|
instanceShoutboxPresent: (store) => store.featureSet.shoutAvailable,
|
|
|
|
|
}),
|
2026-01-06 16:22:52 +02:00
|
|
|
columns() {
|
2025-11-24 17:06:55 +02:00
|
|
|
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
|
|
|
|
|
|
|
|
|
const notif = mode === 'none' ? [] : ['notifs']
|
|
|
|
|
|
2026-01-06 16:22:52 +02:00
|
|
|
if (
|
|
|
|
|
this.$store.getters.mergedConfig.sidebarRight ||
|
|
|
|
|
mode === 'postform'
|
|
|
|
|
) {
|
2025-11-24 17:06:55 +02:00
|
|
|
return [...notif, 'content', 'sidebar']
|
|
|
|
|
} else {
|
|
|
|
|
return ['sidebar', 'content', ...notif]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
...SharedComputedObject(),
|
2026-01-06 16:22:52 +02:00
|
|
|
},
|
2025-11-24 17:06:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default GeneralTab
|