made submit-on-enter a user setting, only affects chats tho

This commit is contained in:
Henry Jameson 2026-07-30 17:24:08 +03:00
commit 6c92cbc1d1
5 changed files with 19 additions and 3 deletions

View file

@ -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"

View file

@ -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() {

View file

@ -83,6 +83,13 @@
{{ $t('settings.subject_line_behavior') }}
</ChoiceSetting>
</li>
<li>
<BooleanSetting
path="chatSubmitOnEnter"
>
{{ $t('settings.submit_on_enter_in_chats') }}
</BooleanSetting>
</li>
</ul>
<h3 v-if="expertLevel > 0">
{{ $t('settings.attachments') }}