diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index f36be1576d6..96a9afb5eb9 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -27,9 +27,13 @@ const AdminWorkspaces = lazy(() => import("@/pages/Admin/Workspaces")); const AdminLogs = lazy(() => import("@/pages/Admin/Logging")); const AdminAgents = lazy(() => import("@/pages/Admin/Agents")); const GeneralChats = lazy(() => import("@/pages/GeneralSettings/Chats")); -const GeneralAppearance = lazy( - () => import("@/pages/GeneralSettings/Appearance") +const InterfaceSettings = lazy( + () => import("@/pages/GeneralSettings/Settings/Interface") ); +const BrandingSettings = lazy( + () => import("@/pages/GeneralSettings/Settings/Branding") +); + const GeneralApiKeys = lazy(() => import("@/pages/GeneralSettings/ApiKeys")); const GeneralLLMPreference = lazy( () => import("@/pages/GeneralSettings/LLMPreference") @@ -186,8 +190,12 @@ export default function App() { element={} /> } + path="/settings/interface" + element={} + /> + } /> - {isUser ? t("common.user") : t("appearance.message.assistant")} + {isUser + ? t("common.user") + : t("customization.items.welcome-messages.assistant")}

(
- - - - - + diff --git a/frontend/src/pages/GeneralSettings/Settings/Interface/index.jsx b/frontend/src/pages/GeneralSettings/Settings/Interface/index.jsx new file mode 100644 index 00000000000..c55924812b0 --- /dev/null +++ b/frontend/src/pages/GeneralSettings/Settings/Interface/index.jsx @@ -0,0 +1,38 @@ +import Sidebar from "@/components/SettingsSidebar"; +import { isMobile } from "react-device-detect"; +import { useTranslation } from "react-i18next"; +import LanguagePreference from "../components/LanguagePreference"; +import ShowScrollbar from "../components/ShowScrollbar"; +import ThemePreference from "../components/ThemePreference"; +import { MessageDirection } from "../components/MessageDirection"; + +export default function InterfaceSettings() { + const { t } = useTranslation(); + + return ( +
+ +
+
+
+
+

+ {t("customization.interface.title")} +

+
+

+ {t("customization.interface.description")} +

+
+ + + + +
+
+
+ ); +} diff --git a/frontend/src/pages/GeneralSettings/Appearance/CustomAppName/index.jsx b/frontend/src/pages/GeneralSettings/Settings/components/CustomAppName/index.jsx similarity index 94% rename from frontend/src/pages/GeneralSettings/Appearance/CustomAppName/index.jsx rename to frontend/src/pages/GeneralSettings/Settings/components/CustomAppName/index.jsx index b94dbe505f0..025ec4a7b82 100644 --- a/frontend/src/pages/GeneralSettings/Appearance/CustomAppName/index.jsx +++ b/frontend/src/pages/GeneralSettings/Settings/components/CustomAppName/index.jsx @@ -2,8 +2,10 @@ import Admin from "@/models/admin"; import System from "@/models/system"; import showToast from "@/utils/toast"; import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; export default function CustomAppName() { + const { t } = useTranslation(); const [loading, setLoading] = useState(true); const [hasChanges, setHasChanges] = useState(false); const [customAppName, setCustomAppName] = useState(""); @@ -62,10 +64,10 @@ export default function CustomAppName() { onSubmit={updateCustomAppName} >

- Custom App Name + {t("customization.items.app-name.title")}

- Set a custom app name that is displayed on the login page. + {t("customization.items.app-name.description")}

{ fileInputRef.current?.click(); }; - const { t } = useTranslation(); return (

- {t("appearance.logo.title")} + {t("customization.items.logo.title")}

- {t("appearance.logo.description")} + {t("customization.items.logo.description")}

{isDefaultLogo ? (
@@ -99,10 +99,10 @@ export default function CustomLogo() {
- {t("appearance.logo.add")} + {t("customization.items.logo.add")}
- {t("appearance.logo.recommended")} + {t("customization.items.logo.recommended")}
@@ -123,7 +123,7 @@ export default function CustomLogo() { onClick={triggerFileInputClick} className="text-[#FFFFFF] text-base font-medium hover:text-opacity-60 mx-2" > - {t("appearance.logo.replace")} + {t("customization.items.logo.replace")} - {t("appearance.logo.remove")} + {t("customization.items.logo.remove")} diff --git a/frontend/src/pages/GeneralSettings/Appearance/CustomMessages/index.jsx b/frontend/src/pages/GeneralSettings/Settings/components/CustomMessages/index.jsx similarity index 83% rename from frontend/src/pages/GeneralSettings/Appearance/CustomMessages/index.jsx rename to frontend/src/pages/GeneralSettings/Settings/components/CustomMessages/index.jsx index 700bc28c523..22e7bdd8132 100644 --- a/frontend/src/pages/GeneralSettings/Appearance/CustomMessages/index.jsx +++ b/frontend/src/pages/GeneralSettings/Settings/components/CustomMessages/index.jsx @@ -6,9 +6,9 @@ import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; export default function CustomMessages() { + const { t } = useTranslation(); const [hasChanges, setHasChanges] = useState(false); const [messages, setMessages] = useState([]); - const { t } = useTranslation(); useEffect(() => { async function fetchMessages() { @@ -22,12 +22,18 @@ export default function CustomMessages() { if (type === "user") { setMessages([ ...messages, - { user: t("appearance.message.double-click"), response: "" }, + { + user: t("customization.items.welcome-messages.double-click"), + response: "", + }, ]); } else { setMessages([ ...messages, - { user: "", response: t("appearance.message.double-click") }, + { + user: "", + response: t("customization.items.welcome-messages.double-click"), + }, ]); } }; @@ -57,10 +63,10 @@ export default function CustomMessages() { return (

- {t("appearance.message.title")} + {t("customization.items.welcome-messages.title")}

- {t("appearance.message.description")} + {t("customization.items.welcome-messages.description")}

{messages.map((message, index) => ( @@ -93,11 +99,11 @@ export default function CustomMessages() {
- {t("appearance.message.new")}{" "} + {t("customization.items.welcome-messages.new")}{" "} - {t("appearance.message.system")} + {t("customization.items.welcome-messages.system")} {" "} - {t("appearance.message.message")} + {t("customization.items.welcome-messages.message")}
@@ -108,11 +114,11 @@ export default function CustomMessages() {
- {t("appearance.message.new")}{" "} + {t("customization.items.welcome-messages.new")}{" "} - {t("appearance.message.user")} + {t("customization.items.welcome-messages.user")} {" "} - {t("appearance.message.message")} + {t("customization.items.welcome-messages.message")}
@@ -124,7 +130,7 @@ export default function CustomMessages() { className="transition-all duration-300 border border-slate-200 px-4 py-2 rounded-lg text-white text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800" onClick={handleMessageSave} > - {t("appearance.message.save")} + {t("customization.items.welcome-messages.save")}
)} diff --git a/frontend/src/pages/GeneralSettings/Appearance/CustomSiteSettings/index.jsx b/frontend/src/pages/GeneralSettings/Settings/components/CustomSiteSettings/index.jsx similarity index 88% rename from frontend/src/pages/GeneralSettings/Appearance/CustomSiteSettings/index.jsx rename to frontend/src/pages/GeneralSettings/Settings/components/CustomSiteSettings/index.jsx index e0521be0744..125933bb17a 100644 --- a/frontend/src/pages/GeneralSettings/Appearance/CustomSiteSettings/index.jsx +++ b/frontend/src/pages/GeneralSettings/Settings/components/CustomSiteSettings/index.jsx @@ -1,8 +1,10 @@ import { useEffect, useState } from "react"; import Admin from "@/models/admin"; import showToast from "@/utils/toast"; +import { useTranslation } from "react-i18next"; export default function CustomSiteSettings() { + const { t } = useTranslation(); const [hasChanges, setHasChanges] = useState(false); const [settings, setSettings] = useState({ title: null, @@ -40,18 +42,18 @@ export default function CustomSiteSettings() { onSubmit={handleSiteSettingUpdate} >

- Custom Site Settings + {t("customization.items.browser-appearance.title")}

- Change the content of the browser tab for customization and branding. + {t("customization.items.browser-appearance.description")}

- Tab Title + {t("customization.items.browser-appearance.tab.title")}

- Set a custom tab title when the app is open in a browser. + {t("customization.items.browser-appearance.tab.description")}

- Tab Favicon + {t("customization.items.browser-appearance.favicon.title")}

- Define a url to an image to use for your favicon + {t("customization.items.browser-appearance.favicon.description")}

- {t("appearance.icons.title")} + {t("customization.items.sidebar-footer.title")}

- {t("appearance.icons.description")} + {t("customization.items.sidebar-footer.description")}

-
{t("appearance.icons.icon")}
-
{t("appearance.icons.link")}
+
{t("customization.items.sidebar-footer.icon")}
+
{t("customization.items.sidebar-footer.link")}
{footerIcons.map((icon, index) => ( diff --git a/frontend/src/pages/GeneralSettings/Appearance/LanguagePreference/index.jsx b/frontend/src/pages/GeneralSettings/Settings/components/LanguagePreference/index.jsx similarity index 84% rename from frontend/src/pages/GeneralSettings/Appearance/LanguagePreference/index.jsx rename to frontend/src/pages/GeneralSettings/Settings/components/LanguagePreference/index.jsx index 3e198fda199..c905b44aa03 100644 --- a/frontend/src/pages/GeneralSettings/Appearance/LanguagePreference/index.jsx +++ b/frontend/src/pages/GeneralSettings/Settings/components/LanguagePreference/index.jsx @@ -1,6 +1,8 @@ import { useLanguageOptions } from "@/hooks/useLanguageOptions"; +import { useTranslation } from "react-i18next"; export default function LanguagePreference() { + const { t } = useTranslation(); const { currentLanguage, supportedLanguages, @@ -11,11 +13,10 @@ export default function LanguagePreference() { return (

- Display Language + {t("customization.items.display-language.title")}

- Select the preferred language to render AnythingLLM's UI in, when - applicable. + {t("customization.items.display-language.description")}

-

Theme

+

+ {t("customization.items.theme.title")} +

- Select your preferred theme for the application. + {t("customization.items.theme.description")}