Expose more features in the panel

This commit is contained in:
Chizu 2023-03-10 02:41:47 +09:00
parent 9196d4c192
commit f58d6e8d8d
5 changed files with 25 additions and 0 deletions

View file

@ -284,6 +284,9 @@ const getNodeInfo = async ({ store }) => {
store.dispatch('setInstanceOption', { name: 'pollLimits', value: metadata.pollLimits })
store.dispatch('setInstanceOption', { name: 'mailerEnabled', value: metadata.mailerEnabled })
store.dispatch('setInstanceOption', { name: 'translationEnabled', value: features.includes('akkoma:machine_translation') })
store.dispatch('setInstanceOption', { name: 'quotePosting', value: features.includes('quote_posting') })
store.dispatch('setInstanceOption', { name: 'customEmojiReactions', value: features.includes('custom_emoji_reactions') })
store.dispatch('setInstanceOption', { name: 'bubbleTimeline', value: features.includes('bubble_timeline') })
const uploadLimits = metadata.uploadLimits
store.dispatch('setInstanceOption', { name: 'uploadlimit', value: parseInt(uploadLimits.general) })

View file

@ -3,8 +3,12 @@ import fileSizeFormatService from '../../services/file_size_format/file_size_for
const FeaturesPanel = {
computed: {
shout: function () { return this.$store.state.instance.shoutAvailable },
bubbleTimeline: function () { return this.$store.state.instance.bubbleTimeline },
pleromaChatMessages: function () { return this.$store.state.instance.pleromaChatMessagesAvailable },
customEmojiReactions: function () { return this.$store.state.instance.customEmojiReactions },
gopher: function () { return this.$store.state.instance.gopherAvailable },
translationEnabled: function () { return this.$store.state.instance.translationEnabled },
quotePosting: function () { return this.$store.state.instance.quotePosting },
whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled },
mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable },
minimalScopesMode: function () { return this.$store.state.instance.minimalScopesMode },

View file

@ -11,12 +11,22 @@
<li v-if="shout">
{{ $t('features_panel.shout') }}
</li>
<li v-if="bubbleTimeline">
{{ $t('features_panel.bubble_timeline') }}
</li>
<li v-if="pleromaChatMessages">
{{ $t('features_panel.pleroma_chat_messages') }}
</li>
</li>
<li v-if="customEmojiReactions">
{{ $t('features_panel.custom_emoji_reactions') }}
</li>
<li v-if="gopher">
{{ $t('features_panel.gopher') }}
</li>
<li v-if="quotePosting">
{{ $t('features_panel.quote_posting') }}
</li>
<li v-if="whoToFollow">
{{ $t('features_panel.who_to_follow') }}
</li>

View file

@ -101,6 +101,10 @@
"features_panel": {
"shout": "Shoutbox",
"pleroma_chat_messages": "Pleroma Chat",
"custom_emoji_reactions": "Custom emoji reactions",
"quote_posting": "Quote boosts",
"bubble_timeline": "Bubble Timeline",
"akkoma:machine_translation": "Machine Translation",
"gopher": "Gopher",
"media_proxy": "Media proxy",
"scope_options": "Scope options",

View file

@ -90,7 +90,11 @@ const defaultState = {
// Feature-set, apparently, not everything here is reported...
shoutAvailable: false,
bubbleTimeline: false,
pleromaChatMessagesAvailable: false,
customEmojiReactions: false,
quotePosting: false,
akkoma:machine_translation: false,
gopherAvailable: false,
mediaProxyAvailable: false,
suggestionsEnabled: false,