diff --git a/web/public/locales/zh-CN/translation.json b/web/public/locales/zh-CN/translation.json index fe7211b334..de17c9f77b 100644 --- a/web/public/locales/zh-CN/translation.json +++ b/web/public/locales/zh-CN/translation.json @@ -168,5 +168,6 @@ "Total": "总数", "Page": "页", "NoData": "当前无数据", - "Logout": "退出登录" -} \ No newline at end of file + "Logout": "退出登录", + "SaveAndRestart": "保存并重启" +} diff --git a/web/public/logo.png b/web/public/logo.png index 523a73cfaa..834e9d9f11 100644 Binary files a/web/public/logo.png and b/web/public/logo.png differ diff --git a/web/src/apis/typing.d.ts b/web/src/apis/typing.d.ts index 29c703087a..e839a57f28 100644 --- a/web/src/apis/typing.d.ts +++ b/web/src/apis/typing.d.ts @@ -220,3 +220,25 @@ export interface TLogItem { data: string; created_at: string; } + +// user data +export interface TUserInfo { + id: string; + username: string; + email: any; + phone: any; + createdAt: string; + updatedAt: string; + profile: TProfile; +} + +export interface TProfile { + id: string; + uid: string; + openid: string; + from: string; + avatar: string; + name: string; + createdAt: string; + updatedAt: string; +} diff --git a/web/src/chakraTheme.ts b/web/src/chakraTheme.ts index a903755615..d0fbf11a87 100644 --- a/web/src/chakraTheme.ts +++ b/web/src/chakraTheme.ts @@ -63,15 +63,7 @@ const Button = defineStyleConfig({ }, variants: { - plain: { - bg: "gray.200", - color: "gray.500", - _hover: { - bg: "gray.300", - }, - }, - - solid: { + primary: { bg: "primary.500", color: "white", _hover: { @@ -79,24 +71,33 @@ const Button = defineStyleConfig({ }, }, - ghost: { + secondary: { color: "primary.500", - borderRadius: 2, + bg: "primary.100", + _hover: { + bg: "primary.200", + }, + }, + + plain: { + bg: "gray.200", + color: "gray.500", _hover: { - bg: "primary.500", - color: "white", - borderRadius: 2, + bg: "gray.300", }, }, - grayGhost: { - color: "#000", + text: { + color: "primary.500", + _hover: { + bg: "primary.100", + }, }, }, // The default size and variant values defaultProps: { size: "md", - variant: "solid", + variant: "primary", }, }); diff --git a/web/src/components/EditableTable/index.tsx b/web/src/components/EditableTable/index.tsx index 3d1ccd7f4d..464a7e34a0 100644 --- a/web/src/components/EditableTable/index.tsx +++ b/web/src/components/EditableTable/index.tsx @@ -133,7 +133,6 @@ const EditableTable = function (props: { - - - ) : ( - - )} - - - - - - - - - */} ); } diff --git a/web/src/pages/app/database/CollectionDataList/mods/IndexPanel/addIndexModal/index.tsx b/web/src/pages/app/database/CollectionDataList/mods/IndexPanel/addIndexModal/index.tsx index 9c626e50c3..1a191a8cc4 100644 --- a/web/src/pages/app/database/CollectionDataList/mods/IndexPanel/addIndexModal/index.tsx +++ b/web/src/pages/app/database/CollectionDataList/mods/IndexPanel/addIndexModal/index.tsx @@ -66,7 +66,7 @@ function AddIndexModal() { - diff --git a/web/src/pages/app/functions/mods/DebugPanel/index.tsx b/web/src/pages/app/functions/mods/DebugPanel/index.tsx index 965c0eb1d0..5926b73853 100644 --- a/web/src/pages/app/functions/mods/DebugPanel/index.tsx +++ b/web/src/pages/app/functions/mods/DebugPanel/index.tsx @@ -10,6 +10,7 @@ import { TabPanel, TabPanels, Tabs, + Tooltip, } from "@chakra-ui/react"; import axios from "axios"; import { t } from "i18next"; @@ -51,7 +52,7 @@ export default function DebugPanel() { const [bodyParams, setBodyParams] = useState({}); const [headerParams, setHeaderParams] = useState([]); - useHotKey( + const { displayName } = useHotKey( DEFAULT_SHORTCUTS.send_request, () => { runningCode(); @@ -85,7 +86,7 @@ export default function DebugPanel() { data: bodyParams, headers: Object.assign(mapValues(keyBy(headerParams, "name"), "value"), { "x-laf-debug-token": `${globalStore.currentApp?.function_debug_token}`, - "x-laf-func-data": _funcData, + "x-laf-func-data": encodeURIComponent(_funcData), }), }); @@ -105,7 +106,7 @@ export default function DebugPanel() { - + {t("FunctionPanel.InterfaceDebug")} @@ -136,16 +137,17 @@ export default function DebugPanel() { ); })} - + + +
diff --git a/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx b/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx index abe6189159..e84c4e623d 100644 --- a/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx +++ b/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx @@ -325,12 +325,11 @@ const AddDependenceModal = () => { )} diff --git a/web/src/pages/app/functions/mods/DeployButton/index.tsx b/web/src/pages/app/functions/mods/DeployButton/index.tsx index 2fc9115da8..bc5c16a467 100644 --- a/web/src/pages/app/functions/mods/DeployButton/index.tsx +++ b/web/src/pages/app/functions/mods/DeployButton/index.tsx @@ -30,7 +30,7 @@ export default function DeployButton() { const updateFunctionMutation = useUpdateFunctionMutation(); - const { displayName } = useHotKey( + useHotKey( DEFAULT_SHORTCUTS.deploy, async () => { onOpen(); @@ -61,14 +61,13 @@ export default function DeployButton() { return ( <> {isOpen ? ( @@ -85,11 +84,11 @@ export default function DeployButton() { - + diff --git a/web/src/pages/app/mods/SideBar/index.tsx b/web/src/pages/app/mods/SideBar/index.tsx index 364c268bca..2087ec9e8a 100644 --- a/web/src/pages/app/mods/SideBar/index.tsx +++ b/web/src/pages/app/mods/SideBar/index.tsx @@ -4,7 +4,6 @@ import { AiFillDatabase, AiOutlineFunction } from "react-icons/ai"; import { GrCatalogOption, GrSettingsOption, GrStorage } from "react-icons/gr"; -import { RiCodeBoxFill } from "react-icons/ri"; import { useNavigate, useParams } from "react-router-dom"; import { Center } from "@chakra-ui/react"; import clsx from "clsx"; @@ -29,7 +28,7 @@ export default function SideBar() { const ICONS = [ { pageId: "nav", - component: , + component: logo, }, { pageId: Pages.function, @@ -89,7 +88,13 @@ export default function SideBar() { // }, { pageId: Pages.userSetting, - component: , + component: ( + + ), }, { pageId: Pages.setting, @@ -127,11 +132,12 @@ export default function SideBar() { style={{ height: 48, }} + className="cursor-pointer" onClick={() => { navigate("/"); }} > - + {item.component} ); } diff --git a/web/src/pages/app/storages/mods/CreateFolderModal/index.tsx b/web/src/pages/app/storages/mods/CreateFolderModal/index.tsx index 2f442b4b4f..b1e986648a 100644 --- a/web/src/pages/app/storages/mods/CreateFolderModal/index.tsx +++ b/web/src/pages/app/storages/mods/CreateFolderModal/index.tsx @@ -68,7 +68,6 @@ function CreateModal({ onCreateSuccess }: { onCreateSuccess: () => void }) {