made submit-on-enter a user setting, only affects chats tho
This commit is contained in:
parent
dd7f92025f
commit
6c92cbc1d1
5 changed files with 19 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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') }}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue