Skip to content

Commit 50374f7

Browse files
fix: Minor UI Changes (#643)
* Minor UI Fixes * Link Icon, from index.ts * Import from components instead of svg * Fix Sidebar and Icons
1 parent 1a21eb5 commit 50374f7

File tree

8 files changed

+41
-574
lines changed

8 files changed

+41
-574
lines changed

client/src/components/Input/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default function TextChat({ isSearchView = false }) {
135135

136136
return (
137137
<>
138-
<div className="fixed bottom-0 left-0 w-full md:absolute">
138+
<div className="fixed bottom-0 left-0 w-full md:absolute border-transparent bg-gradient-to-b from-transparent via-white to-white pt-6 dark:border-white/20 dark:via-gray-800 dark:to-gray-800">
139139
<div className="relative py-2 md:mb-[-16px] md:py-4 lg:mb-[-32px]">
140140
<span className="flex w-full flex-col items-center justify-center gap-0 md:order-none md:m-auto md:gap-2">
141141
<OpenAIOptions />

client/src/components/Nav/NavLinks.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { Menu, Transition } from '@headlessui/react';
22
import { Fragment, useState } from 'react';
33
import { useRecoilValue } from 'recoil';
44
import SearchBar from './SearchBar';
5-
import TrashIcon from '../svg/TrashIcon';
6-
import GearIcon from '../svg/GearIcon';
75
import Settings from './Settings';
86
import { Download } from 'lucide-react';
97
import NavLink from './NavLink';
@@ -12,9 +10,9 @@ import ClearConvos from './ClearConvos';
1210
import Logout from './Logout';
1311
import { useAuthContext } from '~/hooks/AuthContext';
1412
import { cn } from '~/utils/';
15-
import DotsIcon from '../svg/DotsIcon';
1613

1714
import store from '~/store';
15+
import { LinkIcon, DotsIcon, GearIcon, TrashIcon } from '~/components';
1816

1917
export default function NavLinks({ clearSearch, isSearchEnabled }) {
2018
const [showExports, setShowExports] = useState(false);
@@ -96,6 +94,14 @@ export default function NavLinks({ clearSearch, isSearchEnabled }) {
9694
clickHandler={() => setShowClearConvos(true)}
9795
/>
9896
</Menu.Item>
97+
<Menu.Item as="div">
98+
<NavLink
99+
className="flex w-full cursor-pointer items-center gap-3 px-3 py-3 text-sm text-white transition-colors duration-200 hover:bg-gray-700 rounded-none"
100+
svg={() => <LinkIcon />}
101+
text="Help & FAQ"
102+
clickHandler={() => window.open('https://docs.librechat.ai/', '_blank')}
103+
/>
104+
</Menu.Item>
99105
<Menu.Item as="div">
100106
<NavLink
101107
className="flex w-full cursor-pointer items-center gap-3 px-3 py-3 text-sm text-white transition-colors duration-200 hover:bg-gray-700 rounded-none"

client/src/components/Nav/NewChat.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import React from 'react';
22
import store from '~/store';
3+
import { useRecoilValue } from 'recoil';
4+
import { localize } from '~/localization/Translation';
35

46
export default function NewChat() {
57
const { newConversation } = store.useConversation();
8+
const lang = useRecoilValue(store.lang);
69

710
const clickHandler = () => {
811
// dispatch(setInputValue(''));
@@ -30,7 +33,7 @@ export default function NewChat() {
3033
<line x1="12" y1="5" x2="12" y2="19" />
3134
<line x1="5" y1="12" x2="19" y2="12" />
3235
</svg>
33-
New chat
36+
{localize(lang, 'com_ui_new_chat')}
3437
</a>
3538
);
3639
}

client/src/components/Nav/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default function Nav({ navVisible, setNavVisible }) {
179179
<div className="flex h-full min-h-0 flex-col ">
180180
<div className="scrollbar-trigger relative flex h-full w-full flex-1 items-start border-white/20">
181181
<nav className="relative flex h-full flex-1 flex-col space-y-1 p-2">
182-
<div className='flex flex-row h-11'>
182+
<div className='flex flex-row h-11 mb-2'>
183183
<NewChat />
184184
<button
185185
type='button'
@@ -223,7 +223,7 @@ export default function Nav({ navVisible, setNavVisible }) {
223223
{!navVisible && (
224224
<button
225225
type="button"
226-
className="nav-open-button mt-1 fixed left-2 top-0.5 z-10 inline-flex h-11 w-11 items-center justify-center rounded-md border border-black/10 dark:border-white/20 bg-white dark:bg-gray-800 text-black hover:text-gray-500 dark:text-white dark:hover:text-gray-400"
226+
className="nav-open-button mt-1 fixed left-2 top-0.5 z-10 flex p-3 items-center gap-3 transition-colors duration-200 cursor-pointer text-sm rounded-md border bg-white dark:bg-gray-800 border-black/10 dark:border-white/20 hover:bg-gray-50 dark:hover:bg-gray-700 h-11 w-11 text-gray-900"
227227
onClick={toggleNavVisible}
228228
>
229229
<div className="flex items-center justify-center">
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export default function LinkIcon() {
2+
return (
3+
<svg
4+
stroke="currentColor"
5+
fill="none"
6+
strokeWidth="2"
7+
viewBox="0 0 24 24"
8+
strokeLinecap="round"
9+
strokeLinejoin="round"
10+
className="h-4 w-4"
11+
height="1em"
12+
width="1em"
13+
xmlns="http://www.w3.org/2000/svg"
14+
>
15+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
16+
<polyline points="15 3 21 3 21 9"></polyline>
17+
<line x1="10" y1="14" x2="21" y2="3"></line>
18+
</svg>
19+
);
20+
}

client/src/components/svg/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ export { default as OpenIDIcon } from './OpenIDIcon';
1111
export { default as GithubIcon } from './GithubIcon';
1212
export { default as DiscordIcon } from './DiscordIcon';
1313
export { default as AnthropicIcon } from './AnthropicIcon';
14+
export { default as LinkIcon } from './LinkIcon';
15+
export { default as DotsIcon } from './DotsIcon';
16+
export { default as GearIcon } from './GearIcon';
17+
export { default as TrashIcon } from './TrashIcon';

0 commit comments

Comments
 (0)