Browse Source

登录-首页

master
談蓝色 11 months ago
parent
commit
a64a3cf6ed
  1. 6
      .idea/vcs.xml
  2. 132
      frontend/src/components/Footer/index.jsx
  3. 2
      frontend/src/components/Modals/Password/MultiUserAuth.jsx
  4. 25
      frontend/src/components/Modals/Password/index.jsx
  5. 2
      frontend/src/components/SettingsButton/index.jsx
  6. 6
      frontend/src/components/Sidebar/index.jsx
  7. 2
      frontend/src/components/UserIcon/index.jsx
  8. 1
      frontend/src/components/UserIcon/work.svg
  9. 3
      frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx
  10. 2
      frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/ThoughtContainer/index.jsx
  11. 8
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AgentMenu/index.jsx
  12. 4
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx
  13. 2
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx
  14. 2
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/index.jsx
  15. 4
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/reset.jsx
  16. 4
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SpeechToText/index.jsx
  17. 10
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/TextSizeMenu/index.jsx
  18. 13
      frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx
  19. 2
      frontend/src/components/WorkspaceChat/ChatContainer/index.jsx
  20. 8
      frontend/src/components/WorkspaceChat/srk.css
  21. 2
      frontend/src/pages/Admin/Invitations/InviteRow/index.jsx
  22. BIN
      images/bj.png
  23. BIN
      images/chimg.png

6
.idea/vcs.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

132
frontend/src/components/Footer/index.jsx

@ -45,72 +45,72 @@ export default function Footer() {
// to prevent pop-in. // to prevent pop-in.
if (footerData === false) return null; if (footerData === false) return null;
if (!Array.isArray(footerData) || footerData.length === 0) {
return (
<div className="flex justify-center mb-2">
<div className="flex space-x-4">
<div className="flex w-fit">
<Link
to={paths.github()}
target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover"
aria-label="Find us on GitHub"
data-tooltip-id="footer-item"
data-tooltip-content="View source code on GitHub"
>
<GithubLogo
weight="fill"
className="h-5 w-5"
color="var(--theme-sidebar-footer-icon-fill)"
/>
</Link>
</div>
<div className="flex w-fit">
<Link
to={paths.docs()}
target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover"
aria-label="Docs"
data-tooltip-id="footer-item"
data-tooltip-content="Open AnythingLLM help docs"
>
<BookOpen
weight="fill"
className="h-5 w-5"
color="var(--theme-sidebar-footer-icon-fill)"
/>
</Link>
</div>
<div className="flex w-fit">
<Link
to={paths.discord()}
target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover"
aria-label="Join our Discord server"
data-tooltip-id="footer-item"
data-tooltip-content="Join the AnythingLLM Discord"
>
<DiscordLogo
weight="fill"
className="h-5 w-5"
color="var(--theme-sidebar-footer-icon-fill)"
/>
</Link>
</div>
{!isMobile && <SettingsButton />}
</div>
<Tooltip
id="footer-item"
place="top"
delayShow={300}
className="tooltip !text-xs z-99"
/>
</div>
);
}
// if (!Array.isArray(footerData) || footerData.length === 0) {
// return (
// <div className="flex justify-center mb-2">
// <div className="flex space-x-4">
// <div className="flex w-fit">
// <Link
// to={paths.github()}
// target="_blank"
// rel="noreferrer"
// className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover"
// aria-label="Find us on GitHub"
// data-tooltip-id="footer-item"
// data-tooltip-content="View source code on GitHub"
// >
// <GithubLogo
// weight="fill"
// className="h-5 w-5"
// color="var(--theme-sidebar-footer-icon-fill)"
// />
// </Link>
// </div>
// <div className="flex w-fit">
// <Link
// to={paths.docs()}
// target="_blank"
// rel="noreferrer"
// className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover"
// aria-label="Docs"
// data-tooltip-id="footer-item"
// data-tooltip-content="Open AnythingLLM help docs"
// >
// <BookOpen
// weight="fill"
// className="h-5 w-5"
// color="var(--theme-sidebar-footer-icon-fill)"
// />
// </Link>
// </div>
// <div className="flex w-fit">
// <Link
// to={paths.discord()}
// target="_blank"
// rel="noreferrer"
// className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover"
// aria-label="Join our Discord server"
// data-tooltip-id="footer-item"
// data-tooltip-content="Join the AnythingLLM Discord"
// >
// <DiscordLogo
// weight="fill"
// className="h-5 w-5"
// color="var(--theme-sidebar-footer-icon-fill)"
// />
// </Link>
// </div>
// {!isMobile && <SettingsButton />}
// </div>
// <Tooltip
// id="footer-item"
// place="top"
// delayShow={300}
// className="tooltip !text-xs z-99"
// />
// </div>
// );
// }
return ( return (
<div className="flex justify-center mb-2"> <div className="flex justify-center mb-2">

2
frontend/src/components/Modals/Password/MultiUserAuth.jsx

@ -289,7 +289,7 @@ export default function MultiUserAuth() {
{t("login.multi-user.welcome")} {t("login.multi-user.welcome")}
</h3> </h3>
<p className="text-4xl md:text-2xl font-bold bg-gradient-to-r from-[#75D6FF] via-[#FFFFFF] light:via-[#75D6FF] to-[#FFFFFF] light:to-[#75D6FF] bg-clip-text text-transparent"> <p className="text-4xl md:text-2xl font-bold bg-gradient-to-r from-[#75D6FF] via-[#FFFFFF] light:via-[#75D6FF] to-[#FFFFFF] light:to-[#75D6FF] bg-clip-text text-transparent">
{customAppName || "AnythingLLM"}
{"琛海科技AI管理平台"}
</p> </p>
</div> </div>
<p className="text-sm text-theme-text-secondary text-center"> <p className="text-sm text-theme-text-secondary text-center">

25
frontend/src/components/Modals/Password/index.jsx

@ -9,12 +9,21 @@ import {
} from "../../../utils/constants"; } from "../../../utils/constants";
import useLogo from "../../../hooks/useLogo"; import useLogo from "../../../hooks/useLogo";
import illustration from "@/media/illustrations/login-illustration.svg"; import illustration from "@/media/illustrations/login-illustration.svg";
import chimg from "../../../../../images/chimg.png"
import bjimg from "../../../../../images/bj.png"
export default function PasswordModal({ mode = "single" }) { export default function PasswordModal({ mode = "single" }) {
const { loginLogo } = useLogo(); const { loginLogo } = useLogo();
const bj = {
bjt: {
backgroundImage: `url(${bjimg})`,
backgroundSize:'cover',
backgroundPosition: 'center'
}
}
return ( return (
<div className="fixed top-0 left-0 right-0 z-50 w-full overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] h-full bg-theme-bg-primary flex flex-col md:flex-row items-center justify-center">
<div
<div style={bj.bjt} className="fixed top-0 left-0 right-0 z-50 w-full overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] h-full bg-theme-bg-primary flex flex-col md:flex-row items-center justify-center">
{/* <div
style={{ style={{
background: ` background: `
radial-gradient(circle at center, transparent 40%, black 100%), radial-gradient(circle at center, transparent 40%, black 100%),
@ -32,17 +41,17 @@ export default function PasswordModal({ mode = "single" }) {
src={illustration} src={illustration}
alt="login illustration" alt="login illustration"
/> />
</div>
</div> */}
<div className="flex flex-col items-center justify-center h-full w-full md:w-1/2 z-50 relative md:-mt-20 mt-0 !border-none bg-theme-bg-secondary md:bg-transparent"> <div className="flex flex-col items-center justify-center h-full w-full md:w-1/2 z-50 relative md:-mt-20 mt-0 !border-none bg-theme-bg-secondary md:bg-transparent">
<img <img
src={loginLogo}
src={chimg}
alt="Logo" alt="Logo"
className={`hidden relative md:flex rounded-2xl w-fit m-4 z-30 ${
mode === "single" ? "md:top-2" : "md:top-12"
} absolute max-h-[65px]`}
className={`hidden relative md:flex rounded-2xl w-fit m-4 z-30 ${mode === "single" ? "md:top-2" : "md:top-12"
} absolute max-h-[80px]`}
style={{ objectFit: "contain" }} style={{ objectFit: "contain" }}
/> />
{mode === "single" ? <SingleUserAuth /> : <MultiUserAuth />}
<MultiUserAuth />
{/* {mode === "single" ? <SingleUserAuth /> : <MultiUserAuth />} */}
</div> </div>
</div> </div>
); );

2
frontend/src/components/SettingsButton/index.jsx

@ -37,7 +37,7 @@ export default function SettingsButton() {
// className="transition-all duration-300 p-2 rounded-full bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border" // className="transition-all duration-300 p-2 rounded-full bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
aria-label="Settings" aria-label="Settings"
data-tooltip-id="footer-item" data-tooltip-id="footer-item"
data-tooltip-content="Open settings"
data-tooltip-content="设置"
> >
<Wrench <Wrench
className="h-5 w-5" className="h-5 w-5"

6
frontend/src/components/Sidebar/index.jsx

@ -12,6 +12,7 @@ import { Link } from "react-router-dom";
import paths from "@/utils/paths"; import paths from "@/utils/paths";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { useSidebarToggle, ToggleSidebarButton } from "./SidebarToggle"; import { useSidebarToggle, ToggleSidebarButton } from "./SidebarToggle";
import chimg from "../../../../images/chimg.png";
export default function Sidebar() { export default function Sidebar() {
const { user } = useUser(); const { user } = useUser();
@ -36,12 +37,13 @@ export default function Sidebar() {
> >
<div className="flex shrink-0 w-full justify-center my-[18px]"> <div className="flex shrink-0 w-full justify-center my-[18px]">
<div className="flex justify-between w-[250px] min-w-[250px]"> <div className="flex justify-between w-[250px] min-w-[250px]">
<Link to={paths.home()} aria-label="Home">
<Link className="flex items-center tracking-widest" to={paths.home()} aria-label="Home">
<img <img
src={logo}
src={chimg}
alt="Logo" alt="Logo"
className={`rounded max-h-[24px] object-contain transition-opacity duration-500 ${showSidebar ? "opacity-100" : "opacity-0"}`} className={`rounded max-h-[24px] object-contain transition-opacity duration-500 ${showSidebar ? "opacity-100" : "opacity-0"}`}
/> />
<div className="pl-2 font-bold ">{'琛海科技'}</div>
</Link> </Link>
{canToggleSidebar && ( {canToggleSidebar && (
<ToggleSidebarButton <ToggleSidebarButton

2
frontend/src/components/UserIcon/index.jsx

@ -1,7 +1,7 @@
import React, { memo } from "react"; import React, { memo } from "react";
import usePfp from "../../hooks/usePfp"; import usePfp from "../../hooks/usePfp";
import UserDefaultPfp from "./user.svg"; import UserDefaultPfp from "./user.svg";
import WorkspaceDefaultPfp from "./workspace.svg";
import WorkspaceDefaultPfp from "./work.svg";
const UserIcon = memo(({ role }) => { const UserIcon = memo(({ role }) => {
const { pfp } = usePfp(); const { pfp } = usePfp();

1
frontend/src/components/UserIcon/work.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1740051958691" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18628" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M511.994264 511.994264m-511.994264 0a511.994264 511.994264 0 1 0 1023.988529 0 511.994264 511.994264 0 1 0-1023.988529 0Z" fill="#28176D" p-id="18629"></path><path d="M769.87841 652.183853h-53.444341V522.260992h53.444341zM789.528583 522.260992h-19.650173v129.922861h84.898383V522.260992h-65.24821z" fill="#F8C642" p-id="18630"></path><path d="M772.012054 782.095242h-55.577985V652.172382H772.012054z" fill="#F8C642" p-id="18631"></path><path d="M842.777913 782.095242h-72.910974V652.183853h84.886912v117.923981a11.99888 11.99888 0 0 1-11.975938 11.987408z" fill="#7B49B6" p-id="18632"></path><path d="M836.571992 522.260992H716.434069V392.338132h120.137923z" fill="#FC3A64" p-id="18633"></path><path d="M854.776793 522.260992h-65.24821V392.338132h65.24821z" fill="#FFFFFF" p-id="18634"></path><path d="M348.518131 692.73456l-20.18932 88.95919H169.211736l126.951818-522.14628h224.124391l120.447646 522.157751H483.316253l-20.533455-88.959189z m28.047095-122.48952h58.170477l-28.735367-127.640091z" fill="#F8C642" p-id="18635"></path><path d="M296.163554 259.54747l-22.896524 94.190059H542.014406l-21.726461-94.190059H296.163554z" fill="#7B49B6" p-id="18636"></path><path d="M220.625674 570.24504h214.1215l28.047095 122.48952H190.846427l29.779247-122.48952z" fill="#FC3A64" p-id="18637"></path><path d="M406.000336 442.604949h156.513112l29.435111 127.640091H434.747174l-28.746838-127.640091z" fill="#FFFFFF" p-id="18638"></path><path d="M718.556241 241.893286h134.098379v47.61697H718.556241z" fill="#FC3A64" p-id="18639"></path><path d="M718.556241 288.087826h134.098379v47.61697H718.556241z" fill="#FC3A64" p-id="18640"></path></svg>

3
frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx

@ -75,12 +75,13 @@ const HistoricalMessage = ({
if (completeDelete) return null; if (completeDelete) return null;
return ( return (
//
<div <div
key={uuid} key={uuid}
onAnimationEnd={onEndAnimation} onAnimationEnd={onEndAnimation}
className={`${ className={`${
isDeleted ? "animate-remove" : "" isDeleted ? "animate-remove" : ""
} flex justify-center items-end w-full group bg-theme-bg-chat`}
} flex justify-center items-end w-full group `}
> >
<div className="py-8 px-4 w-full flex gap-x-5 md:max-w-[80%] flex-col"> <div className="py-8 px-4 w-full flex gap-x-5 md:max-w-[80%] flex-col">
<div className="flex gap-x-5"> <div className="flex gap-x-5">

2
frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/ThoughtContainer/index.jsx

@ -63,7 +63,7 @@ export const ThoughtChainComponent = forwardRef(
transition: "all 0.1s ease-in-out", transition: "all 0.1s ease-in-out",
borderRadius: isExpanded || autoExpand ? "6px" : "24px", borderRadius: isExpanded || autoExpand ? "6px" : "24px",
}} }}
className={`${isExpanded || autoExpand ? "" : `${canExpand ? "hover:bg-theme-sidebar-item-hover" : ""}`} items-start bg-theme-bg-chat-input py-2 px-4 flex gap-x-2 border border-theme-sidebar-border`}
className={`${isExpanded || autoExpand ? "" : `${canExpand ? "hover:bg-theme-sidebar-item-hover" : ""}`} items-start bg-white py-2 px-4 flex gap-x-2 shadow-[0_0_5px_0_#EBEDF6]`}
> >
{isThinking || isComplete ? ( {isThinking || isComplete ? (
<Brain <Brain

8
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AgentMenu/index.jsx

@ -10,8 +10,8 @@ export default function AvailableAgentsButton({ showing, setShowAgents }) {
<div <div
id="agent-list-btn" id="agent-list-btn"
data-tooltip-id="tooltip-agent-list-btn" data-tooltip-id="tooltip-agent-list-btn"
data-tooltip-content="View all available agents you can use for chatting."
aria-label="View all available agents you can use for chatting."
data-tooltip-content="查看可用于聊天的所有可用座席."
aria-label="查看可用于聊天的所有可用座席."
onClick={() => setShowAgents(!showing)} onClick={() => setShowAgents(!showing)}
className={`flex justify-center items-center cursor-pointer ${ className={`flex justify-center items-center cursor-pointer ${
showing ? "!opacity-100" : "" showing ? "!opacity-100" : ""
@ -81,7 +81,7 @@ export function AvailableAgents({
> >
<div className="w-full flex-col text-left flex pointer-events-none"> <div className="w-full flex-col text-left flex pointer-events-none">
<div className="text-theme-text-primary text-sm"> <div className="text-theme-text-primary text-sm">
<b>@agent</b> - the default agent for this workspace.
<b>@代理</b> - 此工作区的默认代理.
</div> </div>
<div className="flex flex-wrap gap-2 mt-2"> <div className="flex flex-wrap gap-2 mt-2">
<AbilityTag text="rag-search" /> <AbilityTag text="rag-search" />
@ -101,7 +101,7 @@ export function AvailableAgents({
> >
<div className="w-full flex-col text-center flex pointer-events-none"> <div className="w-full flex-col text-center flex pointer-events-none">
<div className="text-theme-text-secondary text-xs italic"> <div className="text-theme-text-secondary text-xs italic">
custom agents are coming soon!
海关代理很快就要来了
</div> </div>
</div> </div>
</button> </button>

4
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx

@ -15,8 +15,8 @@ export default function AttachItem() {
<button <button
id="attach-item-btn" id="attach-item-btn"
data-tooltip-id="attach-item-btn" data-tooltip-id="attach-item-btn"
data-tooltip-content="Attach a file to this chat"
aria-label="Attach a file to this chat"
data-tooltip-content="将文件附加到此聊天"
aria-label="将文件附加到此聊天"
type="button" type="button"
onClick={(e) => { onClick={(e) => {
e?.target?.blur(); e?.target?.blur();

2
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx

@ -113,7 +113,7 @@ export default function SlashPresets({ setShowing, sendCommand }) {
<div className="w-full flex-row flex pointer-events-none items-center gap-2"> <div className="w-full flex-row flex pointer-events-none items-center gap-2">
<Plus size={24} weight="fill" className="text-theme-text-primary" /> <Plus size={24} weight="fill" className="text-theme-text-primary" />
<div className="text-theme-text-primary text-sm font-medium"> <div className="text-theme-text-primary text-sm font-medium">
Add New Preset
添加新预设
</div> </div>
</div> </div>
</button> </button>

2
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/index.jsx

@ -10,7 +10,7 @@ export default function SlashCommandsButton({ showing, setShowSlashCommand }) {
<div <div
id="slash-cmd-btn" id="slash-cmd-btn"
data-tooltip-id="tooltip-slash-cmd-btn" data-tooltip-id="tooltip-slash-cmd-btn"
data-tooltip-content="View all available slash commands for chatting."
data-tooltip-content="提示词"
onClick={() => setShowSlashCommand(!showing)} onClick={() => setShowSlashCommand(!showing)}
className={`flex justify-center items-center cursor-pointer ${ className={`flex justify-center items-center cursor-pointer ${
showing ? "!opacity-100" : "" showing ? "!opacity-100" : ""

4
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/reset.jsx

@ -13,9 +13,9 @@ export default function ResetCommand({ setShowing, sendCommand }) {
className="border-none w-full hover:cursor-pointer hover:bg-theme-action-menu-item-hover px-2 py-2 rounded-xl flex flex-col justify-start" className="border-none w-full hover:cursor-pointer hover:bg-theme-action-menu-item-hover px-2 py-2 rounded-xl flex flex-col justify-start"
> >
<div className="w-full flex-col text-left flex pointer-events-none"> <div className="w-full flex-col text-left flex pointer-events-none">
<div className="text-white text-sm font-bold">/reset</div>
<div className="text-white text-sm font-bold">/重置</div>
<div className="text-white text-opacity-60 text-sm"> <div className="text-white text-opacity-60 text-sm">
Clear your chat history and begin a new chat
清除您的聊天记录并开始一个新的聊天
</div> </div>
</div> </div>
</button> </button>

4
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SpeechToText/index.jsx

@ -95,8 +95,8 @@ export default function SpeechToText({ sendCommand }) {
<div <div
id="text-size-btn" id="text-size-btn"
data-tooltip-id="tooltip-text-size-btn" data-tooltip-id="tooltip-text-size-btn"
data-tooltip-content="Speak your prompt"
aria-label="Speak your prompt"
data-tooltip-content="说出你的提示"
aria-label="说出你的提示"
onClick={listening ? endTTSSession : startSTTSession} onClick={listening ? endTTSSession : startSTTSession}
className={`border-none relative flex justify-center items-center opacity-60 hover:opacity-100 light:opacity-100 light:hover:opacity-60 cursor-pointer ${ className={`border-none relative flex justify-center items-center opacity-60 hover:opacity-100 light:opacity-100 light:hover:opacity-60 cursor-pointer ${
!!listening ? "!opacity-100" : "" !!listening ? "!opacity-100" : ""

10
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/TextSizeMenu/index.jsx

@ -12,8 +12,8 @@ export default function TextSizeButton() {
ref={buttonRef} ref={buttonRef}
id="text-size-btn" id="text-size-btn"
data-tooltip-id="tooltip-text-size-btn" data-tooltip-id="tooltip-text-size-btn"
data-tooltip-content="Change text size"
aria-label="Change text size"
data-tooltip-content="更改文本大小"
aria-label="更改文本大小"
onClick={() => setShowTextSizeMenu(!showTextSizeMenu)} onClick={() => setShowTextSizeMenu(!showTextSizeMenu)}
className={`border-none relative flex justify-center items-center opacity-60 hover:opacity-100 light:opacity-100 light:hover:opacity-60 cursor-pointer ${ className={`border-none relative flex justify-center items-center opacity-60 hover:opacity-100 light:opacity-100 light:hover:opacity-60 cursor-pointer ${
showTextSizeMenu ? "!opacity-100" : "" showTextSizeMenu ? "!opacity-100" : ""
@ -88,7 +88,7 @@ function TextSizeMenu({ showing, setShowing, buttonRef }) {
}`} }`}
> >
<div className="w-full flex-col text-left flex pointer-events-none"> <div className="w-full flex-col text-left flex pointer-events-none">
<div className="text-theme-text-primary text-xs">Small</div>
<div className="text-theme-text-primary text-xs"></div>
</div> </div>
</button> </button>
@ -105,7 +105,7 @@ function TextSizeMenu({ showing, setShowing, buttonRef }) {
}`} }`}
> >
<div className="w-full flex-col text-left flex pointer-events-none"> <div className="w-full flex-col text-left flex pointer-events-none">
<div className="text-theme-text-primary text-sm">Normal</div>
<div className="text-theme-text-primary text-sm">正常的</div>
</div> </div>
</button> </button>
@ -122,7 +122,7 @@ function TextSizeMenu({ showing, setShowing, buttonRef }) {
}`} }`}
> >
<div className="w-full flex-col text-left flex pointer-events-none"> <div className="w-full flex-col text-left flex pointer-events-none">
<div className="text-theme-text-primary text-[16px]">Large</div>
<div className="text-theme-text-primary text-[16px]"></div>
</div> </div>
</button> </button>
</div> </div>

13
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx

@ -17,6 +17,7 @@ import AttachmentManager from "./Attachments";
import AttachItem from "./AttachItem"; import AttachItem from "./AttachItem";
import { PASTE_ATTACHMENT_EVENT } from "../DnDWrapper"; import { PASTE_ATTACHMENT_EVENT } from "../DnDWrapper";
import useTextSize from "@/hooks/useTextSize"; import useTextSize from "@/hooks/useTextSize";
import "../../srk.css"
export const PROMPT_INPUT_EVENT = "set_prompt_input"; export const PROMPT_INPUT_EVENT = "set_prompt_input";
const MAX_EDIT_STACK_SIZE = 100; const MAX_EDIT_STACK_SIZE = 100;
@ -251,10 +252,10 @@ export default function PromptInput({
onSubmit={handleSubmit} onSubmit={handleSubmit}
className="flex flex-col gap-y-1 rounded-t-lg md:w-3/4 w-full mx-auto max-w-xl items-center" className="flex flex-col gap-y-1 rounded-t-lg md:w-3/4 w-full mx-auto max-w-xl items-center"
> >
<div className="flex items-center rounded-lg md:mb-4">
<div className="w-[95vw] md:w-[635px] bg-theme-bg-chat-input light:bg-white light:border-solid light:border-[1px] light:border-theme-chat-input-border shadow-sm rounded-2xl flex flex-col px-4 overflow-hidden">
<div className="flex items-center rounded-lg md:mb-4 input_border">
<div className="w-[95vw] md:w-[800px] shadow-[0_0_11px_0px_#EBEDF6] bg-theme-bg-chat-input light:bg-white light:border-theme-chat-input-border rounded-2xl flex flex-col px-4 overflow-hidden">
<AttachmentManager attachments={attachments} /> <AttachmentManager attachments={attachments} />
<div className="flex items-center w-full border-b-2 border-theme-chat-input-border">
<div className="flex items-center w-full border-b border-gray-200">
<textarea <textarea
ref={textareaRef} ref={textareaRef}
onChange={handleChange} onChange={handleChange}
@ -271,8 +272,8 @@ export default function PromptInput({
adjustTextArea(e); adjustTextArea(e);
}} }}
value={promptInput} value={promptInput}
className={`border-none cursor-text max-h-[50vh] md:max-h-[350px] md:min-h-[40px] mx-2 md:mx-0 pt-[12px] w-full leading-5 md:text-md text-white bg-transparent placeholder:text-white/60 light:placeholder:text-theme-text-primary resize-none active:outline-none focus:outline-none flex-grow ${textSizeClass}`}
placeholder={"Send a message"}
className={`border-none cursor-text max-h-[50vh] md:max-h-[350px] md:min-h-[40px] mx-2 md:mx-0 pt-[12px] pb-[5px] w-full leading-5 md:text-md text-white bg-transparent resize-none active:outline-none focus:outline-none flex-grow ${textSizeClass}`}
placeholder={"和deepSeek说几句话"}
/> />
{buttonDisabled ? ( {buttonDisabled ? (
<StopGenerationButton /> <StopGenerationButton />
@ -302,7 +303,7 @@ export default function PromptInput({
</> </>
)} )}
</div> </div>
<div className="flex justify-between py-3.5">
<div className="flex justify-between py-[20px]">
<div className="flex gap-x-2"> <div className="flex gap-x-2">
<AttachItem /> <AttachItem />
<SlashCommandsButton <SlashCommandsButton

2
frontend/src/components/WorkspaceChat/ChatContainer/index.jsx

@ -265,7 +265,7 @@ export default function ChatContainer({ workspace, knownHistory = [] }) {
return ( return (
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-theme-bg-secondary w-full h-full overflow-y-scroll no-scroll z-[2]"
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] w-full h-full overflow-y-scroll no-scroll z-[2]"
> >
{isMobile && <SidebarMobileHeader />} {isMobile && <SidebarMobileHeader />}
<DnDFileUploaderWrapper> <DnDFileUploaderWrapper>

8
frontend/src/components/WorkspaceChat/srk.css

@ -0,0 +1,8 @@
.input_border{
border: 2px solid transparent;
transition: 0.3s ease;
}
.input_border:hover{
border:2px solid #3B72E9;
border-radius: 15px;
}

2
frontend/src/pages/Admin/Invitations/InviteRow/index.jsx

@ -33,7 +33,7 @@ export default function InviteRow({ invite }) {
if (!copied) return false; if (!copied) return false;
setTimeout(() => { setTimeout(() => {
setCopied(false); setCopied(false);
}, 3000);
}, );
} }
resetStatus(); resetStatus();
}, [copied]); }, [copied]);

BIN
images/bj.png

After

Width: 4032  |  Height: 2304  |  Size: 8.1 MiB

BIN
images/chimg.png

After

Width: 626  |  Height: 626  |  Size: 40 KiB

Loading…
Cancel
Save