From 34b60efede615389e3cf86fda79922da37e62173 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 30 Jul 2026 16:59:59 +0300 Subject: [PATCH 1/6] added "open in thread view" status button for chat view --- src/components/chat_message/chat_message.vue | 1 + .../status_action_buttons/action_button.js | 2 ++ .../buttons_definitions.js | 19 ++++++++++++++++++- .../status_action_buttons.js | 5 +++++ src/i18n/en.json | 1 + 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/components/chat_message/chat_message.vue b/src/components/chat_message/chat_message.vue index c3deac0a5..62818d23e 100644 --- a/src/components/chat_message/chat_message.vue +++ b/src/components/chat_message/chat_message.vue @@ -108,6 +108,7 @@ fixed-pinned use-default-buttons hide-labels + in-chat-view @toggle-replying="$emit('replyRequested', message)" />
Date: Thu, 30 Jul 2026 17:08:33 +0300 Subject: [PATCH 2/6] layout fixes --- src/App.js | 2 +- src/components/chat_message/chat_message.scss | 2 +- src/components/chat_view/chat_view.scss | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/App.js b/src/App.js index 934b96713..6bfbf16be 100644 --- a/src/App.js +++ b/src/App.js @@ -186,7 +186,7 @@ export default { return useShoutStore().joined }, isChats() { - return this.$route.name === 'chat' || this.$route.name === 'chats' + return this.$route.name === 'chat' || this.$route.name === 'chats' || this.$route.name === 'conversation2' }, isListEdit() { return this.$route.name === 'lists-edit' diff --git a/src/components/chat_message/chat_message.scss b/src/components/chat_message/chat_message.scss index becf1c0b0..e23ca3bd0 100644 --- a/src/components/chat_message/chat_message.scss +++ b/src/components/chat_message/chat_message.scss @@ -12,7 +12,7 @@ } .attachments { - min-width: 30em; + min-width: 10em; } .quoted-post { diff --git a/src/components/chat_view/chat_view.scss b/src/components/chat_view/chat_view.scss index d8031b1a7..87028c7c4 100644 --- a/src/components/chat_view/chat_view.scss +++ b/src/components/chat_view/chat_view.scss @@ -1,7 +1,5 @@ .chat-view { display: flex; - margin-bottom: -1em; - margin-top: -1em; .chat-list-wrapper { display: flex; From 7fae7ad9b6d326656051c29b038e706b5296d447 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 30 Jul 2026 17:10:21 +0300 Subject: [PATCH 3/6] fix chat list --- src/components/chat_list_item/chat_list_item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chat_list_item/chat_list_item.js b/src/components/chat_list_item/chat_list_item.js index 3bbb93d60..c95895def 100644 --- a/src/components/chat_list_item/chat_list_item.js +++ b/src/components/chat_list_item/chat_list_item.js @@ -60,7 +60,7 @@ const ChatListItem = { name: 'chat', params: { username: this.currentUser.screen_name, - recipient_id: this.chat.account.id, + chatUserId: this.chat.account.id, }, }) } From d0956b9ade73e53b182e04b8914d57e3a7a525c9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 30 Jul 2026 17:19:45 +0300 Subject: [PATCH 4/6] hide shoutbox in chats --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 6bfbf16be..f3f3872bf 100644 --- a/src/App.js +++ b/src/App.js @@ -205,7 +205,7 @@ export default { ) }, hideShoutbox() { - return useMergedConfigStore().mergedConfig.hideShoutbox + return this.isChats || useMergedConfigStore().mergedConfig.hideShoutbox }, reverseLayout() { const { thirdColumnMode, sidebarRight: reverseSetting } = From dd7f92025fb05a204677729b2f5956d8c58beccb Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 30 Jul 2026 17:20:43 +0300 Subject: [PATCH 5/6] disable submit if there is no replied status (i.e. conversation isn't loaded) --- src/components/chat_view/chat_view.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chat_view/chat_view.vue b/src/components/chat_view/chat_view.vue index f0a40ebc6..ebe3cc99c 100644 --- a/src/components/chat_view/chat_view.vue +++ b/src/components/chat_view/chat_view.vue @@ -103,7 +103,7 @@ :disable-preview="!isConversation" :disable-draft="!isConversation" - :disable-submit="isConversation ? false : (errorLoadingChat || !chat)" + :disable-submit="isConversation ? !!replyStatus : (errorLoadingChat || !chat)" :optimistic-posting="!isConversation" :submit-on-enter="!mobileLayout" From 6c92cbc1d1a038a31529e4bbfff3e64bd2e84fcd Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 30 Jul 2026 17:24:08 +0300 Subject: [PATCH 6/6] made submit-on-enter a user setting, only affects chats tho --- src/components/chat_view/chat_view.vue | 4 ++-- src/components/post_status_form/post_status_form.js | 5 ++++- src/components/settings_modal/tabs/composing_tab.vue | 7 +++++++ src/i18n/en.json | 1 + src/modules/default_config_state.js | 5 +++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/components/chat_view/chat_view.vue b/src/components/chat_view/chat_view.vue index ebe3cc99c..bc75ef64d 100644 --- a/src/components/chat_view/chat_view.vue +++ b/src/components/chat_view/chat_view.vue @@ -106,8 +106,8 @@ :disable-submit="isConversation ? !!replyStatus : (errorLoadingChat || !chat)" :optimistic-posting="!isConversation" - :submit-on-enter="!mobileLayout" - :preserve-focus="!mobileLayout" + chat-view + preserve-focus :auto-focus="!mobileLayout" :placeholder="formPlaceholder" :file-limit="isConversation ? null : 1" diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6b26103ef..3b5daf56f 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -98,13 +98,13 @@ const PostStatusForm = { draftId: String, // ID of the draft to be used // Chats stuff + chatView: Boolean, // Used for the "submit on enter" user setting maxHeight: Number, placeholder: String, postHandler: Function, // Used to override poster to use chats one instead of status one preserveFocus: Boolean, // Keep focus on form after posting autoFocus: Boolean, // Steal focus when form is opened fileLimit: Number, // Chats only support 1 attachment :( - submitOnEnter: Boolean, emojiPickerPlacement: String, optimisticPosting: Boolean, // Don't wait for confirmation that post is done @@ -562,6 +562,9 @@ const PostStatusForm = { useMergedConfigStore().mergedConfig.hideScopeNotice ) }, + submitOnEnter() { + return this.chatView && this.mergedConfig.chatSubmitOnEnter + }, // Global stuff currentUser() { diff --git a/src/components/settings_modal/tabs/composing_tab.vue b/src/components/settings_modal/tabs/composing_tab.vue index 755539096..b8c156bd3 100644 --- a/src/components/settings_modal/tabs/composing_tab.vue +++ b/src/components/settings_modal/tabs/composing_tab.vue @@ -83,6 +83,13 @@ {{ $t('settings.subject_line_behavior') }} +
  • + + {{ $t('settings.submit_on_enter_in_chats') }} + +
  • {{ $t('settings.attachments') }} diff --git a/src/i18n/en.json b/src/i18n/en.json index 0da52d5c3..60fcaf1dd 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -780,6 +780,7 @@ "subject_line_email": "Like email: \"re: subject\"", "subject_line_mastodon": "Like mastodon: copy as is", "subject_line_noop": "Do not copy", + "submit_on_enter_in_chats": "Send message on Enter in chats", "force_theme_recompilation_debug": "Disable theme cahe, force recompile on each boot", "conversation_display": "Conversation display style", "conversation_display_tree": "Tree-style", diff --git a/src/modules/default_config_state.js b/src/modules/default_config_state.js index d9a2ba247..9935e88ce 100644 --- a/src/modules/default_config_state.js +++ b/src/modules/default_config_state.js @@ -673,6 +673,11 @@ export const LOCAL_DEFAULT_CONFIG_DEFINITIONS = { type: 'string', default: null, }, + chatSubmitOnEnter: { + description: 'Post status on enter key in chats and chat view', + type: 'boolean', + default: false, + }, themeDebug: { description: 'Debug mode that uses computed backgrounds instead of real ones to debug contrast functions',