Merge branch 'develop' into setttingssync
This commit is contained in:
commit
3530830b07
134 changed files with 1411 additions and 1299 deletions
|
|
@ -12,7 +12,7 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import StringSetting from '../helpers/string_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import IntegerSetting from '../helpers/integer_setting.vue'
|
|||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import StringSetting from '../helpers/string_setting.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faGlobe } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ export default {
|
|||
type: String,
|
||||
default: null,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
path: {
|
||||
type: [String, Array],
|
||||
required: false,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { FontAwesomeIcon as FAIcon } from '@fortawesome/vue-fontawesome'
|
|||
|
||||
import './vertical_tab_switcher.scss'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
const findFirstUsable = (slots) => slots.findIndex((_) => _.props)
|
||||
|
||||
|
|
@ -35,11 +35,6 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
parentCollapsed: {
|
||||
required: false,
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -202,7 +197,7 @@ export default {
|
|||
</div>
|
||||
<div
|
||||
role="tabpanel"
|
||||
class={'contents' + (this.scrollableTabs ? ' scrollable-tabs' : '')}
|
||||
class="contents"
|
||||
v-body-scroll-lock={this.bodyScrollLock}
|
||||
ref="contents"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -63,10 +63,8 @@
|
|||
}
|
||||
|
||||
.tab-content-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
flex: 1 1 auto;
|
||||
height: 100%;
|
||||
|
||||
&.-hidden {
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import Modal from 'src/components/modal/modal.vue'
|
|||
import PanelLoading from 'src/components/panel_loading/panel_loading.vue'
|
||||
import Popover from '../popover/popover.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import {
|
||||
newExporter,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import RegistrationsTab from './admin_tabs/registrations_tab.vue'
|
|||
import UploadsTab from './admin_tabs/uploads_tab.vue'
|
||||
import VerticalTabSwitcher from './helpers/vertical_tab_switcher.jsx'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import ProfileTab from './tabs/profile_tab.vue'
|
|||
import SecurityTab from './tabs/security_tab/security_tab.vue'
|
||||
import StyleTab from './tabs/style_tab/style_tab.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
ref="tabSwitcher"
|
||||
class="settings_tab-switcher"
|
||||
:scrollable-tabs="true"
|
||||
:child-collapsed="childCollapsed"
|
||||
:body-scroll-lock="bodyLock"
|
||||
:hide-header="navHideHeader"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@ import UnitSetting from '../helpers/unit_setting.vue'
|
|||
import Preview from './old_theme_tab/theme_preview.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { normalizeThemeData, useInterfaceStore } from 'src/stores/interface'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { normalizeThemeData, useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import { newImporter } from 'src/services/export_import/export_import.js'
|
||||
import {
|
||||
|
|
@ -277,11 +276,11 @@ const AppearanceTab = {
|
|||
return !window.IntersectionObserver
|
||||
},
|
||||
instanceWallpaper() {
|
||||
useInstanceStore().background
|
||||
useInstanceStore().instanceIdentity.background
|
||||
},
|
||||
instanceWallpaperUsed() {
|
||||
return (
|
||||
this.instanceWallpaper &&
|
||||
useInstanceStore().instanceIdentity.background &&
|
||||
!this.$store.state.users.currentUser.background_image
|
||||
)
|
||||
},
|
||||
|
|
@ -312,9 +311,9 @@ const AppearanceTab = {
|
|||
},
|
||||
onImport(parsed, filename) {
|
||||
if (filename.endsWith('.json')) {
|
||||
this.setThemeCustom(parsed.source || parsed.theme)
|
||||
useInterfaceStore().setThemeCustom(parsed.source || parsed.theme)
|
||||
} else if (filename.endsWith('.iss')) {
|
||||
this.setStyleCustom(parsed)
|
||||
useInterfaceStore().setStyleCustom(parsed)
|
||||
}
|
||||
},
|
||||
onImportFailure(result) {
|
||||
|
|
@ -336,36 +335,35 @@ const AppearanceTab = {
|
|||
}
|
||||
},
|
||||
isThemeActive(key) {
|
||||
return key === useSyncConfigStore().mergedConfig.theme
|
||||
return (
|
||||
key ===
|
||||
(this.mergedConfig.theme || useInstanceStore().instanceIdentity.theme)
|
||||
)
|
||||
},
|
||||
isStyleActive(key) {
|
||||
return key === useSyncConfigStore().mergedConfig.style
|
||||
return (
|
||||
key ===
|
||||
(this.mergedConfig.style || useInstanceStore().instanceIdentity.style)
|
||||
)
|
||||
},
|
||||
isPaletteActive(key) {
|
||||
return (
|
||||
key ===
|
||||
(useSyncConfigStore().mergedConfig.palette ||
|
||||
useInstanceStore().palette)
|
||||
(this.mergedConfig.palette ||
|
||||
useInstanceStore().instanceIdentity.palette)
|
||||
)
|
||||
},
|
||||
...mapActions(useInterfaceStore, [
|
||||
'setStyle',
|
||||
'setStyleCustom',
|
||||
'setPalette',
|
||||
'setPaletteCustom',
|
||||
'setTheme',
|
||||
'setThemeCustom',
|
||||
]),
|
||||
setLocalPalette(name, data) {
|
||||
this.setPalette(name)
|
||||
...mapActions(useInterfaceStore, ['setStyle', 'setTheme']),
|
||||
setPalette(name, data) {
|
||||
useInterfaceStore().setPalette(name)
|
||||
this.userPalette = data
|
||||
},
|
||||
setLocalPaletteCustom(data) {
|
||||
this.setPaletteCustom(data)
|
||||
setPaletteCustom(data) {
|
||||
useInterfaceStore().setPaletteCustom(data)
|
||||
this.userPalette = data
|
||||
},
|
||||
resetTheming() {
|
||||
this.setStyle('stock')
|
||||
useInterfaceStore().setStyle('stock')
|
||||
},
|
||||
previewTheme(key, version, input) {
|
||||
let theme3
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { mapActions, mapState } from 'pinia'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { mapState as mapVuexState } from 'vuex'
|
||||
|
||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import Select from 'src/components/select/select.vue'
|
||||
|
|
@ -12,7 +11,8 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
||||
const ClutterTab = {
|
||||
components: {
|
||||
|
|
@ -25,18 +25,19 @@ const ClutterTab = {
|
|||
HelpIndicator,
|
||||
},
|
||||
computed: {
|
||||
instanceSpecificPanelPresent() {
|
||||
return useInstanceStore().showInstanceSpecificPanel
|
||||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState(useSyncConfigStore, {
|
||||
...mapState(useInstanceCapabilitiesStore, ['shoutAvailable']),
|
||||
...mapState(useInstanceStore, {
|
||||
showFeaturesPanel: (store) => store.instanceIdentity.showFeaturesPanel,
|
||||
instanceSpecificPanelPresent: (store) =>
|
||||
store.instanceIdentity.showInstanceSpecificPanel &&
|
||||
store.instanceIdentity.instanceSpecificPanelContent,
|
||||
}),
|
||||
...mapState(useServerSideStorageStore, {
|
||||
muteFilters: (store) =>
|
||||
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||
}),
|
||||
...mapVuexState({
|
||||
blockExpirationSupported: (state) => state.instance.blockExpiration,
|
||||
}),
|
||||
onMuteDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onMuteDefaultAction
|
||||
|
|
@ -88,10 +89,10 @@ const ClutterTab = {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useSyncConfigStore, [
|
||||
...mapActions(useServerSideStorageStore, [
|
||||
'setPreference',
|
||||
'unsetPreference',
|
||||
'pushSyncConfig',
|
||||
'pushServerSideStorage',
|
||||
]),
|
||||
getDatetimeLocal(timestamp) {
|
||||
const date = new Date(timestamp)
|
||||
|
|
@ -138,7 +139,7 @@ const ClutterTab = {
|
|||
filter.order = this.muteFilters.length + 2
|
||||
this.muteFiltersDraftObject[newId] = filter
|
||||
this.setPreference({ path: 'simple.muteFilters.' + newId, value: filter })
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
exportFilter(id) {
|
||||
this.exportedFilter = { ...this.muteFiltersDraftObject[id] }
|
||||
|
|
@ -154,19 +155,19 @@ const ClutterTab = {
|
|||
|
||||
this.muteFiltersDraftObject[newId] = filter
|
||||
this.setPreference({ path: 'simple.muteFilters.' + newId, value: filter })
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
deleteFilter(id) {
|
||||
delete this.muteFiltersDraftObject[id]
|
||||
this.unsetPreference({ path: 'simple.muteFilters.' + id, value: null })
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
purgeExpiredFilters() {
|
||||
this.muteFiltersExpired.forEach(([id]) => {
|
||||
delete this.muteFiltersDraftObject[id]
|
||||
this.unsetPreference({ path: 'simple.muteFilters.' + id, value: null })
|
||||
})
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
updateFilter(id, field, value) {
|
||||
const filter = { ...this.muteFiltersDraftObject[id] }
|
||||
|
|
@ -192,7 +193,7 @@ const ClutterTab = {
|
|||
path: 'simple.muteFilters.' + id,
|
||||
value: this.muteFiltersDraftObject[id],
|
||||
})
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
this.muteFiltersDraftDirty[id] = false
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@
|
|||
{{ $t('settings.hide_scrobbles_after') }}
|
||||
</UnitSetting>
|
||||
</li>
|
||||
<li v-if="instanceSpecificPanelPresent">
|
||||
<BooleanSetting path="hideISP">
|
||||
{{ $t('settings.hide_isp') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -71,7 +76,7 @@
|
|||
{{ $t('settings.user_card_hide_personal_marks') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li v-if="instanceShoutboxPresent">
|
||||
<li v-if="shoutAvailable">
|
||||
<BooleanSetting
|
||||
path="hideShoutbox"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { mapState } from 'vuex'
|
||||
import { mapState } from 'pinia'
|
||||
|
||||
import FontControl from 'src/components/font_control/font_control.vue'
|
||||
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
|
||||
|
|
@ -13,7 +13,6 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
import { cacheKey, clearCache, emojiCacheKey } from 'src/services/sw/sw.js'
|
||||
|
|
@ -30,12 +29,6 @@ import {
|
|||
library.add(faGlobe, faMessage, faPenAlt, faDatabase, faSliders)
|
||||
|
||||
const ComposingTab = {
|
||||
props: {
|
||||
parentCollapsed: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
subjectLineOptions: ['email', 'noop', 'masto'].map((mode) => ({
|
||||
|
|
@ -123,7 +116,7 @@ const ComposingTab = {
|
|||
},
|
||||
language: {
|
||||
get: function () {
|
||||
return useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||
return this.$store.getters.mergedConfig.interfaceLanguage
|
||||
},
|
||||
set: function (val) {
|
||||
this.$store.dispatch('setOption', {
|
||||
|
|
@ -133,9 +126,7 @@ const ComposingTab = {
|
|||
},
|
||||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState({
|
||||
blockExpirationSupported: (state) => state.instance.blockExpiration,
|
||||
}),
|
||||
...mapState(useInstanceStore, ['blockExpiration']),
|
||||
},
|
||||
methods: {
|
||||
changeDefaultScope(value) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import Checkbox from 'src/components/checkbox/checkbox.vue'
|
|||
import Exporter from 'src/components/exporter/exporter.vue'
|
||||
import Importer from 'src/components/importer/importer.vue'
|
||||
|
||||
import { useOAuthTokensStore } from 'src/stores/oauth_tokens'
|
||||
import { useOAuthTokensStore } from 'src/stores/oauth_tokens.js'
|
||||
|
||||
const DataImportExportTab = {
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { mapState } from 'pinia'
|
||||
|
||||
import BooleanSetting from '../helpers/boolean_setting.vue'
|
||||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
|
||||
|
|
@ -11,6 +9,14 @@ const pleromaFeCommitUrl =
|
|||
'https://git.pleroma.social/pleroma/pleroma-fe/commit/'
|
||||
|
||||
const VersionTab = {
|
||||
data() {
|
||||
const instance = useInstanceStore()
|
||||
return {
|
||||
backendVersion: instance.backendVersion,
|
||||
backendRepository: instance.backendRepository,
|
||||
frontendVersion: instance.frontendVersion,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
BooleanSetting,
|
||||
},
|
||||
|
|
@ -19,11 +25,6 @@ const VersionTab = {
|
|||
return pleromaFeCommitUrl + this.frontendVersion
|
||||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState(useInstanceStore, [
|
||||
'backendVersion',
|
||||
'backendRepository',
|
||||
'frontendVersion',
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
clearAssetCache() {
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import IntegerSetting from '../helpers/integer_setting.vue'
|
|||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
||||
import {
|
||||
newExporter,
|
||||
|
|
@ -36,11 +36,11 @@ const FilteringTab = {
|
|||
label: this.$t(`user_card.mute_block_${mode}`),
|
||||
})),
|
||||
muteFiltersDraftObject: cloneDeep(
|
||||
useSyncConfigStore().prefsStorage.simple.muteFilters,
|
||||
useServerSideStorageStore().prefsStorage.simple.muteFilters,
|
||||
),
|
||||
muteFiltersDraftDirty: Object.fromEntries(
|
||||
Object.entries(
|
||||
useSyncConfigStore().prefsStorage.simple.muteFilters,
|
||||
useServerSideStorageStore().prefsStorage.simple.muteFilters,
|
||||
).map(([k]) => [k, false]),
|
||||
),
|
||||
exportedFilter: null,
|
||||
|
|
@ -91,6 +91,13 @@ const FilteringTab = {
|
|||
HelpIndicator,
|
||||
},
|
||||
computed: {
|
||||
...SharedComputedObject(),
|
||||
...mapState(useServerSideStorageStore, {
|
||||
muteFilters: (store) =>
|
||||
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||
}),
|
||||
...mapState(useInstanceCapabilitiesStore, ['blockExpiration']),
|
||||
onMuteDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onMuteDefaultAction
|
||||
|
|
@ -140,22 +147,12 @@ const FilteringTab = {
|
|||
([, { expires }]) => expires != null && expires <= now,
|
||||
)
|
||||
},
|
||||
...mapState(useInstanceStore, {
|
||||
instanceSpecificPanelPresent: (store) => store.showInstanceSpecificPanel,
|
||||
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||
}),
|
||||
...SharedComputedObject(),
|
||||
...mapState(useSyncConfigStore, {
|
||||
muteFilters: (store) =>
|
||||
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useSyncConfigStore, [
|
||||
...mapActions(useServerSideStorageStore, [
|
||||
'setPreference',
|
||||
'unsetPreference',
|
||||
'pushSyncConfig',
|
||||
'pushServerSideStorage',
|
||||
]),
|
||||
getDatetimeLocal(timestamp) {
|
||||
const date = new Date(timestamp)
|
||||
|
|
@ -202,7 +199,7 @@ const FilteringTab = {
|
|||
filter.order = this.muteFilters.length + 2
|
||||
this.muteFiltersDraftObject[newId] = filter
|
||||
this.setPreference({ path: 'simple.muteFilters.' + newId, value: filter })
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
exportFilter(id) {
|
||||
this.exportedFilter = { ...this.muteFiltersDraftObject[id] }
|
||||
|
|
@ -218,19 +215,19 @@ const FilteringTab = {
|
|||
|
||||
this.muteFiltersDraftObject[newId] = filter
|
||||
this.setPreference({ path: 'simple.muteFilters.' + newId, value: filter })
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
deleteFilter(id) {
|
||||
delete this.muteFiltersDraftObject[id]
|
||||
this.unsetPreference({ path: 'simple.muteFilters.' + id, value: null })
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
purgeExpiredFilters() {
|
||||
this.muteFiltersExpired.forEach(([id]) => {
|
||||
delete this.muteFiltersDraftObject[id]
|
||||
this.unsetPreference({ path: 'simple.muteFilters.' + id, value: null })
|
||||
})
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
},
|
||||
updateFilter(id, field, value) {
|
||||
const filter = { ...this.muteFiltersDraftObject[id] }
|
||||
|
|
@ -256,7 +253,7 @@ const FilteringTab = {
|
|||
path: 'simple.muteFilters.' + id,
|
||||
value: this.muteFiltersDraftObject[id],
|
||||
})
|
||||
this.pushSyncConfig()
|
||||
this.pushServerSideStorage()
|
||||
this.muteFiltersDraftDirty[id] = false
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li v-if="blockExpirationSupported">
|
||||
<li v-if="blockExpiration">
|
||||
<span class="setting-item">
|
||||
<span class="setting-label">
|
||||
{{ $t('user_card.default_block_expiration') }}
|
||||
|
|
|
|||
|
|
@ -10,17 +10,11 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
||||
const GeneralTab = {
|
||||
props: {
|
||||
parentCollapsed: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
absoluteTime12hOptions: ['24h', '12h'].map((mode) => ({
|
||||
|
|
@ -43,23 +37,17 @@ const GeneralTab = {
|
|||
computed: {
|
||||
language: {
|
||||
get: function () {
|
||||
return useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||
return this.$store.getters.mergedConfig.interfaceLanguage
|
||||
},
|
||||
set: function (val) {
|
||||
useSyncConfigStore().setPreference({
|
||||
path: 'simple.interfaceLanguage',
|
||||
this.$store.dispatch('setOption', {
|
||||
name: 'interfaceLanguage',
|
||||
value: val,
|
||||
})
|
||||
useSyncConfigStore().pushSyncConfig()
|
||||
},
|
||||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState(useSyncConfigStore, {
|
||||
theme3hacks: (store) => store.mergedConfig.theme3hacks,
|
||||
}),
|
||||
...mapState(useInstanceStore, {
|
||||
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||
}),
|
||||
...mapState(useInstanceCapabilitiesStore, ['blockExpiration']),
|
||||
},
|
||||
methods: {
|
||||
updateProfile() {
|
||||
|
|
@ -77,9 +65,15 @@ const GeneralTab = {
|
|||
})
|
||||
},
|
||||
updateFont(key, value) {
|
||||
useSyncConfigStore().setPreference({
|
||||
path: `simple.theme3hacks.fonts.${key}`,
|
||||
value,
|
||||
this.$store.dispatch('setOption', {
|
||||
name: 'theme3hacks',
|
||||
value: {
|
||||
...this.mergedConfig.theme3hacks,
|
||||
fonts: {
|
||||
...this.mergedConfig.theme3hacks.fonts,
|
||||
[key]: value,
|
||||
},
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
</BooleanSetting>
|
||||
</li>
|
||||
<li
|
||||
v-if="!blockExpirationSupported"
|
||||
v-if="!blockExpiration"
|
||||
>
|
||||
<BooleanSetting
|
||||
path="modalOnBlock"
|
||||
|
|
|
|||
|
|
@ -1,19 +1,14 @@
|
|||
import { mapState } from 'pinia'
|
||||
|
||||
import BooleanSetting from '../helpers/boolean_setting.vue'
|
||||
import ChoiceSetting from '../helpers/choice_setting.vue'
|
||||
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
||||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
||||
const GeneralTab = {
|
||||
props: {
|
||||
parentCollapsed: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
thirdColumnModeOptions: ['none', 'notifications', 'postform'].map(
|
||||
|
|
@ -32,19 +27,17 @@ const GeneralTab = {
|
|||
ProfileSettingIndicator,
|
||||
},
|
||||
computed: {
|
||||
postFormats() {
|
||||
return useInstanceStore().postFormats || []
|
||||
},
|
||||
instanceShoutboxPresent() {
|
||||
return useInstanceStore().shoutAvailable
|
||||
},
|
||||
...mapState(useInstanceCapabilitiesStore, [
|
||||
'postFormats',
|
||||
'suggestionsEnabled',
|
||||
]),
|
||||
columns() {
|
||||
const mode = useSyncConfigStore().mergedConfig.thirdColumnMode
|
||||
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
||||
|
||||
const notif = mode === 'none' ? [] : ['notifs']
|
||||
|
||||
if (
|
||||
useSyncConfigStore().mergedConfig.sidebarRight ||
|
||||
this.$store.getters.mergedConfig.sidebarRight ||
|
||||
mode === 'postform'
|
||||
) {
|
||||
return [...notif, 'content', 'sidebar']
|
||||
|
|
|
|||
|
|
@ -69,11 +69,6 @@
|
|||
{{ $t('settings.show_scrollbars') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li v-if="instanceSpecificPanelPresent">
|
||||
<BooleanSetting path="hideISP">
|
||||
{{ $t('settings.hide_isp') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<UnitSetting
|
||||
path="panelHeaderSize"
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ import SelectableList from 'src/components/selectable_list/selectable_list.vue'
|
|||
import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useOAuthTokensStore } from 'src/stores/oauth_tokens'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useOAuthTokensStore } from 'src/stores/oauth_tokens.js'
|
||||
|
||||
const BlockList = withLoadMore({
|
||||
fetch: (props, $store) => $store.dispatch('fetchBlocks'),
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx'
|
|||
import Preview from './theme_preview.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
|
||||
import {
|
||||
getContrastRatioLayers,
|
||||
|
|
@ -82,7 +81,7 @@ export default {
|
|||
}),
|
||||
availableStyles: [],
|
||||
selected: '',
|
||||
selectedTheme: useSyncConfigStore().mergedConfig.theme,
|
||||
selectedTheme: this.$store.getters.mergedConfig.theme,
|
||||
themeWarning: undefined,
|
||||
tempImportFile: undefined,
|
||||
engineVersion: 0,
|
||||
|
|
@ -129,7 +128,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
const currentIndex = useInstanceStore().instanceThemesIndex
|
||||
const currentIndex = useInstanceStore().themesIndex
|
||||
|
||||
let promise
|
||||
if (currentIndex) {
|
||||
|
|
@ -138,8 +137,8 @@ export default {
|
|||
promise = useInterfaceStore().fetchThemesIndex()
|
||||
}
|
||||
|
||||
promise.then((instanceThemesIndex) => {
|
||||
Object.values(instanceThemesIndex).forEach((themeFunc) => {
|
||||
promise.then((themesIndex) => {
|
||||
Object.values(themesIndex).forEach((themeFunc) => {
|
||||
themeFunc().then(
|
||||
(themeData) => themeData && this.availableStyles.push(themeData),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,12 +6,6 @@ import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
|||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||
|
||||
const GeneralTab = {
|
||||
props: {
|
||||
parentCollapsed: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
conversationDisplayOptions: ['tree', 'linear'].map((mode) => ({
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import ProgressButton from 'src/components/progress_button/progress_button.vue'
|
|||
import Mfa from './mfa.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useOAuthTokensStore } from 'src/stores/oauth_tokens'
|
||||
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
|
@ -45,7 +46,7 @@ const SecurityTab = {
|
|||
return this.$store.state.users.currentUser
|
||||
},
|
||||
pleromaExtensionsAvailable() {
|
||||
return useInstanceStore().pleromaExtensionsAvailable
|
||||
return useInstanceCapabilitiesStore().pleromaExtensionsAvailable
|
||||
},
|
||||
oauthTokens() {
|
||||
return useOAuthTokensStore().tokens.map((oauthToken) => {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import Preview from '../old_theme_tab/theme_preview.vue'
|
|||
import VirtualDirectivesTab from './virtual_directives_tab.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config'
|
||||
|
||||
import {
|
||||
getContrastRatio,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue