enhance(frontend): 「Enterキーを押して送信」オプションに関係なく、チャットでEnterキーを押して送信するように強制する。

This commit is contained in:
NoriDev 2023-09-29 14:09:46 +09:00
parent 6b419e9d1f
commit 9e5a1043e8
5 changed files with 5 additions and 12 deletions

View file

@ -80,6 +80,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
- Enhance: '타임라인 상단에 글 작성란 표시' 옵션이 활성화 되었을 때 autofocus를 사용하지 않도록
- Enhance: 로컬 유저만 그룹에 초대할 수 있도록
- Enhance: 노트를 게시한 방식에 따라 토스트 알림의 아이콘과 내용이 다르게 표시되도록
- Enhance: 'Enter 키를 눌러 보내기' 옵션에 관계없이 채팅에서 Enter 키를 눌러 전송하도록 강제함
- Fix: (Friendly) 흐림 효과를 사용할 때 하단 내비게이션 바의 가독성이 매우 떨어지는 문제
- Fix: (Friendly) 위젯 버튼에서 'UI 애니메이션 줄이기' 옵션이 적용되지 않는 문제
- Fix: (Friendly) 스크롤을 해도 위젯 버튼이 숨겨지지 않는 문제

View file

@ -1228,7 +1228,7 @@ _cherrypick:
nickname: "Nickname function"
nicknameDescription: "On the user page, you can change the user's name to anything you like by clicking or tapping on it. The change will be reflected only to you.\nThis can be used to identify users who change their names frequently."
useEnterToSend: "Press Enter to send"
useEnterToSendDescription: "When the option is enabled, you can use the Shift + Enter key for line break."
useEnterToSendDescription: "When the option is enabled, you can use the Shift + Enter key for line break. Sending chats is not affected by the options."
postFormVisibilityHotkey: "Toggle visibility with a hotkey"
postFormVisibilityHotkeyDescription: "When writing a note, press Ctrl(control) + Shift to switch the visibility range. The hotkey to make it Local only is Ctrl(command or control) + Alt(option)."
showRenoteConfirmPopup: "Show confirmation popup when renote"

View file

@ -1234,7 +1234,7 @@ _cherrypick:
nickname: "ニックネーム機能"
nicknameDescription: "ユーザーページにて、ユーザーの名前をクリック/タップすることで好きなものに変更できるようになります。変更は自分にのみ反映されます。\n頻繁に名前を変更するユーザーを識別するときなどに使えます。"
useEnterToSend: "Enterキーを押して送信"
useEnterToSendDescription: "オプションを有効にすると、行替えはShiftEnterキーでできます。"
useEnterToSendDescription: "オプションを有効にすると、行替えはShiftEnterキーでできます。チャットを送信するときはオプションの影響を受けません。"
postFormVisibilityHotkey: "ショートカットキーで公開範囲を切り替える"
postFormVisibilityHotkeyDescription: "ートを作成する際、Ctrl(control) + Shiftキーを押すと公開範囲を切り替えることができます。ローカルのみショートカットキーは、Ctrl(commandまたはcontrol) + Alt(option)キーです。"
showRenoteConfirmPopup: "Renoteするときに確認ポップアップを表示"

View file

@ -1217,7 +1217,7 @@ _cherrypick:
nickname: "닉네임 기능"
nicknameDescription: "유저 페이지에서 이름을 클릭 또는 탭하여 원하는 이름으로 변경할 수 있어요. 변경한 이름은 자신에게만 반영돼요.\n자주 이름을 바꾸는 사용자를 식별하는 데 사용할 수 있어요."
useEnterToSend: "Enter 키를 눌러 보내기"
useEnterToSendDescription: "옵션을 활성화하면 줄 바꿈은 Shift + Enter 키로 할 수 있어요."
useEnterToSendDescription: "옵션을 활성화하면 줄 바꿈은 Shift + Enter 키로 할 수 있어요. 대화를 전송할 때는 옵션의 영향을 받지 않아요."
postFormVisibilityHotkey: "단축키로 공개 범위 전환하기"
postFormVisibilityHotkeyDescription: "노트를 작성할 때, Ctrl(control) + Shift 키를 누르면 공개 범위를 전환할 수 있어요. 로컬에만 보이게 하는 단축키는 Ctrl(command 또는 control) + Alt(option) 키에요."
showRenoteConfirmPopup: "리노트할 때 확인 팝업 표시"

View file

@ -148,15 +148,7 @@ function onDrop(ev: DragEvent): void {
function onKeydown(ev: KeyboardEvent) {
typing();
if (defaultStore.state.useEnterToSend && !ev.shiftKey) {
if ((ev.key === 'Enter') && canSend) {
send();
}
} else {
if ((ev.key === 'Enter') && (ev.ctrlKey || ev.metaKey) && canSend) {
send();
}
}
if ((ev.key === 'Enter') && !ev.shiftKey && canSend) send();
}
function onCompositionUpdate() {