2020-09-30 22:43:07 +00:00
|
|
|
import BooleanSetting from '../helpers/boolean_setting.vue'
|
2021-03-11 14:55:14 +00:00
|
|
|
import ChoiceSetting from '../helpers/choice_setting.vue'
|
2020-05-10 03:46:06 +00:00
|
|
|
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
|
|
|
|
|
2020-06-06 21:15:10 +00:00
|
|
|
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
2020-10-20 18:03:46 +00:00
|
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
|
|
import {
|
2020-10-20 19:13:19 +00:00
|
|
|
faGlobe
|
2020-10-20 18:03:46 +00:00
|
|
|
} from '@fortawesome/free-solid-svg-icons'
|
|
|
|
|
|
|
|
library.add(
|
2020-10-20 19:13:19 +00:00
|
|
|
faGlobe
|
2020-10-20 18:03:46 +00:00
|
|
|
)
|
2020-05-10 03:46:06 +00:00
|
|
|
|
|
|
|
const GeneralTab = {
|
|
|
|
data () {
|
|
|
|
return {
|
2021-03-11 14:55:14 +00:00
|
|
|
subjectLineOptions: ['email', 'noop', 'masto'].map(mode => ({
|
|
|
|
key: mode,
|
|
|
|
value: mode,
|
|
|
|
label: this.$t(`settings.subject_line_${mode === 'masto' ? 'mastodon' : mode}`)
|
|
|
|
})),
|
2021-08-07 22:53:23 +00:00
|
|
|
conversationDisplayOptions: ['tree', 'simple_tree', 'linear'].map(mode => ({
|
2021-08-07 00:18:27 +00:00
|
|
|
key: mode,
|
|
|
|
value: mode,
|
|
|
|
label: this.$t(`settings.conversation_display_${mode}`)
|
|
|
|
})),
|
2021-09-05 20:35:47 +00:00
|
|
|
conversationOtherRepliesButtonOptions: ['below', 'inside'].map(mode => ({
|
|
|
|
key: mode,
|
|
|
|
value: mode,
|
|
|
|
label: this.$t(`settings.conversation_other_replies_button_${mode}`)
|
|
|
|
})),
|
2022-01-10 06:16:33 +00:00
|
|
|
mentionLinkDisplayOptions: ['short', 'full_for_remote', 'full'].map(mode => ({
|
|
|
|
key: mode,
|
|
|
|
value: mode,
|
|
|
|
label: this.$t(`settings.mention_link_display_${mode}`)
|
|
|
|
})),
|
2020-05-10 03:46:06 +00:00
|
|
|
loopSilentAvailable:
|
|
|
|
// 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
|
2020-05-25 00:43:55 +00:00
|
|
|
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks')
|
2020-05-10 03:46:06 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
2020-09-30 22:43:07 +00:00
|
|
|
BooleanSetting,
|
2021-03-11 14:55:14 +00:00
|
|
|
ChoiceSetting,
|
|
|
|
InterfaceLanguageSwitcher
|
2020-05-10 03:46:06 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
postFormats () {
|
|
|
|
return this.$store.state.instance.postFormats || []
|
|
|
|
},
|
2021-03-11 14:55:14 +00:00
|
|
|
postContentOptions () {
|
|
|
|
return this.postFormats.map(format => ({
|
|
|
|
key: format,
|
|
|
|
value: format,
|
|
|
|
label: this.$t(`post_status.content_type["${format}"]`)
|
|
|
|
}))
|
|
|
|
},
|
2020-05-10 03:46:06 +00:00
|
|
|
instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel },
|
2020-12-16 16:25:07 +00:00
|
|
|
instanceWallpaperUsed () {
|
|
|
|
return this.$store.state.instance.background &&
|
|
|
|
!this.$store.state.users.currentUser.background_image
|
|
|
|
},
|
2021-06-15 00:59:36 +00:00
|
|
|
instanceShoutboxPresent () { return this.$store.state.instance.shoutAvailable },
|
2020-05-10 03:46:06 +00:00
|
|
|
...SharedComputedObject()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default GeneralTab
|