mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 03:10:15 +01:00
🖌️ feat: Optional Display Username in Messages, Send/Stop Button Style, Localization (#1592)
* 👤add: Username instead of 'You' when sending messages. * 🌎: Added a new translation for 'You' and updated the existing translation for Spanish. * fix: remove "!" * Added: New setting Account for show username in messages chore (StopButon and SendButon): Updated to new style of ChatGPT chore Update and Added news translations: Spanish, English and Portuguese Brazilian * fix: message component definition and imports order, remove unnecessary useEffect and localStorage set, fix localStorage key in store * chore: update readme.md * chore: optimize condition for messageLabel * chore(Message.tsx): remove empty blocks --------- Co-authored-by: Raí Santos <140329135+itzraiss@users.noreply.github.com>
This commit is contained in:
parent
3df58532d9
commit
f133bb98fe
8 changed files with 223 additions and 115 deletions
|
|
@ -88,6 +88,25 @@ const LaTeXParsing = atom<boolean>({
|
|||
] as const,
|
||||
});
|
||||
|
||||
const UsernameDisplay = atom<boolean>({
|
||||
key: 'UsernameDisplay',
|
||||
default: localStorage.getItem('UsernameDisplay') === 'true',
|
||||
effects: [
|
||||
({ setSelf, onSet }) => {
|
||||
const savedValue = localStorage.getItem('UsernameDisplay');
|
||||
if (savedValue != null) {
|
||||
setSelf(savedValue === 'true');
|
||||
}
|
||||
|
||||
onSet((newValue: unknown) => {
|
||||
if (typeof newValue === 'boolean') {
|
||||
localStorage.setItem('UsernameDisplay', newValue.toString());
|
||||
}
|
||||
});
|
||||
},
|
||||
] as const,
|
||||
});
|
||||
|
||||
export default {
|
||||
abortScroll,
|
||||
optionSettings,
|
||||
|
|
@ -98,4 +117,5 @@ export default {
|
|||
autoScroll,
|
||||
modularChat,
|
||||
LaTeXParsing,
|
||||
UsernameDisplay,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue