mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
✨ feat: Add 'EnterToSend' Option & Update Br. Translation 🇧🇷 (#2413)
* chore: Add EnterToSend, Translation Portuguese Brazilian Update * Inverted selection and corrected translation * fix: removed Trailing spaces not allowed * feat: Refactor key event handler & updated translations * fix: removed return; & updated files translations * fix: duplicate switchs on General.tsx * fix: added again switch * refactor(useTextarea): limit refactoring of handleKeyDown * refactor: correct keyDown handler and add English localization --------- Co-authored-by: Raí Santos <140329135+itzraiss@users.noreply.github.com> Co-authored-by: Raí Santos <raimorningstarchristus@gmail.com>
This commit is contained in:
parent
f380f261a5
commit
d2d9ac0280
7 changed files with 966 additions and 896 deletions
|
|
@ -156,6 +156,25 @@ const UsernameDisplay = atom<boolean>({
|
|||
] as const,
|
||||
});
|
||||
|
||||
const enterToSend = atom<boolean>({
|
||||
key: 'enterToSend',
|
||||
default: true,
|
||||
effects: [
|
||||
({ setSelf, onSet }) => {
|
||||
const savedValue = localStorage.getItem('enterToSend');
|
||||
if (savedValue != null) {
|
||||
setSelf(savedValue === 'true');
|
||||
}
|
||||
|
||||
onSet((newValue: unknown) => {
|
||||
if (typeof newValue === 'boolean') {
|
||||
localStorage.setItem('enterToSend', newValue.toString());
|
||||
}
|
||||
});
|
||||
},
|
||||
] as const,
|
||||
});
|
||||
|
||||
export default {
|
||||
abortScroll,
|
||||
showFiles,
|
||||
|
|
@ -166,6 +185,7 @@ export default {
|
|||
showBingToneSetting,
|
||||
showPopover,
|
||||
autoScroll,
|
||||
enterToSend,
|
||||
showCode,
|
||||
hideSidePanel,
|
||||
modularChat,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue