From 94e07f1ead513ce85c89c23eb7e06edbff29b61b Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Tue, 21 Jul 2020 13:29:54 +0300 Subject: [PATCH] Fix shortening MRF policies on the new tab --- src/views/settings/components/Inputs.vue | 2 +- .../inputComponents/SelectInputWithReducedLabels.vue | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/views/settings/components/Inputs.vue b/src/views/settings/components/Inputs.vue index d8ca8cc2..b22ba620 100644 --- a/src/views/settings/components/Inputs.vue +++ b/src/views/settings/components/Inputs.vue @@ -276,7 +276,7 @@ export default { ':parsers', ':providers', ':method', - ':rewrite_policy', + ':policies', 'Pleroma.Web.Auth.Authenticator' ].includes(this.setting.key) || (this.settingGroup.key === 'Pleroma.Emails.Mailer' && this.setting.key === ':adapter') diff --git a/src/views/settings/components/inputComponents/SelectInputWithReducedLabels.vue b/src/views/settings/components/inputComponents/SelectInputWithReducedLabels.vue index 8e7b9129..9b6b6140 100644 --- a/src/views/settings/components/inputComponents/SelectInputWithReducedLabels.vue +++ b/src/views/settings/components/inputComponents/SelectInputWithReducedLabels.vue @@ -56,7 +56,7 @@ export default { inputValue() { if (this.setting.key === 'Pleroma.Web.Auth.Authenticator') { return this.data.value - } else if (this.setting.key === ':rewrite_policy') { + } else if (this.setting.key === ':policies') { return typeof this.data[this.setting.key] === 'string' ? [this.data[this.setting.key]] : this.data[this.setting.key] @@ -71,7 +71,7 @@ export default { methods: { options(suggestions) { const prefixes = { - ':rewrite_policy': 'Pleroma.Web.ActivityPub.MRF.', + ':policies': 'Pleroma.Web.ActivityPub.MRF.', 'Pleroma.Web.Auth.Authenticator': 'Pleroma.Web.Auth.', ':method': 'Pleroma.Captcha.', ':adapter': 'Swoosh.Adapters.', @@ -100,14 +100,6 @@ export default { this.setting.key === ':args' ) }, - rewritePolicyOptions(suggestions) { - return suggestions.map(element => { - const label = element.split('Pleroma.Web.ActivityPub.MRF.')[1] - ? element.split('Pleroma.Web.ActivityPub.MRF.')[1] - : element - return { value: element, label } - }) - }, updateSetting(value, group, key, input, type) { const updatedValue = getBooleanValue(value) this.$store.dispatch('UpdateSettings', { group, key, input, value: updatedValue, type })