From 156abe2fca811de8a3ec9fe0e3cd6edcff0a09a2 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+Berry-13@users.noreply.github.com> Date: Tue, 27 Feb 2024 23:59:56 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=97=20feat:=20NavLinks=20customization?= =?UTF-8?q?=20for=20Help=20&=20Faq=20URL=20(#1872)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * help and faq * fix: using only one var * revert(types.ts): showHelpAndFaq * Update dotenv.md * Update dotenv.md --- .env.example | 10 ++++- api/server/routes/config.js | 1 + .../components/Messages/ScrollToBottom.tsx | 4 +- client/src/components/Nav/NavLinks.tsx | 18 ++++---- docs/install/configuration/dotenv.md | 44 ++++++++++++------- packages/data-provider/src/types.ts | 1 + 6 files changed, 51 insertions(+), 27 deletions(-) diff --git a/.env.example b/.env.example index 4dd251e29b..44a0c80003 100644 --- a/.env.example +++ b/.env.example @@ -331,6 +331,14 @@ FIREBASE_STORAGE_BUCKET= FIREBASE_MESSAGING_SENDER_ID= FIREBASE_APP_ID= +#===================================================# +# UI # +#===================================================# + +HELP_AND_FAQ_URL=https://librechat.ai + +# SHOW_BIRTHDAY_ICON=true + #==================================================# # Others # #==================================================# @@ -341,7 +349,5 @@ FIREBASE_APP_ID= # REDIS_URI= # USE_REDIS= -# SHOW_BIRTHDAY_ICON=true - # E2E_USER_EMAIL= # E2E_USER_PASSWORD= diff --git a/api/server/routes/config.js b/api/server/routes/config.js index efee7fb539..01f2e4b7ea 100644 --- a/api/server/routes/config.js +++ b/api/server/routes/config.js @@ -43,6 +43,7 @@ router.get('/', async function (req, res) { isBirthday() || isEnabled(process.env.SHOW_BIRTHDAY_ICON) || process.env.SHOW_BIRTHDAY_ICON === '', + helpAndFaqURL: process.env.HELP_AND_FAQ_URL || 'https://librechat.ai', }; if (typeof process.env.CUSTOM_FOOTER === 'string') { diff --git a/client/src/components/Messages/ScrollToBottom.tsx b/client/src/components/Messages/ScrollToBottom.tsx index 236e691e7a..15fd558612 100644 --- a/client/src/components/Messages/ScrollToBottom.tsx +++ b/client/src/components/Messages/ScrollToBottom.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; type Props = { scrollHandler: React.MouseEventHandler; @@ -8,7 +8,7 @@ export default function ScrollToBottom({ scrollHandler }: Props) { return (