commit: 441eea36837a132b841d6c7423e146990b48ab16
parent 99cff7e28b6f99620e18936af8b4fe8f725eb156
Author: tusooa <tusooa@kazv.moe>
Date: Mon, 17 Jul 2023 17:28:36 -0400
Do not show quote options for servers without quote support
Diffstat:
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
@@ -259,6 +259,7 @@ const getNodeInfo = async ({ store }) => {
store.dispatch('setInstanceOption', { name: 'editingAvailable', value: features.includes('editing') })
store.dispatch('setInstanceOption', { name: 'pollLimits', value: metadata.pollLimits })
store.dispatch('setInstanceOption', { name: 'mailerEnabled', value: metadata.mailerEnabled })
+ store.dispatch('setInstanceOption', { name: 'quotingAvailable', value: features.includes('quote_posting') })
const uploadLimits = metadata.uploadLimits
store.dispatch('setInstanceOption', { name: 'uploadlimit', value: parseInt(uploadLimits.general) })
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
@@ -268,6 +268,10 @@ const PostStatusForm = {
return typeof this.statusId !== 'undefined' && this.statusId.trim() !== ''
},
quotable () {
+ if (!this.$store.state.instance.quotingAvailable) {
+ return false
+ }
+
if (!this.replyTo) {
return false
}
diff --git a/src/modules/instance.js b/src/modules/instance.js
@@ -128,6 +128,7 @@ const defaultState = {
mediaProxyAvailable: false,
suggestionsEnabled: false,
suggestionsWeb: '',
+ quotingAvailable: false,
// Html stuff
instanceSpecificPanelContent: '',