2024-05-22 19:54:19 +03:00
|
|
|
import BooleanSetting from '../helpers/boolean_setting.vue'
|
|
|
|
|
import ChoiceSetting from '../helpers/choice_setting.vue'
|
|
|
|
|
import IntegerSetting from '../helpers/integer_setting.vue'
|
|
|
|
|
import FloatSetting from '../helpers/float_setting.vue'
|
2024-06-13 02:22:47 +03:00
|
|
|
import UnitSetting, { defaultHorizontalUnits } from '../helpers/unit_setting.vue'
|
2024-05-22 19:54:19 +03:00
|
|
|
|
2024-06-27 00:59:24 +03:00
|
|
|
import FontControl from 'src/components/font_control/font_control.vue'
|
|
|
|
|
|
2024-05-22 19:54:19 +03:00
|
|
|
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|
|
|
|
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
|
|
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
|
|
|
import {
|
|
|
|
|
faGlobe
|
|
|
|
|
} from '@fortawesome/free-solid-svg-icons'
|
|
|
|
|
|
|
|
|
|
library.add(
|
|
|
|
|
faGlobe
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const AppearanceTab = {
|
|
|
|
|
data () {
|
2024-06-13 02:22:47 +03:00
|
|
|
return {
|
|
|
|
|
thirdColumnModeOptions: ['none', 'notifications', 'postform'].map(mode => ({
|
|
|
|
|
key: mode,
|
|
|
|
|
value: mode,
|
|
|
|
|
label: this.$t(`settings.third_column_mode_${mode}`)
|
2024-06-21 22:46:01 +03:00
|
|
|
})),
|
|
|
|
|
forcedRoundnessOptions: ['disabled', 'sharp', 'nonsharp', 'round'].map((mode, i) => ({
|
|
|
|
|
key: mode,
|
|
|
|
|
value: i - 1,
|
|
|
|
|
label: this.$t(`settings.forced_roundness_mode_${mode}`)
|
2024-06-13 02:22:47 +03:00
|
|
|
}))
|
|
|
|
|
}
|
2024-05-22 19:54:19 +03:00
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
BooleanSetting,
|
|
|
|
|
ChoiceSetting,
|
|
|
|
|
IntegerSetting,
|
|
|
|
|
FloatSetting,
|
|
|
|
|
UnitSetting,
|
2024-06-27 00:59:24 +03:00
|
|
|
ProfileSettingIndicator,
|
|
|
|
|
FontControl
|
2024-05-22 19:54:19 +03:00
|
|
|
},
|
|
|
|
|
computed: {
|
2024-06-13 02:22:47 +03:00
|
|
|
horizontalUnits () {
|
|
|
|
|
return defaultHorizontalUnits
|
|
|
|
|
},
|
2024-06-27 00:59:24 +03:00
|
|
|
fontsOverride () {
|
|
|
|
|
return this.$store.getters.mergedConfig.fontsOverride
|
|
|
|
|
},
|
2024-06-13 02:22:47 +03:00
|
|
|
columns () {
|
|
|
|
|
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
|
|
|
|
|
|
|
|
|
const notif = mode === 'none' ? [] : ['notifs']
|
|
|
|
|
|
|
|
|
|
if (this.$store.getters.mergedConfig.sidebarRight || mode === 'postform') {
|
|
|
|
|
return [...notif, 'content', 'sidebar']
|
|
|
|
|
} else {
|
|
|
|
|
return ['sidebar', 'content', ...notif]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel },
|
2024-05-22 19:54:19 +03:00
|
|
|
instanceWallpaperUsed () {
|
|
|
|
|
return this.$store.state.instance.background &&
|
|
|
|
|
!this.$store.state.users.currentUser.background_image
|
|
|
|
|
},
|
2024-06-13 02:22:47 +03:00
|
|
|
instanceShoutboxPresent () { return this.$store.state.instance.shoutAvailable },
|
|
|
|
|
language: {
|
|
|
|
|
get: function () { return this.$store.getters.mergedConfig.interfaceLanguage },
|
|
|
|
|
set: function (val) {
|
|
|
|
|
this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-22 19:54:19 +03:00
|
|
|
...SharedComputedObject()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default AppearanceTab
|