From 6184c88ac70b33e66a87222142344f693406bd87 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 3 Mar 2019 15:15:41 +0200 Subject: Initial work on deprecating scopeModesEnabled in favor of minimalScopeMode --- src/modules/instance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/instance.js') diff --git a/src/modules/instance.js b/src/modules/instance.js index c31d02b9..7b67890f 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -15,7 +15,6 @@ const defaultState = { redirectRootNoLogin: '/main/all', redirectRootLogin: '/main/friends', showInstanceSpecificPanel: false, - scopeOptionsEnabled: true, formattingOptionsEnabled: false, alwaysShowSubjectInput: true, collapseMessageWithSubject: false, @@ -31,6 +30,7 @@ const defaultState = { vapidPublicKey: undefined, noAttachmentLinks: false, showFeaturesPanel: true, + minimalScopesMode: false, // Nasty stuff pleromaBackend: true, -- cgit v1.2.3-70-g09d2 From c9a9b3122db9c2c089e36930ed2a252f80de71cd Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 2 Apr 2019 10:26:14 -0400 Subject: #469 - DM warning text should vary based on BE setting --- src/boot/after_store.js | 3 ++- src/components/post_status_form/post_status_form.js | 4 ++++ src/components/post_status_form/post_status_form.vue | 2 +- src/modules/instance.js | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/modules/instance.js') diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 862a534d..f2c1aa0f 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -9,12 +9,13 @@ const getStatusnetConfig = async ({ store }) => { const res = await window.fetch('/api/statusnet/config.json') if (res.ok) { const data = await res.json() - const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey } = data.site + const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey, safeDMMentionsEnabled } = data.site store.dispatch('setInstanceOption', { name: 'name', value: name }) store.dispatch('setInstanceOption', { name: 'registrationOpen', value: (registrationClosed === '0') }) store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) }) store.dispatch('setInstanceOption', { name: 'server', value: server }) + store.dispatch('setInstanceOption', { name: 'safeDM', value: safeDMMentionsEnabled !== '0' }) // TODO: default values for this stuff, added if to not make it break on // my dev config out of the box. diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 40e2610e..d52abeee 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -179,6 +179,10 @@ const PostStatusForm = { }, postFormats () { return this.$store.state.instance.postFormats || [] + }, + showDirectWarning () { + console.log(this.$store.state.instance) + return this.$store.state.instance.safeDM && this.newStatus.visibility === 'direct' } }, methods: { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 3d3a1082..2f70a2ad 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -9,7 +9,7 @@ class="visibility-notice"> {{ $t('post_status.account_not_locked_warning_link') }} -

{{ $t('post_status.direct_warning') }}

+

{{ $t('post_status.direct_warning') }}