2023-08-04 16:51:23 -04:00
|
|
|
import {
|
|
|
|
|
TConversation,
|
|
|
|
|
useGetConversationsQuery,
|
|
|
|
|
useSearchQuery,
|
|
|
|
|
TSearchResults,
|
|
|
|
|
} from 'librechat-data-provider';
|
|
|
|
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
|
|
import { useRecoilValue, useSetRecoilState } from 'recoil';
|
refactor: Settings/Presets UI Restructure, convert many files to TS (#740)
* progress on settings refactor
* fix(helpers.js): replace fs.rmdirSync with fs.rm to delete node_modules directory recursively
fix(packages.js): delete package-lock.json if it exists before running the script
* feat(CrossIcon.tsx): add CrossIcon component
* wip: refactor Options for modularity into higher order components, OptionsBar > ModelSelect/Settings
* refactor: import more from utils/index, including cardStyle used by model select/settings
* refactor(AnthropicOptions): refactor to new format, OpenAI: reduce format to name of endpoint
* refactor(AnthropicSettings): refactor to new format, match defaults to API docs
* fix: google and anthropic defaults
* refactor(conversation/submission atoms): add typing, remove unused code
* chore(types.ts): add missing type definitions for TMessages, TMessagesAtom, TConversationAtom, and ModelSelectProps
feat(types.ts): make endpoint property nullable in TSubmission, TEndpointOption, TConversation, and TPreset types
* refactor(ChatGPT): refactor to new format, add omit settings logic
* refactor(EndpointSettings/BingAI): new dir structure and format BingAI options/settings to new
* fix: update useUpdateTokenCountMutation to accept an object with a 'text' property instead of a string
* fix(endpoints): ensure expected behaviors for preset dialogs
* chore(index.ts): add defaultTextProps to utils/index.ts for use in settings components
* chore(index.ts): add optionText to utils/index.ts for use in settings components
* wip: refactor google settings
* wip: progress with Google refactor, needs AdditionalButtons handling and global state setters
* refactor(OptionsBar.tsx): The setOption function has been refactored to use the useSetOptions custom hook for setting conversation options.
* chore(Anthropic.tsx, BingAI.tsx, Google.tsx, OpenAI.tsx): adjust height of container div in Settings component; chore(Examples.tsx): adjust height in Examples component
* refactor(Google): complete google refactor
feat(client): add new component PopoverButtons for displaying popover buttons in EndpointPopover
feat(data-provider): add types for PopoverButton and EndpointOptionsPopoverProps
* fix(OptionsBar.tsx): add useEffect hook to handle opacity class based on messagesTree and advancedMode
fix(style.css): rename class from 'openAIOptions-simple-container' to 'options-bar' and update references
* refactor(Plugins/OptionsBar): complete refactor of Plugins Select options, consolidate logic from TextChat to OptionsBar
* fix(Plugins.tsx): filter lastSelectedTools to remove any tools that are not in the current tools list
fix(useSetOptions.ts): remove unnecessary empty line
* feat(useSetOptions.ts): add setAgentOption function to update agentOptions in conversation state
feat(types.ts): add setAgentOption function to UseSetOptions type
* refactor(Settings/Plugins): refactor to new format, refactor(OptionHover): use same component for all endpoints
* refactor(OptionHover.tsx): refactor types object to use nested objects for openAI and gptPlugins
feat(OptionHover.tsx): add openAI object with specific properties for openAI configuration
* refactor(AgentSettings): new format, feat(types.ts): add TAgentOptions type for defining agent options in a conversation
* feat(PopoverButtons.tsx): add support for GPT plugin settings button
feat(Plugins.tsx): create PluginsView component for displaying plugin settings
feat(optionSettings.ts): add showAgentSettings atom for controlling agent settings visibility
* feat(client): add support for PluginsSettings in Input/Settings component
fix(client): change import path for PluginsSettings in Input/Settings component
* refactor(Settings/Plugins): complete refactor, store: refactor to TS, refactor: import defaultTextPropsLabel from utils
* feat(EndpointSettings, AgentSettings, Anthropic, Google, types.ts): Add support for Recoil state management and useRecoilValue hook; Pass models from endpointsConfig to various components; Add TModels type and update ModelSelectProps type.
fix(AgentSettings, Anthropic, Google, GoogleView, Plugins, OpenAI, Settings.tsx): Change import statements for ModelSelectProps from librechat-data-provider; Add models as a parameter to various components; Add models prop to PluginsView, Settings, and other components.
* refactor(EditPresetDialog.jsx): update import statements for Examples and AgentSettings components
feat(Settings/index.ts): add export statements for Examples and AgentSettings components
* chore(package.json): update eslint-plugin-import to version 2.28.0
* fix(eslint): dependency cycle rule is now working
* fix: dependency cycle errors and type errors
* refactor(EditPresetDialog.jsx): update import path for DialogTemplate component
refactor(NewConversationMenu/index.jsx): update import path for DialogTemplate component
refactor(ExportModel.jsx): update import path for DialogTemplate component
* refactor: rename NewConversationMenu to EndpointMenu
* style: mobile and desktop optimizations
* chore: eslint changes
* chore(eslintrc.js): update eslint configuration to use 'prettier' plugin
chore(postcss.config.cjs): update postcss configuration to use single quotes for require statements
fix(helpers.js): fix fs.rmSync function call to delete node_modules directory recursively
feat(update.js): add support for skipping git commands with '-g' flag
* chore(ModelSelect.tsx): add support for azureOpenAI option component
chore(Settings.tsx): add support for azureOpenAI option component
chore(package.json): add rebuild:package-lock and update:branch scripts
* fix(OptionHover.tsx): fix accessing nested properties in types object
feat(OptionHover.tsx): add check for existence of text before rendering HoverCardContent
* chore(style.css): update transition duration for options-bar from 0.3s to 0.25s
* fix(ScrollToBottom.jsx): fix z-index value for scroll button
* style: improve dialogs
* fix(Nav.jsx): adjust width and max-width of nav component
* chore(Nav.jsx): update max-width class for nav component in different screen sizes
chore(Dialog.tsx): update class for DialogFooter component to use flex-row layout
* fix(client): fix node_module resolution with path mapping
* fix(AdjustToneButton.jsx): add z-index to adjust tone button for proper layering
fix(TextChat.jsx): change onClick function to use arrow function to avoid immediate execution
fix(mobile.css): update z-index for nav and nav-mask for proper layering
chore(package.json): rename update:branch script to reinstall for clarity and consistency
* fix(OptionsBar/Settings): add null checks for conversation in BingAI.tsx, ChatGPT.tsx, Plugins.tsx, Settings.tsx
* style(TextChat/OptionsBar): match official site styles, setup regen/continue/stop buttons div
* chore: Import and apply removeFocusOutlines utility across various components, and rename removeButtonOutline to removeFocusOutlines
chore(Settings): Remove unused import and conditionally return null if conversation is falsy
* feat(hooks): add useLocalize hook
The useLocalize hook is added to the hooks/index.ts file. This hook allows for localization of phrases using the localize function from the ~/localization/Translation module. The hook uses the lang value from the store to determine the current language and returns a function that takes a phraseKey and optional values array as arguments and returns the localized phrase.
* refactor(OptionHover.tsx): Update text keys for OptionHover component, use new hook: useLocalize
* refactor(useDocumentTitle.ts): refactor to TS
* fix(typescript): type issues and update typescript linting deps
* refactor: Update ThemeContext and useOnClickOutside to TypeScript
chore(useDidMountEffect.js): Remove useDidMountEffect hook
* feat: GenerationButtons for stop/continue/regen, remove AdjustToneButton in favor of alternate advanced mode/Settings in OptionsBar
* fix(EndpointOptionsPopover.tsx): change switchToSimpleMode function name to closePopover
fix(GenerationButtons.tsx): change advancedMode prop name to showPopover
fix(OptionsBar.tsx): change advancedMode state name to showPopover
feat(OptionsBar.tsx): add logic to show/hide popover based on showPopover state
fix(types.ts): change switchToSimpleMode function name to closePopover
* chore: remove template button
* chore(GenerationButtons.tsx): adjust positioning of the div element
chore(Plugins.tsx): adjust width of the MultiSelectDropDown component
chore(OptionsBar.tsx): adjust padding of the button element
* refactor(EditPresetDialog): use new modular higher order components
* chore(newoptionsbar.html): delete unused file newoptionsbar.html
* refactor(EditPresetDialog): convert to TS
* chore(babel.config.cjs): update babel configuration, linting
* chore(EditPresetDialog.tsx): update className for DialogTemplate to include pb-0
chore(EndpointOptionsDialog.jsx): update className for DialogTemplate to include pb-0
chore(PopoverButtons.tsx): add buttonClass prop to PopoverButtons component
chore(DialogTemplate.tsx): update className for the footer div to include h-auto
chore(Dropdown.jsx): remove id prop from Dropdown component
chore(mobile.css): update transition duration for .nav class from 0.2s to 0.15s
* refactor(EditPresetDialog.tsx): simplify localization usage with hook
* chore(EditPresetDialog.tsx): update containerClassName to include z-index value
* fix(endpoints.ts): change type of endpointsConfig atom to TEndpointsConfig
refactor(cleanupPreset.ts): convert to TS
fix(index.ts): export cleanupPreset utility function
fix(types.ts): add missing properties to TPreset type
* refactor(EndpointOptionsDialog): convert to TS
* fix(EditPresetDialog.tsx):
- import cleanupPreset from index
- add null check before submitting preset
- add null check before exporting preset
refactor(SaveAsPresetDialog.tsx): convert to TS
fix(usePresetOptions.ts): import cleanupPreset from index
fix(types.ts):
- make title prop optional in EditPresetProps
- change preset prop in CleanupPreset to be partial
* chore: reorganize imports in App, EndpointMenu, Messages, and ExportModel components
feat(ScreenshotContext.jsx): add ScreenshotContext to hooks/index
chore(index.ts): export ThemeContext, ScreenshotContext, ApiErrorBoundaryContext hooks, cleanupPreset, and getIcon functions from utils
* wip: add headerClassName for dialog template
* chore(EndpointOptionsDialog.tsx): remove unused headerClassName prop
chore(EndpointOptionsDialog.tsx): adjust height of main container in mobile and desktop view
* fix(react-query-service.ts): change return type of useGetEndpointsQuery to QueryObserverResult<t.TEndpointsConfig>
* refactor: imports from index and refactor to TS
* refactor: refactor all svg components to TS
* refactor: refactor all UI components to TS, remove unused component
* fix(SelectDropDown.tsx): remove file extension from import statement for CheckMark component
* fix: SaveAsPresetDialog typing issue
* fix(OptionsBar): close popover when an endpoint with no settings is selected
* chore(ChatGPT.tsx): update width of model select dropdown to 60px
refactor(types.ts): decouple ModelSelectProps from SettingsProps
* fix(popover Settings): space taken from the options menu for each endpoint
* fix:'Set token first' element alignment, add padding to endpointmenu icon in mobile
* style: match official site header
* refactor(EndpointOptionsDialog): make functionality explicitly saving current convos as presets
* fix(useLocalize.ts): change values parameter from an array to rest parameters
* refactor(EndpointSettings): Utilize useLocalize hook for all endpoint settings
* fix(Popover): correct spacing/center and remove focus outlines for close button
* chore: employ use of cn (clsx) in Popover styles
* chore(EditPresetDialog.tsx): update className to add padding bottom
chore(EndpointOptionsDialog.tsx): update className to add padding bottom
* style(EndpointMenu, TextChat): add better styling at diff. breakpoints
* refactor(EndpointSettings): consolidate container style to higher order component
* refactor(EditPresetDialog.tsx): pass custom style to Settings from here
* style: setting dialogs improved in all views
* style(EndpointMenu): improve UX for mobile
* style(PresetDialog): increase height so scrollbar isn't triggered
* chore(EditPresetDialog.tsx): update className to include xl height for DialogTemplate
chore(InputNumber.tsx): update className to include max height for InputNumber component
* fix: light mode styling
* fix(OptionsBar/ScrollToBottom/Popover): quick fix to rework in future: hide scrollToBottom when Popover is open
* style: remove bg-gradient around textarea in mobile view
* chore(ThemeContext.tsx): refactor ThemeContext to use default context value, also fixes type issue
* chore(EditPresetDialog.tsx): adjust grid layout in EditPresetDialog component
* style(TextChat): make gradient more opaque/smoother
* fix(TextChat.jsx): fix background gradient color based on theme and system preference
* test(layout-test-utils.tsx): add mock implementation for window.matchMedia in test setup
feat(layout-test-utils.tsx): add authConfig prop to AuthContextProvider in renderWithProvidersWrapper function
chore(tsconfig.json): include test directory in tsconfig include section
* chore(jest.config.cjs): update test file paths in jest configuration
chore(Login.spec.tsx): update test file path in import statement
chore(LoginForm.spec.tsx): update test file path in import statement
chore(Registration.spec.tsx): update test file path in import statement
chore(PluginAuthForm.spec.tsx): update test file path in import statement
chore(PluginStoreDialog.spec.tsx): update test file path in import statement
chore(layout-test-utils.tsx): move matchMedia mock to separate file
chore(tsconfig.json): add path mapping for test files in client directory
* test: add import for 'test/matchMedia.mock' in test files
The changes in this commit add an import statement for 'test/matchMedia.mock' in multiple test files. This import is necessary for mocking the behavior of the matchMedia function during testing.
* style(ClearConvosDialog): remove borders from button and modal, uniform button size
* fix(AgentSettings.tsx): overlapping issue
* fix(PresetDialogs): improve spacing of top row and dialog content
* style(Settings): 2nd column will now dynamically adjust better across all screen sizes
* style(ModelSelect): improve styling for mobile/desktop, add hover shadow
feat(ModelSelect/Plugins): hide ModelSelect when screen is small
* refactor(RowButton, buildTree): convert to TS
* style(ModelSelect): add transition effect to shadows on hover
2023-08-04 13:56:44 -04:00
|
|
|
import NewChat from './NewChat';
|
2023-08-05 19:54:56 +05:30
|
|
|
import SearchBar from './SearchBar';
|
refactor: Settings/Presets UI Restructure, convert many files to TS (#740)
* progress on settings refactor
* fix(helpers.js): replace fs.rmdirSync with fs.rm to delete node_modules directory recursively
fix(packages.js): delete package-lock.json if it exists before running the script
* feat(CrossIcon.tsx): add CrossIcon component
* wip: refactor Options for modularity into higher order components, OptionsBar > ModelSelect/Settings
* refactor: import more from utils/index, including cardStyle used by model select/settings
* refactor(AnthropicOptions): refactor to new format, OpenAI: reduce format to name of endpoint
* refactor(AnthropicSettings): refactor to new format, match defaults to API docs
* fix: google and anthropic defaults
* refactor(conversation/submission atoms): add typing, remove unused code
* chore(types.ts): add missing type definitions for TMessages, TMessagesAtom, TConversationAtom, and ModelSelectProps
feat(types.ts): make endpoint property nullable in TSubmission, TEndpointOption, TConversation, and TPreset types
* refactor(ChatGPT): refactor to new format, add omit settings logic
* refactor(EndpointSettings/BingAI): new dir structure and format BingAI options/settings to new
* fix: update useUpdateTokenCountMutation to accept an object with a 'text' property instead of a string
* fix(endpoints): ensure expected behaviors for preset dialogs
* chore(index.ts): add defaultTextProps to utils/index.ts for use in settings components
* chore(index.ts): add optionText to utils/index.ts for use in settings components
* wip: refactor google settings
* wip: progress with Google refactor, needs AdditionalButtons handling and global state setters
* refactor(OptionsBar.tsx): The setOption function has been refactored to use the useSetOptions custom hook for setting conversation options.
* chore(Anthropic.tsx, BingAI.tsx, Google.tsx, OpenAI.tsx): adjust height of container div in Settings component; chore(Examples.tsx): adjust height in Examples component
* refactor(Google): complete google refactor
feat(client): add new component PopoverButtons for displaying popover buttons in EndpointPopover
feat(data-provider): add types for PopoverButton and EndpointOptionsPopoverProps
* fix(OptionsBar.tsx): add useEffect hook to handle opacity class based on messagesTree and advancedMode
fix(style.css): rename class from 'openAIOptions-simple-container' to 'options-bar' and update references
* refactor(Plugins/OptionsBar): complete refactor of Plugins Select options, consolidate logic from TextChat to OptionsBar
* fix(Plugins.tsx): filter lastSelectedTools to remove any tools that are not in the current tools list
fix(useSetOptions.ts): remove unnecessary empty line
* feat(useSetOptions.ts): add setAgentOption function to update agentOptions in conversation state
feat(types.ts): add setAgentOption function to UseSetOptions type
* refactor(Settings/Plugins): refactor to new format, refactor(OptionHover): use same component for all endpoints
* refactor(OptionHover.tsx): refactor types object to use nested objects for openAI and gptPlugins
feat(OptionHover.tsx): add openAI object with specific properties for openAI configuration
* refactor(AgentSettings): new format, feat(types.ts): add TAgentOptions type for defining agent options in a conversation
* feat(PopoverButtons.tsx): add support for GPT plugin settings button
feat(Plugins.tsx): create PluginsView component for displaying plugin settings
feat(optionSettings.ts): add showAgentSettings atom for controlling agent settings visibility
* feat(client): add support for PluginsSettings in Input/Settings component
fix(client): change import path for PluginsSettings in Input/Settings component
* refactor(Settings/Plugins): complete refactor, store: refactor to TS, refactor: import defaultTextPropsLabel from utils
* feat(EndpointSettings, AgentSettings, Anthropic, Google, types.ts): Add support for Recoil state management and useRecoilValue hook; Pass models from endpointsConfig to various components; Add TModels type and update ModelSelectProps type.
fix(AgentSettings, Anthropic, Google, GoogleView, Plugins, OpenAI, Settings.tsx): Change import statements for ModelSelectProps from librechat-data-provider; Add models as a parameter to various components; Add models prop to PluginsView, Settings, and other components.
* refactor(EditPresetDialog.jsx): update import statements for Examples and AgentSettings components
feat(Settings/index.ts): add export statements for Examples and AgentSettings components
* chore(package.json): update eslint-plugin-import to version 2.28.0
* fix(eslint): dependency cycle rule is now working
* fix: dependency cycle errors and type errors
* refactor(EditPresetDialog.jsx): update import path for DialogTemplate component
refactor(NewConversationMenu/index.jsx): update import path for DialogTemplate component
refactor(ExportModel.jsx): update import path for DialogTemplate component
* refactor: rename NewConversationMenu to EndpointMenu
* style: mobile and desktop optimizations
* chore: eslint changes
* chore(eslintrc.js): update eslint configuration to use 'prettier' plugin
chore(postcss.config.cjs): update postcss configuration to use single quotes for require statements
fix(helpers.js): fix fs.rmSync function call to delete node_modules directory recursively
feat(update.js): add support for skipping git commands with '-g' flag
* chore(ModelSelect.tsx): add support for azureOpenAI option component
chore(Settings.tsx): add support for azureOpenAI option component
chore(package.json): add rebuild:package-lock and update:branch scripts
* fix(OptionHover.tsx): fix accessing nested properties in types object
feat(OptionHover.tsx): add check for existence of text before rendering HoverCardContent
* chore(style.css): update transition duration for options-bar from 0.3s to 0.25s
* fix(ScrollToBottom.jsx): fix z-index value for scroll button
* style: improve dialogs
* fix(Nav.jsx): adjust width and max-width of nav component
* chore(Nav.jsx): update max-width class for nav component in different screen sizes
chore(Dialog.tsx): update class for DialogFooter component to use flex-row layout
* fix(client): fix node_module resolution with path mapping
* fix(AdjustToneButton.jsx): add z-index to adjust tone button for proper layering
fix(TextChat.jsx): change onClick function to use arrow function to avoid immediate execution
fix(mobile.css): update z-index for nav and nav-mask for proper layering
chore(package.json): rename update:branch script to reinstall for clarity and consistency
* fix(OptionsBar/Settings): add null checks for conversation in BingAI.tsx, ChatGPT.tsx, Plugins.tsx, Settings.tsx
* style(TextChat/OptionsBar): match official site styles, setup regen/continue/stop buttons div
* chore: Import and apply removeFocusOutlines utility across various components, and rename removeButtonOutline to removeFocusOutlines
chore(Settings): Remove unused import and conditionally return null if conversation is falsy
* feat(hooks): add useLocalize hook
The useLocalize hook is added to the hooks/index.ts file. This hook allows for localization of phrases using the localize function from the ~/localization/Translation module. The hook uses the lang value from the store to determine the current language and returns a function that takes a phraseKey and optional values array as arguments and returns the localized phrase.
* refactor(OptionHover.tsx): Update text keys for OptionHover component, use new hook: useLocalize
* refactor(useDocumentTitle.ts): refactor to TS
* fix(typescript): type issues and update typescript linting deps
* refactor: Update ThemeContext and useOnClickOutside to TypeScript
chore(useDidMountEffect.js): Remove useDidMountEffect hook
* feat: GenerationButtons for stop/continue/regen, remove AdjustToneButton in favor of alternate advanced mode/Settings in OptionsBar
* fix(EndpointOptionsPopover.tsx): change switchToSimpleMode function name to closePopover
fix(GenerationButtons.tsx): change advancedMode prop name to showPopover
fix(OptionsBar.tsx): change advancedMode state name to showPopover
feat(OptionsBar.tsx): add logic to show/hide popover based on showPopover state
fix(types.ts): change switchToSimpleMode function name to closePopover
* chore: remove template button
* chore(GenerationButtons.tsx): adjust positioning of the div element
chore(Plugins.tsx): adjust width of the MultiSelectDropDown component
chore(OptionsBar.tsx): adjust padding of the button element
* refactor(EditPresetDialog): use new modular higher order components
* chore(newoptionsbar.html): delete unused file newoptionsbar.html
* refactor(EditPresetDialog): convert to TS
* chore(babel.config.cjs): update babel configuration, linting
* chore(EditPresetDialog.tsx): update className for DialogTemplate to include pb-0
chore(EndpointOptionsDialog.jsx): update className for DialogTemplate to include pb-0
chore(PopoverButtons.tsx): add buttonClass prop to PopoverButtons component
chore(DialogTemplate.tsx): update className for the footer div to include h-auto
chore(Dropdown.jsx): remove id prop from Dropdown component
chore(mobile.css): update transition duration for .nav class from 0.2s to 0.15s
* refactor(EditPresetDialog.tsx): simplify localization usage with hook
* chore(EditPresetDialog.tsx): update containerClassName to include z-index value
* fix(endpoints.ts): change type of endpointsConfig atom to TEndpointsConfig
refactor(cleanupPreset.ts): convert to TS
fix(index.ts): export cleanupPreset utility function
fix(types.ts): add missing properties to TPreset type
* refactor(EndpointOptionsDialog): convert to TS
* fix(EditPresetDialog.tsx):
- import cleanupPreset from index
- add null check before submitting preset
- add null check before exporting preset
refactor(SaveAsPresetDialog.tsx): convert to TS
fix(usePresetOptions.ts): import cleanupPreset from index
fix(types.ts):
- make title prop optional in EditPresetProps
- change preset prop in CleanupPreset to be partial
* chore: reorganize imports in App, EndpointMenu, Messages, and ExportModel components
feat(ScreenshotContext.jsx): add ScreenshotContext to hooks/index
chore(index.ts): export ThemeContext, ScreenshotContext, ApiErrorBoundaryContext hooks, cleanupPreset, and getIcon functions from utils
* wip: add headerClassName for dialog template
* chore(EndpointOptionsDialog.tsx): remove unused headerClassName prop
chore(EndpointOptionsDialog.tsx): adjust height of main container in mobile and desktop view
* fix(react-query-service.ts): change return type of useGetEndpointsQuery to QueryObserverResult<t.TEndpointsConfig>
* refactor: imports from index and refactor to TS
* refactor: refactor all svg components to TS
* refactor: refactor all UI components to TS, remove unused component
* fix(SelectDropDown.tsx): remove file extension from import statement for CheckMark component
* fix: SaveAsPresetDialog typing issue
* fix(OptionsBar): close popover when an endpoint with no settings is selected
* chore(ChatGPT.tsx): update width of model select dropdown to 60px
refactor(types.ts): decouple ModelSelectProps from SettingsProps
* fix(popover Settings): space taken from the options menu for each endpoint
* fix:'Set token first' element alignment, add padding to endpointmenu icon in mobile
* style: match official site header
* refactor(EndpointOptionsDialog): make functionality explicitly saving current convos as presets
* fix(useLocalize.ts): change values parameter from an array to rest parameters
* refactor(EndpointSettings): Utilize useLocalize hook for all endpoint settings
* fix(Popover): correct spacing/center and remove focus outlines for close button
* chore: employ use of cn (clsx) in Popover styles
* chore(EditPresetDialog.tsx): update className to add padding bottom
chore(EndpointOptionsDialog.tsx): update className to add padding bottom
* style(EndpointMenu, TextChat): add better styling at diff. breakpoints
* refactor(EndpointSettings): consolidate container style to higher order component
* refactor(EditPresetDialog.tsx): pass custom style to Settings from here
* style: setting dialogs improved in all views
* style(EndpointMenu): improve UX for mobile
* style(PresetDialog): increase height so scrollbar isn't triggered
* chore(EditPresetDialog.tsx): update className to include xl height for DialogTemplate
chore(InputNumber.tsx): update className to include max height for InputNumber component
* fix: light mode styling
* fix(OptionsBar/ScrollToBottom/Popover): quick fix to rework in future: hide scrollToBottom when Popover is open
* style: remove bg-gradient around textarea in mobile view
* chore(ThemeContext.tsx): refactor ThemeContext to use default context value, also fixes type issue
* chore(EditPresetDialog.tsx): adjust grid layout in EditPresetDialog component
* style(TextChat): make gradient more opaque/smoother
* fix(TextChat.jsx): fix background gradient color based on theme and system preference
* test(layout-test-utils.tsx): add mock implementation for window.matchMedia in test setup
feat(layout-test-utils.tsx): add authConfig prop to AuthContextProvider in renderWithProvidersWrapper function
chore(tsconfig.json): include test directory in tsconfig include section
* chore(jest.config.cjs): update test file paths in jest configuration
chore(Login.spec.tsx): update test file path in import statement
chore(LoginForm.spec.tsx): update test file path in import statement
chore(Registration.spec.tsx): update test file path in import statement
chore(PluginAuthForm.spec.tsx): update test file path in import statement
chore(PluginStoreDialog.spec.tsx): update test file path in import statement
chore(layout-test-utils.tsx): move matchMedia mock to separate file
chore(tsconfig.json): add path mapping for test files in client directory
* test: add import for 'test/matchMedia.mock' in test files
The changes in this commit add an import statement for 'test/matchMedia.mock' in multiple test files. This import is necessary for mocking the behavior of the matchMedia function during testing.
* style(ClearConvosDialog): remove borders from button and modal, uniform button size
* fix(AgentSettings.tsx): overlapping issue
* fix(PresetDialogs): improve spacing of top row and dialog content
* style(Settings): 2nd column will now dynamically adjust better across all screen sizes
* style(ModelSelect): improve styling for mobile/desktop, add hover shadow
feat(ModelSelect/Plugins): hide ModelSelect when screen is small
* refactor(RowButton, buildTree): convert to TS
* style(ModelSelect): add transition effect to shadows on hover
2023-08-04 13:56:44 -04:00
|
|
|
import NavLinks from './NavLinks';
|
2023-07-27 10:11:57 -04:00
|
|
|
import { Panel, Spinner } from '~/components';
|
|
|
|
|
import { Conversations, Pages } from '../Conversations';
|
2023-09-18 12:55:51 -04:00
|
|
|
import {
|
|
|
|
|
useAuthContext,
|
|
|
|
|
useDebounce,
|
|
|
|
|
useMediaQuery,
|
|
|
|
|
useLocalize,
|
|
|
|
|
useConversation,
|
|
|
|
|
useConversations,
|
|
|
|
|
} from '~/hooks';
|
2023-07-27 10:11:57 -04:00
|
|
|
import { cn } from '~/utils/';
|
|
|
|
|
import store from '~/store';
|
2023-05-19 20:21:34 +05:30
|
|
|
|
2023-10-11 03:11:02 +02:00
|
|
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '~/components/ui/';
|
|
|
|
|
|
2023-03-12 00:32:03 +08:00
|
|
|
export default function Nav({ navVisible, setNavVisible }) {
|
2023-02-14 16:15:45 -05:00
|
|
|
const [isHovering, setIsHovering] = useState(false);
|
2023-08-04 16:51:23 -04:00
|
|
|
const [navWidth, setNavWidth] = useState('260px');
|
feat: Auth and User System (#205)
* server-side JWT auth implementation
* move oauth routes and strategies, fix bugs
* backend modifications for wiring up the frontend login and reg forms
* Add frontend data services for login and registration
* Add login and registration forms
* Implment auth context, functional client side auth
* protect routes with jwt auth
* finish local strategy (using local storage)
* Start setting up google auth
* disable token refresh, remove old auth middleware
* refactor client, add ApiErrorBoundary context
* disable google and facebook strategies
* fix: fix presets not displaying specific to user
* fix: fix issue with browser refresh
* fix: casing issue with User.js (#11)
* delete user.js to be renamed
* fix: fix casing issue with User.js
* comment out api error watcher temporarily
* fix: issue with api error watcher (#12)
* delete user.js to be renamed
* fix: fix casing issue with User.js
* comment out api error watcher temporarily
* feat: add google auth social login
* fix: make google login url dynamic based on dev/prod
* fix: bug where UI is briefly displayed before redirecting to login
* fix: fix cookie expires value for local auth
* Update README.md
* Update LOCAL_INSTALL structure
* Add local testing instructions
* Only load google strategy if client id and secret are provided
* Update .env.example files with new params
* fix issue with not redirecting to register form
* only show google login button if value is set in .env
* cleanup log messages
* Add label to button for google login on login form
* doc: fix client/server url values in .env.example
* feat: add error message details to registration failure
* Restore preventing paste on confirm password
* auto-login user after registering
* feat: forgot password (#24)
* make login/reg pages look like openai's
* add password reset data services
* new form designs similar to openai, add password reset pages
* add api's for password reset
* email utils for password reset
* remove bcrypt salt rounds from process.env
* refactor: restructure api auth code, consolidate routes (#25)
* add api's for password reset
* remove bcrypt salt rounds from process.env
* refactor: consolidate auth routes, use controller pattern
* refactor: code cleanup
* feat: migrate data to first user (#26)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes after refactor (#27)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: issue with auto-login when logging out then logging in with new browser window (#28)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: Update README and .env.example files with user system information (#29)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: update README and .env.example files
* Fixup: LOCAL_INSTALL.md PS instructions (#200) (#30)
Co-authored-by: alfredo-f <alfredo.fomitchenko@mail.polimi.it>
* feat: send user with completion to protect against abuse (#31)
* Fixup: LOCAL_INSTALL.md PS instructions (#200)
* server-side JWT auth implementation
* move oauth routes and strategies, fix bugs
* backend modifications for wiring up the frontend login and reg forms
* Add frontend data services for login and registration
* Add login and registration forms
* Implment auth context, functional client side auth
* protect routes with jwt auth
* finish local strategy (using local storage)
* Start setting up google auth
* disable token refresh, remove old auth middleware
* refactor client, add ApiErrorBoundary context
* disable google and facebook strategies
* fix: fix presets not displaying specific to user
* fix: fix issue with browser refresh
* fix: casing issue with User.js (#11)
* delete user.js to be renamed
* fix: fix casing issue with User.js
* comment out api error watcher temporarily
* feat: add google auth social login
* fix: make google login url dynamic based on dev/prod
* fix: bug where UI is briefly displayed before redirecting to login
* fix: fix cookie expires value for local auth
* Only load google strategy if client id and secret are provided
* Update .env.example files with new params
* fix issue with not redirecting to register form
* only show google login button if value is set in .env
* cleanup log messages
* Add label to button for google login on login form
* doc: fix client/server url values in .env.example
* feat: add error message details to registration failure
* Restore preventing paste on confirm password
* auto-login user after registering
* feat: forgot password (#24)
* make login/reg pages look like openai's
* add password reset data services
* new form designs similar to openai, add password reset pages
* add api's for password reset
* email utils for password reset
* remove bcrypt salt rounds from process.env
* refactor: restructure api auth code, consolidate routes (#25)
* add api's for password reset
* remove bcrypt salt rounds from process.env
* refactor: consolidate auth routes, use controller pattern
* refactor: code cleanup
* feat: migrate data to first user (#26)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes after refactor (#27)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: issue with auto-login when logging out then logging in with new browser window (#28)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: Update README and .env.example files with user system information (#29)
* refactor: use /api for auth routes
* fix: use user id instead of username
* feat: migrate data to first user on register
* fix: fix social login routes
* fix: fix issue with auto-login in new tab
* doc: update README and .env.example files
* Send user id to openai to protect against abuse
* add meilisearch to gitignore
* Remove webpack
---------
Co-authored-by: alfredo-f <alfredo.fomitchenko@mail.polimi.it>
---------
Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Alfredo Fomitchenko <alfredo.fomitchenko@mail.polimi.it>
2023-05-07 10:04:51 -07:00
|
|
|
const { isAuthenticated } = useAuthContext();
|
2023-08-04 16:51:23 -04:00
|
|
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
|
|
|
const scrollPositionRef = useRef<number | null>(null);
|
|
|
|
|
const localize = useLocalize();
|
|
|
|
|
const isSmallScreen = useMediaQuery('(max-width: 768px)');
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (isSmallScreen) {
|
|
|
|
|
setNavWidth('320px');
|
|
|
|
|
} else {
|
|
|
|
|
setNavWidth('260px');
|
|
|
|
|
}
|
|
|
|
|
}, [isSmallScreen]);
|
2023-03-28 20:36:21 +08:00
|
|
|
|
2023-08-04 16:51:23 -04:00
|
|
|
const [conversations, setConversations] = useState<TConversation[]>([]);
|
2023-03-28 20:36:21 +08:00
|
|
|
// current page
|
|
|
|
|
const [pageNumber, setPageNumber] = useState(1);
|
|
|
|
|
// total pages
|
2023-03-18 14:28:10 -04:00
|
|
|
const [pages, setPages] = useState(1);
|
2023-05-18 11:09:31 -07:00
|
|
|
|
|
|
|
|
// data provider
|
2023-08-04 16:51:23 -04:00
|
|
|
const getConversationsQuery = useGetConversationsQuery(pageNumber + '', {
|
|
|
|
|
enabled: isAuthenticated,
|
|
|
|
|
});
|
2023-03-28 20:36:21 +08:00
|
|
|
|
|
|
|
|
// search
|
|
|
|
|
const searchQuery = useRecoilValue(store.searchQuery);
|
|
|
|
|
const isSearchEnabled = useRecoilValue(store.isSearchEnabled);
|
|
|
|
|
const isSearching = useRecoilValue(store.isSearching);
|
2023-09-18 12:55:51 -04:00
|
|
|
const { newConversation, searchPlaceholderConversation } = useConversation();
|
2023-03-28 20:36:21 +08:00
|
|
|
|
|
|
|
|
// current conversation
|
|
|
|
|
const conversation = useRecoilValue(store.conversation);
|
|
|
|
|
const { conversationId } = conversation || {};
|
2023-03-29 00:08:02 +08:00
|
|
|
const setSearchResultMessages = useSetRecoilState(store.searchResultMessages);
|
2023-04-03 14:57:30 -07:00
|
|
|
const refreshConversationsHint = useRecoilValue(store.refreshConversationsHint);
|
2023-09-18 12:55:51 -04:00
|
|
|
const { refreshConversations } = useConversations();
|
2023-03-28 20:36:21 +08:00
|
|
|
|
|
|
|
|
const [isFetching, setIsFetching] = useState(false);
|
|
|
|
|
|
2023-04-07 10:16:53 -07:00
|
|
|
const debouncedSearchTerm = useDebounce(searchQuery, 750);
|
2023-08-04 16:51:23 -04:00
|
|
|
const searchQueryFn = useSearchQuery(debouncedSearchTerm, pageNumber + '', {
|
|
|
|
|
enabled: !!(
|
|
|
|
|
!!debouncedSearchTerm &&
|
|
|
|
|
debouncedSearchTerm.length > 0 &&
|
|
|
|
|
isSearchEnabled &&
|
|
|
|
|
isSearching
|
|
|
|
|
),
|
2023-04-07 10:16:53 -07:00
|
|
|
});
|
|
|
|
|
|
2023-08-04 16:51:23 -04:00
|
|
|
const onSearchSuccess = useCallback((data: TSearchResults, expectedPage?: number) => {
|
2023-03-18 14:28:10 -04:00
|
|
|
const res = data;
|
2023-03-28 20:36:21 +08:00
|
|
|
setConversations(res.conversations);
|
2023-03-18 14:28:10 -04:00
|
|
|
if (expectedPage) {
|
2023-03-28 20:36:21 +08:00
|
|
|
setPageNumber(expectedPage);
|
2023-03-14 20:21:41 -04:00
|
|
|
}
|
2023-08-04 16:51:23 -04:00
|
|
|
setPages(Number(res.pages));
|
2023-03-18 15:59:59 -04:00
|
|
|
setIsFetching(false);
|
2023-03-29 00:08:02 +08:00
|
|
|
searchPlaceholderConversation();
|
|
|
|
|
setSearchResultMessages(res.messages);
|
2023-08-04 16:51:23 -04:00
|
|
|
/* disabled due recoil methods not recognized as state setters */
|
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
|
}, []); // Empty dependency array
|
2023-03-06 08:58:52 -05:00
|
|
|
|
2023-04-06 05:47:37 -07:00
|
|
|
useEffect(() => {
|
2023-04-06 08:02:08 -07:00
|
|
|
//we use isInitialLoading here instead of isLoading because query is disabled by default
|
2023-04-06 05:47:37 -07:00
|
|
|
if (searchQueryFn.isInitialLoading) {
|
|
|
|
|
setIsFetching(true);
|
2023-05-18 11:09:31 -07:00
|
|
|
} else if (searchQueryFn.data) {
|
2023-04-06 05:47:37 -07:00
|
|
|
onSearchSuccess(searchQueryFn.data);
|
|
|
|
|
}
|
2023-08-04 16:51:23 -04:00
|
|
|
}, [searchQueryFn.data, searchQueryFn.isInitialLoading, onSearchSuccess]);
|
2023-03-18 15:59:59 -04:00
|
|
|
|
2023-03-18 14:28:10 -04:00
|
|
|
const clearSearch = () => {
|
2023-03-28 20:36:21 +08:00
|
|
|
setPageNumber(1);
|
|
|
|
|
refreshConversations();
|
|
|
|
|
if (conversationId == 'search') {
|
|
|
|
|
newConversation();
|
2023-03-22 16:06:11 -04:00
|
|
|
}
|
2023-03-18 14:28:10 -04:00
|
|
|
};
|
|
|
|
|
|
2023-06-11 14:46:21 -04:00
|
|
|
const moveToTop = useCallback(() => {
|
2023-05-19 20:21:34 +05:30
|
|
|
const container = containerRef.current;
|
|
|
|
|
if (container) {
|
|
|
|
|
scrollPositionRef.current = container.scrollTop;
|
|
|
|
|
}
|
2023-06-11 14:46:21 -04:00
|
|
|
}, [containerRef, scrollPositionRef]);
|
2023-05-19 20:21:34 +05:30
|
|
|
|
2023-03-15 04:05:14 +08:00
|
|
|
const nextPage = async () => {
|
2023-03-14 20:21:41 -04:00
|
|
|
moveToTop();
|
2023-04-07 10:16:53 -07:00
|
|
|
setPageNumber(pageNumber + 1);
|
2023-03-15 04:05:14 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const previousPage = async () => {
|
2023-03-14 20:21:41 -04:00
|
|
|
moveToTop();
|
2023-04-07 10:16:53 -07:00
|
|
|
setPageNumber(pageNumber - 1);
|
2023-03-05 14:41:50 -05:00
|
|
|
};
|
2023-02-14 16:15:45 -05:00
|
|
|
|
2023-03-14 20:21:41 -04:00
|
|
|
useEffect(() => {
|
2023-04-02 12:49:12 -07:00
|
|
|
if (getConversationsQuery.data) {
|
|
|
|
|
if (isSearching) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let { conversations, pages } = getConversationsQuery.data;
|
2023-08-04 16:51:23 -04:00
|
|
|
pages = Number(pages);
|
2023-04-02 12:49:12 -07:00
|
|
|
if (pageNumber > pages) {
|
|
|
|
|
setPageNumber(pages);
|
|
|
|
|
} else {
|
|
|
|
|
if (!isSearching) {
|
2023-05-18 11:09:31 -07:00
|
|
|
conversations = conversations.sort(
|
2023-08-04 16:51:23 -04:00
|
|
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
|
2023-05-18 11:09:31 -07:00
|
|
|
);
|
2023-04-02 12:49:12 -07:00
|
|
|
}
|
|
|
|
|
setConversations(conversations);
|
|
|
|
|
setPages(pages);
|
|
|
|
|
}
|
2023-03-18 14:28:10 -04:00
|
|
|
}
|
2023-04-02 12:49:12 -07:00
|
|
|
}, [getConversationsQuery.isSuccess, getConversationsQuery.data, isSearching, pageNumber]);
|
2023-02-13 23:14:35 -05:00
|
|
|
|
2023-04-03 14:57:30 -07:00
|
|
|
useEffect(() => {
|
|
|
|
|
if (!isSearching) {
|
|
|
|
|
getConversationsQuery.refetch();
|
|
|
|
|
}
|
2023-07-15 10:43:15 -04:00
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
2023-04-03 14:57:30 -07:00
|
|
|
}, [pageNumber, conversationId, refreshConversationsHint]);
|
|
|
|
|
|
2023-03-28 20:36:21 +08:00
|
|
|
const toggleNavVisible = () => {
|
2023-08-04 16:51:23 -04:00
|
|
|
setNavVisible((prev: boolean) => !prev);
|
2023-03-28 20:36:21 +08:00
|
|
|
};
|
|
|
|
|
|
2023-03-07 13:53:23 -05:00
|
|
|
const containerClasses =
|
2023-04-02 12:49:12 -07:00
|
|
|
getConversationsQuery.isLoading && pageNumber === 1
|
2023-03-07 13:53:23 -05:00
|
|
|
? 'flex flex-col gap-2 text-gray-100 text-sm h-full justify-center items-center'
|
|
|
|
|
: 'flex flex-col gap-2 text-gray-100 text-sm';
|
2023-02-25 10:16:21 -05:00
|
|
|
|
2023-02-06 13:27:28 -05:00
|
|
|
return (
|
2023-10-11 03:11:02 +02:00
|
|
|
<TooltipProvider delayDuration={300}>
|
|
|
|
|
<Tooltip>
|
|
|
|
|
<div
|
|
|
|
|
className={
|
|
|
|
|
'nav active dark max-w-[320px] flex-shrink-0 overflow-x-hidden bg-gray-900 md:max-w-[260px]'
|
|
|
|
|
}
|
|
|
|
|
style={{
|
|
|
|
|
width: navVisible ? navWidth : '0px',
|
|
|
|
|
visibility: navVisible ? 'visible' : 'hidden',
|
|
|
|
|
transition: 'width 0.2s, visibility 0.2s',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div className="h-full w-[320px] md:w-[260px]">
|
|
|
|
|
<div className="flex h-full min-h-0 flex-col">
|
|
|
|
|
<div className="scrollbar-trigger relative flex h-full w-full flex-1 items-start border-white/20">
|
|
|
|
|
<nav className="relative flex h-full flex-1 flex-col space-y-1 p-2">
|
|
|
|
|
<div className="mb-1 flex h-11 flex-row">
|
|
|
|
|
<NewChat />
|
|
|
|
|
<TooltipTrigger asChild>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
className={cn(
|
|
|
|
|
'nav-close-button inline-flex h-11 w-11 items-center justify-center rounded-md border border-white/20 text-white hover:bg-gray-500/10',
|
|
|
|
|
)}
|
|
|
|
|
onClick={toggleNavVisible}
|
|
|
|
|
>
|
|
|
|
|
<span className="sr-only">{localize('com_nav_close_sidebar')}</span>
|
|
|
|
|
<Panel open={false} />
|
|
|
|
|
</button>
|
|
|
|
|
</TooltipTrigger>
|
|
|
|
|
<TooltipContent side="right" sideOffset={17}>
|
|
|
|
|
{localize('com_nav_close_menu')}
|
|
|
|
|
</TooltipContent>
|
|
|
|
|
</div>
|
|
|
|
|
{isSearchEnabled && <SearchBar clearSearch={clearSearch} />}
|
|
|
|
|
<div
|
|
|
|
|
className={`flex-1 flex-col overflow-y-auto ${
|
|
|
|
|
isHovering ? '' : 'scrollbar-transparent'
|
|
|
|
|
} border-b border-white/20`}
|
|
|
|
|
onMouseEnter={() => setIsHovering(true)}
|
|
|
|
|
onMouseLeave={() => setIsHovering(false)}
|
|
|
|
|
ref={containerRef}
|
2023-07-15 10:43:15 -04:00
|
|
|
>
|
2023-10-11 03:11:02 +02:00
|
|
|
<div className={containerClasses}>
|
|
|
|
|
{(getConversationsQuery.isLoading && pageNumber === 1) || isFetching ? (
|
|
|
|
|
<Spinner />
|
|
|
|
|
) : (
|
|
|
|
|
<Conversations conversations={conversations} moveToTop={moveToTop} />
|
|
|
|
|
)}
|
|
|
|
|
<Pages
|
|
|
|
|
pageNumber={pageNumber}
|
|
|
|
|
pages={pages}
|
|
|
|
|
nextPage={nextPage}
|
|
|
|
|
previousPage={previousPage}
|
|
|
|
|
setPageNumber={setPageNumber}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-07-15 10:43:15 -04:00
|
|
|
</div>
|
2023-10-11 03:11:02 +02:00
|
|
|
<NavLinks />
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
2023-07-15 10:43:15 -04:00
|
|
|
</div>
|
2023-03-12 00:32:03 +08:00
|
|
|
</div>
|
2023-02-06 13:27:28 -05:00
|
|
|
</div>
|
2023-10-11 03:11:02 +02:00
|
|
|
{!navVisible && (
|
|
|
|
|
<div className="absolute left-2 top-2 z-10 hidden md:inline-block">
|
|
|
|
|
<TooltipTrigger asChild>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
className="nav-open-button flex h-11 cursor-pointer items-center gap-3 rounded-md border border-black/10 bg-white p-3 text-sm text-black transition-colors duration-200 hover:bg-gray-50 dark:border-white/20 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-gray-700"
|
|
|
|
|
onClick={toggleNavVisible}
|
|
|
|
|
>
|
|
|
|
|
<div className="flex items-center justify-center">
|
|
|
|
|
<span className="sr-only">{localize('com_nav_open_sidebar')}</span>
|
|
|
|
|
<Panel open={true} />
|
|
|
|
|
</div>
|
|
|
|
|
</button>
|
|
|
|
|
</TooltipTrigger>
|
|
|
|
|
<TooltipContent side="right" sideOffset={17}>
|
|
|
|
|
{localize('com_nav_open_menu')}
|
|
|
|
|
</TooltipContent>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2023-05-19 20:21:34 +05:30
|
|
|
|
2023-10-11 03:11:02 +02:00
|
|
|
<div className={`nav-mask${navVisible ? ' active' : ''}`} onClick={toggleNavVisible}></div>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</TooltipProvider>
|
2023-02-06 13:27:28 -05:00
|
|
|
);
|
|
|
|
|
}
|