pleroma-fe/src/components/settings_modal/tabs/general_tab.js

46 lines
1.4 KiB
JavaScript
Raw Normal View History

import BooleanSetting from '../helpers/boolean_setting.vue'
import Select from '../../select/select.vue'
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 {
faGlobe
2020-10-20 18:03:46 +00:00
} from '@fortawesome/free-solid-svg-icons'
library.add(
faGlobe
2020-10-20 18:03:46 +00:00
)
const GeneralTab = {
data () {
return {
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')
}
},
components: {
BooleanSetting,
InterfaceLanguageSwitcher,
Select
},
computed: {
postFormats () {
return this.$store.state.instance.postFormats || []
},
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
},
...SharedComputedObject()
}
}
export default GeneralTab