mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-25 19:56:13 +01:00
🅰️ feat: Dynamic Font Size (#3568)
* wip: general setup * added: translations for font-size * fix: prompts related linter errors and add theming * wip: font size selector * refactor: Update FontSizeSelector options display property * refactor: adjust Intersection Observer threshold and debounce rate * feat: Update selectedPrompt type in PromptForm to be optional * feat: dynamic font size * refactor: Update message font size in navigation bar * refactor: Update code analyze block styling * refactor: ProgressText dynamic font size * refactor: move FontSizeSelector component to Chat from General settings * fix: HoverButtons styling for better visibility * refactor: Update HoverButtons styling for better visibility --------- Co-authored-by: kraken <solodarken@gmail.com>
This commit is contained in:
parent
b390ba781f
commit
2bb0842650
44 changed files with 340 additions and 132 deletions
|
|
@ -1,10 +1,6 @@
|
|||
import { atom } from 'recoil';
|
||||
import { atomWithLocalStorage } from '~/store/utils';
|
||||
|
||||
enum PromptsEditorMode {
|
||||
SIMPLE = 'simple',
|
||||
ADVANCED = 'advanced',
|
||||
}
|
||||
import { PromptsEditorMode } from '~/common';
|
||||
|
||||
// Static atoms without localStorage
|
||||
const staticAtoms = {
|
||||
|
|
@ -23,7 +19,10 @@ const localStorageAtoms = {
|
|||
autoSendPrompts: atomWithLocalStorage('autoSendPrompts', true),
|
||||
alwaysMakeProd: atomWithLocalStorage('alwaysMakeProd', true),
|
||||
// Editor mode
|
||||
promptsEditorMode: atomWithLocalStorage<string>('promptsEditorMode', PromptsEditorMode.SIMPLE),
|
||||
promptsEditorMode: atomWithLocalStorage<PromptsEditorMode>(
|
||||
'promptsEditorMode',
|
||||
PromptsEditorMode.SIMPLE,
|
||||
),
|
||||
};
|
||||
|
||||
export default { ...staticAtoms, ...localStorageAtoms, PromptsEditorMode };
|
||||
export default { ...staticAtoms, ...localStorageAtoms };
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ const localStorageAtoms = {
|
|||
// General settings
|
||||
autoScroll: atomWithLocalStorage('autoScroll', false),
|
||||
hideSidePanel: atomWithLocalStorage('hideSidePanel', false),
|
||||
fontSize: atomWithLocalStorage('fontSize', 'text-base'),
|
||||
|
||||
// Messages settings
|
||||
enterToSend: atomWithLocalStorage('enterToSend', true),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue