θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,21 @@ export default function CustomAppName() {
if (!canCustomize || loading) return null;

return (
<form className="mb-6" onSubmit={updateCustomAppName}>
<div className="flex flex-col gap-y-1">
<h2 className="text-base leading-6 font-bold text-white">
Custom App Name
</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
Set a custom app name that is displayed on the login page.
</p>
</div>
<form
className="flex flex-col gap-y-0.5 mt-4"
onSubmit={updateCustomAppName}
>
<h2 className="text-sm leading-6 font-semibold text-white">
Custom App Name
</h2>
<p className="text-xs text-white/60">
Set a custom app name that is displayed on the login page.
</p>
<div className="flex items-center gap-x-4">
<input
name="customAppName"
type="text"
className="border-none bg-theme-settings-input-bg mt-3 text-white text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5 max-w-[275px] placeholder:text-theme-settings-input-placeholder"
className="border-none bg-theme-settings-input-bg mt-2 text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-fit py-2 px-4"
placeholder="AnythingLLM"
required={true}
autoComplete="off"
Expand All @@ -81,7 +82,7 @@ export default function CustomAppName() {
<button
type="button"
onClick={(e) => updateCustomAppName(e, "")}
className="mt-4 text-white text-base font-medium hover:text-opacity-60"
className="text-white text-base font-medium hover:text-opacity-60"
>
Clear
</button>
Expand All @@ -90,7 +91,7 @@ export default function CustomAppName() {
{hasChanges && (
<button
type="submit"
className="transition-all mt-6 w-fit duration-300 border border-slate-200 px-5 py-2.5 rounded-lg text-white text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800"
className="transition-all mt-2 w-fit duration-300 border border-slate-200 px-5 py-2.5 rounded-lg text-white text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800"
>
Save
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,13 @@ export default function CustomLogo() {
const { t } = useTranslation();

return (
<div className="mt-6 mb-8">
<div className="flex flex-col gap-y-1">
<h2 className="text-base leading-6 font-bold text-theme-text-primary">
{t("appearance.logo.title")}
</h2>
<p className="text-xs leading-[18px] font-base text-theme-text-secondary">
{t("appearance.logo.description")}
</p>
</div>
<div className="flex flex-col gap-y-0.5 my-4">
<h2 className="text-sm leading-6 font-semibold text-white">
{t("appearance.logo.title")}
</h2>
<p className="text-xs text-white/60">
{t("appearance.logo.description")}
</p>
{isDefaultLogo ? (
<div className="flex md:flex-row flex-col items-center">
<div className="flex flex-row gap-x-8">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,14 @@ export default function CustomMessages() {
};

return (
<div className="mb-8">
<div className="flex flex-col gap-y-1">
<h2 className="text-base leading-6 font-bold text-white">
{t("appearance.message.title")}
</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
{t("appearance.message.description")}
</p>
</div>
<div className="mt-3 flex flex-col gap-y-6 bg-theme-settings-input-bg rounded-lg pr-[31px] pl-[12px] pt-4 max-w-[700px]">
<div className="flex flex-col gap-y-0.5 my-4">
<h2 className="text-sm leading-6 font-semibold text-white">
{t("appearance.message.title")}
</h2>
<p className="text-xs text-white/60">
{t("appearance.message.description")}
</p>
<div className="mt-2 flex flex-col gap-y-6 bg-theme-settings-input-bg rounded-lg pr-[31px] pl-[12px] pt-4 max-w-[700px]">
{messages.map((message, index) => (
<div key={index} className="flex flex-col gap-y-2">
{message.user && (
Expand Down Expand Up @@ -121,7 +119,7 @@ export default function CustomMessages() {
</div>
</div>
{hasChanges && (
<div className="flex justify-start pt-6">
<div className="flex justify-start pt-2">
<button
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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,86 +35,82 @@ export default function CustomSiteSettings() {

return (
<form
className="mb-6"
className="flex flex-col gap-y-0.5 my-4 border-t border-white border-opacity-20 light:border-black/20 pt-6"
onChange={() => setHasChanges(true)}
onSubmit={handleSiteSettingUpdate}
>
<div className="flex flex-col border-t border-white/30 pt-4 gap-y-2">
<div className="flex flex-col gap-y-1">
<h2 className="text-base leading-6 font-bold text-white">
Custom Site Settings
</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
Change the content of the browser tab for customization and
branding.
</p>
</div>
<h2 className="text-sm leading-6 font-semibold text-white">
Custom Site Settings
</h2>
<p className="text-xs text-white/60">
Change the content of the browser tab for customization and branding.
</p>

<div className="w-fit">
<div className="flex flex-col gap-y-1">
<h2 className="text-sm leading-6 text-white">Tab Title</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
Set a custom tab title when the app is open in a browser.
</p>
</div>
<div className="flex items-center gap-x-4">
<input
name="meta_page_title"
type="text"
className="border-none bg-theme-settings-input-bg mt-3 text-white text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5 max-w-[400px] placeholder:text-theme-settings-input-placeholder"
placeholder="AnythingLLM | Your personal LLM trained on anything"
autoComplete="off"
onChange={(e) => {
setSettings((prev) => {
return { ...prev, title: e.target.value };
});
}}
value={
settings.title ??
"AnythingLLM | Your personal LLM trained on anything"
}
/>
</div>
<div className="w-fit">
<h2 className="text-sm leading-6 font-medium text-white mt-2">
Tab Title
</h2>
<p className="text-xs text-white/60">
Set a custom tab title when the app is open in a browser.
</p>
<div className="flex items-center gap-x-4">
<input
name="meta_page_title"
type="text"
className="border-none bg-theme-settings-input-bg mt-2 text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-fit py-2 px-4"
placeholder="AnythingLLM | Your personal LLM trained on anything"
autoComplete="off"
onChange={(e) => {
setSettings((prev) => {
return { ...prev, title: e.target.value };
});
}}
value={
settings.title ??
"AnythingLLM | Your personal LLM trained on anything"
}
/>
</div>
</div>

<div className="w-fit">
<div className="flex flex-col gap-y-1">
<h2 className="text-sm leading-6 text-white">Tab Favicon</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
Define a url to an image to use for your favicon
</p>
</div>
<div className="flex items-center gap-x-2">
<img
src={settings.faviconUrl ?? "/favicon.png"}
onError={(e) => (e.target.src = "/favicon.png")}
className="h-10 w-10 rounded-lg mt-2.5"
/>
<input
name="meta_page_favicon"
type="url"
className="border-none bg-theme-settings-input-bg mt-3 text-white text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5 max-w-[400px] placeholder:text-theme-settings-input-placeholder"
placeholder="url to your image"
onChange={(e) => {
setSettings((prev) => {
return { ...prev, faviconUrl: e.target.value };
});
}}
autoComplete="off"
value={settings.faviconUrl ?? ""}
/>
</div>
<div className="w-fit">
<h2 className="text-sm leading-6 font-medium text-white mt-2">
Tab Favicon
</h2>
<p className="text-xs text-white/60">
Define a url to an image to use for your favicon
</p>
<div className="flex items-center gap-x-2">
<img
src={settings.faviconUrl ?? "/favicon.png"}
onError={(e) => (e.target.src = "/favicon.png")}
className="h-10 w-10 rounded-lg mt-2"
alt="Site favicon"
/>
<input
name="meta_page_favicon"
type="url"
className="border-none bg-theme-settings-input-bg mt-2 text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-fit py-2 px-4"
placeholder="url to your image"
onChange={(e) => {
setSettings((prev) => {
return { ...prev, faviconUrl: e.target.value };
});
}}
autoComplete="off"
value={settings.faviconUrl ?? ""}
/>
</div>

{hasChanges && (
<button
type="submit"
className="transition-all mt-6 w-fit duration-300 border border-slate-200 px-5 py-2.5 rounded-lg text-white text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800"
>
Save
</button>
)}
</div>

{hasChanges && (
<button
type="submit"
className="transition-all mt-2 w-fit duration-300 border border-slate-200 px-5 py-2.5 rounded-lg text-white text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800"
>
Save
</button>
)}
</form>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,14 @@ export default function FooterCustomization() {
};

return (
<div className="mb-8">
<div className="flex flex-col gap-y-1">
<h2 className="text-base leading-6 font-bold text-white">
{t("appearance.icons.title")}
</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
{t("appearance.icons.description")}
</p>
</div>
<div className="mt-3 flex gap-x-3 font-bold text-white text-sm">
<div className="flex flex-col gap-y-0.5 my-4">
<h2 className="text-sm leading-6 font-semibold text-white">
{t("appearance.icons.title")}
</h2>
<p className="text-xs text-white/60">
{t("appearance.icons.description")}
</p>
<div className="mt-2 flex gap-x-3 font-medium text-white text-sm">
<div>{t("appearance.icons.icon")}</div>
<div>{t("appearance.icons.link")}</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ export default function LanguagePreference() {
} = useLanguageOptions();

return (
<>
<div className="flex flex-col gap-y-1 mt-6">
<h2 className="text-base leading-6 font-bold text-white">
Display Language
</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
Select the preferred language to render AnythingLLM's UI in, when
applicable.
</p>
</div>
<div className="flex flex-col gap-y-0.5 my-4">
<h2 className="text-sm leading-6 font-semibold text-white">
Display Language
</h2>
<p className="text-xs text-white/60">
Select the preferred language to render AnythingLLM's UI in, when
applicable.
</p>
<div className="flex items-center gap-x-4">
<select
name="userLang"
className="border-none bg-theme-settings-input-bg w-fit mt-2 px-4 border-gray-500 text-white text-sm rounded-lg block py-2"
className="border-none bg-theme-settings-input-bg mt-2 text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-fit py-2 px-4"
defaultValue={currentLanguage || "en"}
onChange={(e) => changeLanguage(e.target.value)}
>
Expand All @@ -35,6 +33,6 @@ export default function LanguagePreference() {
})}
</select>
</div>
</>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ export function MessageDirection() {
const { msgDirection, setMsgDirection } = useChatMessageAlignment();

return (
<div className="flex flex-col gap-y-1 mt-4">
<h2 className="text-base leading-6 font-bold text-white">
<div className="flex flex-col gap-y-0.5 my-4">
<h2 className="text-sm leading-6 font-semibold text-white">
Message Chat Alignment
</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
<p className="text-xs text-white/60">
Select the message alignment mode when using the chat interface.
</p>
<div className="flex flex-row flex-wrap gap-x-4 pt-1 gap-y-4 md:gap-y-0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,27 @@ export default function ShowScrollbar() {
}, []);

return (
<div className="flex flex-col w-full gap-y-4 mt-6">
<div className="flex flex-col gap-y-1">
<h2 className="text-base leading-6 font-bold text-white">
Show chat window scrollbar
</h2>
<p className="text-xs leading-[18px] font-base text-white/60">
Enable or disable the scrollbar in the chat window
</p>
<div className="mt-2">
<label className="relative inline-flex cursor-pointer items-center">
<input
id="show_scrollbar"
type="checkbox"
name="show_scrollbar"
value="yes"
checked={showScrollbar}
onChange={handleChange}
disabled={saving}
className="peer sr-only"
/>
<div className="pointer-events-none peer h-6 w-11 rounded-full bg-[#CFCFD0] after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:shadow-xl after:border-none after:bg-white after:box-shadow-md after:transition-all after:content-[''] peer-checked:bg-[#32D583] peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-transparent"></div>
</label>
</div>
<div className="flex flex-col gap-y-0.5 my-4">
<h2 className="text-sm leading-6 font-semibold text-white">
Show chat window scrollbar
</h2>
<p className="text-xs text-white/60">
Enable or disable the scrollbar in the chat window
</p>
<div className="flex items-center gap-x-4">
<label className="relative inline-flex cursor-pointer items-center">
<input
id="show_scrollbar"
type="checkbox"
name="show_scrollbar"
value="yes"
checked={showScrollbar}
onChange={handleChange}
disabled={saving}
className="peer sr-only"
/>
<div className="pointer-events-none peer h-6 w-11 rounded-full bg-[#CFCFD0] after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:shadow-xl after:border-none after:bg-white after:box-shadow-md after:transition-all after:content-[''] peer-checked:bg-[#32D583] peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-transparent"></div>
</label>
</div>
</div>
);
Expand Down
Loading