diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx
index c78a8f2..e939dae 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx
@@ -179,18 +179,18 @@ export default function ChatHistory({
- Welcome to your new workspace.
+ 欢迎来到你的新工作空间。
{!user || user.role !== "default" ? (
- To get started either{" "}
+ 开始吧{" "}
- upload a document
+ 上传文档
- or send a chat.
+ 或 发送聊天信息.
) : (
diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx
index 40a2d50..3c2fe18 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/index.jsx
@@ -284,8 +284,8 @@ export default function PromptInput({
type="submit"
className="border-none inline-flex justify-center rounded-2xl cursor-pointer opacity-60 hover:opacity-100 light:opacity-100 light:hover:opacity-60 ml-4"
data-tooltip-id="send-prompt"
- data-tooltip-content="Send prompt message to workspace"
- aria-label="Send prompt message to workspace"
+ data-tooltip-content="向工作区发送提示消息"
+ aria-label="向工作区发送提示消息"
>
+
+
+
+
+
+
+ Add user
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+function UsersContainer() {
+ const { user: currUser } = useUser();
+ const [loading, setLoading] = useState(true);
+ const [users, setUsers] = useState([]);
+
+ useEffect(() => {
+ async function fetchUsers() {
+ const _users = await Admin.users();
+ setUsers(_users);
+ setLoading(false);
+ }
+ fetchUsers();
+ }, []);
+
+ if (loading) {
+ return (
+
+ );
+ }
+
+ return (
+
+
+
+
+ Username
+
+
+ Role
+
+
+ Date Added
+
+
+ {" "}
+
+
+
+
+ {users.map((user) => (
+
+ ))}
+
+
+ );
+}
+
+const ROLE_HINT = {
+ default: [
+ "Can only send chats with workspaces they are added to by admin or managers.",
+ "Cannot modify any settings at all.",
+ ],
+ manager: [
+ "Can view, create, and delete any workspaces and modify workspace-specific settings.",
+ "Can create, update and invite new users to the instance.",
+ "Cannot modify LLM, vectorDB, embedding, or other connections.",
+ ],
+ admin: [
+ "Highest user level privilege.",
+ "Can see and do everything across the system.",
+ ],
+};
+
+export function RoleHintDisplay({ role }) {
+ return (
+
+
Permissions
+
+ {ROLE_HINT[role ?? "default"].map((hints, i) => {
+ return (
+
+ {hints}
+
+ );
+ })}
+
+
+ );
+}
+
+export function MessageLimitInput({ enabled, limit, updateState, role }) {
+ if (role === "admin") return null;
+ return (
+
+
+
+
+ Limit messages per day
+
+
+ {
+ updateState((prev) => ({
+ ...prev,
+ enabled: e.target.checked,
+ }));
+ }}
+ className="peer sr-only"
+ />
+
+
+
+
+ Restrict this user to a number of successful queries or chats within a
+ 24 hour window.
+
+
+ {enabled && (
+
+
+ Message limit per day
+
+
+ e.target.blur()}
+ onChange={(e) => {
+ updateState({
+ enabled: true,
+ limit: Number(e?.target?.value || 0),
+ });
+ }}
+ value={limit}
+ min={1}
+ className="border-none bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5"
+ />
+
+
+ )}
+
+ );
+}
diff --git a/frontend/src/pages/Admin/Users/index.jsx b/frontend/src/pages/Admin/Users/index.jsx
index e2d29c0..ab7922c 100644
--- a/frontend/src/pages/Admin/Users/index.jsx
+++ b/frontend/src/pages/Admin/Users/index.jsx
@@ -30,9 +30,8 @@ export default function AdminUsers() {
- These are all the accounts which have an account on this instance.
- Removing an account will instantly remove their access to this
- instance.
+ 这些是在此实例上拥有帐户的所有帐户。
+ 删除一个帐户将立即删除他们的访问权限.