2026-01-06 16:23:17 +02:00
|
|
|
import FontControl from 'src/components/font_control/font_control.vue'
|
2025-11-24 17:06:55 +02:00
|
|
|
import BooleanSetting from '../helpers/boolean_setting.vue'
|
|
|
|
|
import ChoiceSetting from '../helpers/choice_setting.vue'
|
2025-11-25 20:39:44 +02:00
|
|
|
import IntegerSetting from '../helpers/integer_setting.vue'
|
2025-11-24 17:06:55 +02:00
|
|
|
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
|
|
|
|
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|
|
|
|
|
|
|
|
|
const GeneralTab = {
|
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
|
|
|
conversationDisplayOptions: ['tree', 'linear'].map((mode) => ({
|
2025-11-24 17:06:55 +02:00
|
|
|
key: mode,
|
|
|
|
|
value: mode,
|
2026-01-06 16:22:52 +02:00
|
|
|
label: this.$t(`settings.conversation_display_${mode}`),
|
2025-11-24 17:06:55 +02:00
|
|
|
})),
|
2026-01-06 16:22:52 +02:00
|
|
|
conversationOtherRepliesButtonOptions: ['below', 'inside'].map(
|
|
|
|
|
(mode) => ({
|
|
|
|
|
key: mode,
|
|
|
|
|
value: mode,
|
|
|
|
|
label: this.$t(`settings.conversation_other_replies_button_${mode}`),
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
mentionLinkDisplayOptions: ['short', 'full_for_remote', 'full'].map(
|
|
|
|
|
(mode) => ({
|
|
|
|
|
key: mode,
|
|
|
|
|
value: mode,
|
|
|
|
|
label: this.$t(`settings.mention_link_display_${mode}`),
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
userPopoverAvatarActionOptions: ['close', 'zoom', 'open'].map((mode) => ({
|
2025-11-24 17:06:55 +02:00
|
|
|
key: mode,
|
|
|
|
|
value: mode,
|
2026-01-06 16:22:52 +02:00
|
|
|
label: this.$t(`settings.user_popover_avatar_action_${mode}`),
|
2025-11-24 17:06:55 +02:00
|
|
|
})),
|
2026-01-06 16:22:52 +02:00
|
|
|
unsavedPostActionOptions: ['save', 'discard', 'confirm'].map((mode) => ({
|
2025-11-24 17:06:55 +02:00
|
|
|
key: mode,
|
|
|
|
|
value: mode,
|
2026-01-06 16:22:52 +02:00
|
|
|
label: this.$t(`settings.unsaved_post_action_${mode}`),
|
2025-11-24 17:06:55 +02:00
|
|
|
})),
|
|
|
|
|
loopSilentAvailable:
|
2026-01-06 16:22:52 +02:00
|
|
|
// Firefox
|
|
|
|
|
Object.getOwnPropertyDescriptor(
|
|
|
|
|
HTMLVideoElement.prototype,
|
|
|
|
|
'mozHasAudio',
|
|
|
|
|
) ||
|
|
|
|
|
// Chrome-likes
|
|
|
|
|
Object.getOwnPropertyDescriptor(
|
|
|
|
|
HTMLMediaElement.prototype,
|
|
|
|
|
'webkitAudioDecodedByteCount',
|
|
|
|
|
) ||
|
|
|
|
|
// Future spec, still not supported in Nightly 63 as of 08/2018
|
|
|
|
|
Object.getOwnPropertyDescriptor(
|
|
|
|
|
HTMLMediaElement.prototype,
|
|
|
|
|
'audioTracks',
|
|
|
|
|
),
|
2025-11-24 17:06:55 +02:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
BooleanSetting,
|
|
|
|
|
ChoiceSetting,
|
2025-11-25 20:39:44 +02:00
|
|
|
IntegerSetting,
|
2025-11-24 17:06:55 +02:00
|
|
|
FontControl,
|
2026-01-06 16:22:52 +02:00
|
|
|
ProfileSettingIndicator,
|
2025-11-24 17:06:55 +02:00
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...SharedComputedObject(),
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2026-01-06 16:22:52 +02:00
|
|
|
updateFont(key, value) {
|
2026-02-16 02:24:44 +02:00
|
|
|
useSyncConfigStore().setPreference({
|
|
|
|
|
path: 'simple.theme3hacks',
|
2025-11-24 17:06:55 +02:00
|
|
|
value: {
|
|
|
|
|
...this.mergedConfig.theme3hacks,
|
|
|
|
|
fonts: {
|
|
|
|
|
...this.mergedConfig.theme3hacks.fonts,
|
2026-01-06 16:22:52 +02:00
|
|
|
[key]: value,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-11-24 17:06:55 +02:00
|
|
|
})
|
|
|
|
|
},
|
2026-01-06 16:22:52 +02:00
|
|
|
},
|
2025-11-24 17:06:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default GeneralTab
|