separate featureset into instancecapabilites store
This commit is contained in:
parent
848d48e404
commit
1e93e0a9c3
40 changed files with 239 additions and 247 deletions
|
|
@ -15,6 +15,10 @@ export default {
|
|||
type: String,
|
||||
default: null,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
path: {
|
||||
type: [String, Array],
|
||||
required: false,
|
||||
|
|
|
|||
|
|
@ -35,11 +35,6 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
parentCollapsed: {
|
||||
required: false,
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -202,7 +197,6 @@ export default {
|
|||
</div>
|
||||
<div
|
||||
role="tabpanel"
|
||||
class={'contents' + (this.scrollableTabs ? ' scrollable-tabs' : '')}
|
||||
v-body-scroll-lock={this.bodyScrollLock}
|
||||
ref="contents"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
ref="tabSwitcher"
|
||||
class="settings_tab-switcher"
|
||||
:scrollable-tabs="true"
|
||||
:child-collapsed="childCollapsed"
|
||||
:body-scroll-lock="bodyLock"
|
||||
:hide-header="navHideHeader"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ 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 { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
||||
const ClutterTab = {
|
||||
|
|
@ -25,14 +25,12 @@ const ClutterTab = {
|
|||
},
|
||||
computed: {
|
||||
...SharedComputedObject(),
|
||||
...mapState(useInstanceCapabilitiesStore, ['shoutAvailable']),
|
||||
...mapState(useServerSideStorageStore, {
|
||||
muteFilters: (store) =>
|
||||
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||
}),
|
||||
...mapState(useInstanceStore, {
|
||||
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||
}),
|
||||
onMuteDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onMuteDefaultAction
|
||||
|
|
|
|||
|
|
@ -73,7 +73,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'
|
||||
|
|
@ -29,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) => ({
|
||||
|
|
@ -132,9 +126,7 @@ const ComposingTab = {
|
|||
},
|
||||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState(useInstanceStore, {
|
||||
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||
}),
|
||||
...mapState(useInstanceStore, ['blockExpiration']),
|
||||
},
|
||||
methods: {
|
||||
changeDefaultScope(value) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ 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 { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
||||
|
|
@ -97,9 +97,7 @@ const FilteringTab = {
|
|||
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||
}),
|
||||
...mapState(useInstanceStore, {
|
||||
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||
}),
|
||||
...mapState(useInstanceCapabilitiesStore, ['blockExpiration']),
|
||||
onMuteDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onMuteDefaultAction
|
||||
|
|
|
|||
|
|
@ -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,16 +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 { 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) => ({
|
||||
|
|
@ -52,9 +47,7 @@ const GeneralTab = {
|
|||
},
|
||||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState(useInstanceStore, {
|
||||
blockExpirationSupported: (store) => store.featureSet.blockExpiration,
|
||||
}),
|
||||
...mapState(useInstanceCapabilitiesStore, ['blockExpiration']),
|
||||
},
|
||||
methods: {
|
||||
updateProfile() {
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
</BooleanSetting>
|
||||
</li>
|
||||
<li
|
||||
v-if="!blockExpirationSupported"
|
||||
v-if="!blockExpiration"
|
||||
>
|
||||
<BooleanSetting
|
||||
path="modalOnBlock"
|
||||
|
|
|
|||
|
|
@ -6,15 +6,9 @@ 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 { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
||||
const GeneralTab = {
|
||||
props: {
|
||||
parentCollapsed: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
thirdColumnModeOptions: ['none', 'notifications', 'postform'].map(
|
||||
|
|
@ -33,12 +27,11 @@ const GeneralTab = {
|
|||
ProfileSettingIndicator,
|
||||
},
|
||||
computed: {
|
||||
...mapState(useInstanceStore, {
|
||||
postFormats: (store) => store.featureSet.postFormats || [],
|
||||
instanceSpecificPanelPresent: (store) =>
|
||||
store.instanceIdentity.instanceSpecificPanelPresent,
|
||||
instanceShoutboxPresent: (store) => store.featureSet.shoutAvailable,
|
||||
}),
|
||||
...mapState(useInstanceCapabilitiesStore, [
|
||||
'instanceSpecificPanelPresent',
|
||||
'postFormats',
|
||||
'suggestionsEnabled',
|
||||
]),
|
||||
columns() {
|
||||
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
||||
|
||||
|
|
|
|||
|
|
@ -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().featureSet.pleromaExtensionsAvailable
|
||||
return useInstanceCapabilitiesStore().pleromaExtensionsAvailable
|
||||
},
|
||||
oauthTokens() {
|
||||
return useOAuthTokensStore().tokens.map((oauthToken) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue