implement ChoiceSetting for settings modal similar to BooleanSetting
This commit is contained in:
parent
3870a30aea
commit
1f0ac68fcd
6 changed files with 103 additions and 52 deletions
|
@ -1,5 +1,5 @@
|
|||
import BooleanSetting from '../helpers/boolean_setting.vue'
|
||||
import Select from '../../select/select.vue'
|
||||
import ChoiceSetting from '../helpers/choice_setting.vue'
|
||||
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
|
||||
|
||||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
|
@ -15,6 +15,11 @@ library.add(
|
|||
const GeneralTab = {
|
||||
data () {
|
||||
return {
|
||||
subjectLineOptions: ['email', 'noop', 'masto'].map(mode => ({
|
||||
key: mode,
|
||||
value: mode,
|
||||
label: this.$t(`settings.subject_line_${mode === 'masto' ? 'mastodon' : mode}`)
|
||||
})),
|
||||
loopSilentAvailable:
|
||||
// Firefox
|
||||
Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') ||
|
||||
|
@ -26,13 +31,20 @@ const GeneralTab = {
|
|||
},
|
||||
components: {
|
||||
BooleanSetting,
|
||||
InterfaceLanguageSwitcher,
|
||||
Select
|
||||
ChoiceSetting,
|
||||
InterfaceLanguageSwitcher
|
||||
},
|
||||
computed: {
|
||||
postFormats () {
|
||||
return this.$store.state.instance.postFormats || []
|
||||
},
|
||||
postContentOptions () {
|
||||
return this.postFormats.map(format => ({
|
||||
key: format,
|
||||
value: format,
|
||||
label: this.$t(`post_status.content_type["${format}"]`)
|
||||
}))
|
||||
},
|
||||
instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel },
|
||||
instanceWallpaperUsed () {
|
||||
return this.$store.state.instance.background &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue