fix featurespanel

This commit is contained in:
Henry Jameson 2026-02-10 18:53:01 +02:00
commit 8dce2d75aa
2 changed files with 15 additions and 11 deletions

View file

@ -3,17 +3,18 @@ import { mapState } from 'pinia'
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js' import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
import { useInstanceStore } from 'src/stores/instance.js' import { useInstanceStore } from 'src/stores/instance.js'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
const FeaturesPanel = { const FeaturesPanel = {
computed: { computed: {
...mapState(useInstanceCapabilitiesStore, [
'shoutAvailable',
'pleromaChatMessagesAvailable',
'gopherAvailable',
'suggestionsEnabled',
'mediaProxyAvailable',
]),
...mapState(useInstanceStore, { ...mapState(useInstanceStore, {
shout: (store) => store.shoutAvailable,
pleromaChatMessages: (store) =>
store.featureSet.pleromaChatMessagesAvailable,
gopher: (store) => store.featureSet.gopherAvailable,
whoToFollow: (store) => store.featureSet.suggestionsEnabled,
mediaProxy: (store) => store.featureSet.mediaProxyAvailable,
minimalScopesMode: (store) => store.prefsStorage.minimalScopesMode,
textlimit: (store) => store.limits.textlimit, textlimit: (store) => store.limits.textlimit,
uploadlimit: (store) => uploadlimit: (store) =>
fileSizeFormatService.fileSizeFormat(store.limits.uploadlimit), fileSizeFormatService.fileSizeFormat(store.limits.uploadlimit),

View file

@ -8,19 +8,22 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
<ul> <ul>
<li v-if="shoutAvailable">
{{ $t('features_panel.shout') }}
</li>
<li v-if="shout"> <li v-if="shout">
{{ $t('features_panel.shout') }} {{ $t('features_panel.shout') }}
</li> </li>
<li v-if="pleromaChatMessages"> <li v-if="pleromaChatMessagesAvailable">
{{ $t('features_panel.pleroma_chat_messages') }} {{ $t('features_panel.pleroma_chat_messages') }}
</li> </li>
<li v-if="gopher"> <li v-if="gopherAvailable">
{{ $t('features_panel.gopher') }} {{ $t('features_panel.gopher') }}
</li> </li>
<li v-if="whoToFollow"> <li v-if="suggestionsEnabled">
{{ $t('features_panel.who_to_follow') }} {{ $t('features_panel.who_to_follow') }}
</li> </li>
<li v-if="mediaProxy"> <li v-if="mediaProxyAvailable">
{{ $t('features_panel.media_proxy') }} {{ $t('features_panel.media_proxy') }}
</li> </li>
<li>{{ $t('features_panel.scope_options') }}</li> <li>{{ $t('features_panel.scope_options') }}</li>