From 2f479c670fae0ac0d8262efaaf793938552ea0f3 Mon Sep 17 00:00:00 2001
From: FloatingGhost
Date: Tue, 23 May 2023 13:46:59 +0100
Subject: [PATCH] Add DM settings
---
src/components/settings_modal/tabs/general_tab.vue | 1 -
src/components/settings_modal/tabs/profile_tab.js | 11 ++++++++++-
src/components/settings_modal/tabs/profile_tab.vue | 12 ++++++++++++
src/i18n/en.json | 4 ++++
.../entity_normalizer/entity_normalizer.service.js | 1 +
5 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index 5d135711..7dc1c3f1 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -21,7 +21,6 @@
>
{{ $t('settings.settings_profile_force_sync') }}
-
({
+ key: mode,
+ value: mode,
+ label: this.$t(`settings.user_accepts_direct_messages_from_${mode}`)
+ }))
}
},
components: {
+ ChoiceSetting,
ScopeSelector,
ImageCropper,
EmojiInput,
@@ -126,7 +134,8 @@ const ProfileTab = {
fields_attributes: this.newFields.filter(el => el != null),
bot: this.bot,
show_role: this.showRole,
- status_ttl_days: this.expirePosts ? this.newPostTTLDays : -1
+ status_ttl_days: this.expirePosts ? this.newPostTTLDays : -1,
+ accepts_direct_messages_from: this.userAcceptsDirectMessagesFrom
/* eslint-enable camelcase */
}
diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue
index 8748b685..9f80582f 100644
--- a/src/components/settings_modal/tabs/profile_tab.vue
+++ b/src/components/settings_modal/tabs/profile_tab.vue
@@ -89,6 +89,15 @@
{{ $t('settings.bot') }}
+
+
+ {{ $t('settings.user_accepts_direct_messages_from') }}
+
+
{{ $t('settings.expire_posts_enabled') }}
@@ -102,6 +111,9 @@
class="expire-posts-days"
:placeholder="$t('settings.expire_posts_input_placeholder')"
/>
+
+
+
{
output.friends_count = data.following_count
output.bot = data.bot
+ output.accepts_direct_messages_from = data.accepts_direct_messages_from
output.follow_requests_count = data.follow_requests_count
if (data.akkoma) {
output.instance = data.akkoma.instance