From e403d5d038cf3067dc8d187689e2bc757e756c49 Mon Sep 17 00:00:00 2001 From: allence Date: Fri, 31 Mar 2023 11:18:52 +0800 Subject: [PATCH] refactor(web): sort tailwind css classname --- web/package-lock.json | 112 ++++++++++++++++-- web/package.json | 4 +- web/prettier.config.cjs | 1 + web/src/components/ChargeButton/index.tsx | 10 +- web/src/components/Content/index.tsx | 2 +- web/src/components/DotBadge/index.tsx | 2 +- web/src/components/EditableTable/index.tsx | 2 +- web/src/components/Editor/JSONViewer.tsx | 19 ++- web/src/components/FileTypeIcon/index.tsx | 2 +- web/src/components/Grid/index.tsx | 4 +- web/src/components/IconText/index.tsx | 2 +- web/src/components/IconWrap/index.tsx | 2 +- web/src/components/InputTag/index.tsx | 2 +- web/src/components/Panel/index.tsx | 2 +- web/src/components/Resize/index.tsx | 12 +- web/src/layouts/Auth/index.tsx | 4 +- web/src/layouts/Basic.tsx | 2 +- web/src/layouts/Function.tsx | 2 +- web/src/layouts/Header/index.tsx | 4 +- web/src/pages/403.tsx | 6 +- web/src/pages/404.tsx | 6 +- .../pages/app/database/BottomPanel/index.tsx | 2 +- .../app/database/CollectionDataList/index.tsx | 2 +- .../mods/ColPanel/index.tsx | 6 +- .../mods/DataPanel/index.tsx | 12 +- .../mods/IndexPanel/index.tsx | 4 +- .../database/CollectionListPanel/index.tsx | 12 +- .../app/database/PolicyDataList/index.tsx | 22 ++-- .../app/database/PolicyListPanel/index.tsx | 4 +- .../database/RightComponent/DeleteButton.tsx | 2 +- .../app/database/RightComponent/EditBox.tsx | 6 +- .../app/database/RightComponent/List.tsx | 6 +- web/src/pages/app/database/index.tsx | 2 +- .../mods/DeleteCollectionModal/index.tsx | 2 +- .../app/functions/mods/BottomPanel/index.tsx | 2 +- .../app/functions/mods/ConsolePanel/index.tsx | 4 +- .../mods/DebugPanel/BodyParamsTab/index.tsx | 4 +- .../mods/DebugPanel/HeaderParamsTab/index.tsx | 2 +- .../mods/DebugPanel/QueryParamsTab/index.tsx | 2 +- .../app/functions/mods/DebugPanel/index.tsx | 6 +- .../AddDependenceModal/index.tsx | 4 +- .../functions/mods/DependencePanel/index.tsx | 14 +-- .../EditorPanel/FunctionDetailPopOver.tsx | 4 +- .../app/functions/mods/EditorPanel/index.tsx | 12 +- .../FunctionPanel/CreateModal/PromptModal.tsx | 2 +- .../functions/mods/FunctionPanel/index.tsx | 10 +- .../TriggerModal/AddTriggerModal/index.tsx | 2 +- .../app/functions/mods/TriggerModal/index.tsx | 8 +- web/src/pages/app/logs/index.tsx | 18 +-- .../pages/app/setting/AppEnvList/index.tsx | 4 +- .../setting/AppInfoList/InfoDetail/index.tsx | 6 +- .../pages/app/setting/AppInfoList/index.tsx | 6 +- web/src/pages/app/setting/PATList/index.tsx | 2 +- .../app/setting/UserInfo/AuthDetail/index.tsx | 12 +- web/src/pages/app/setting/UserInfo/index.tsx | 12 +- web/src/pages/app/setting/index.tsx | 2 +- web/src/pages/app/storages/index.tsx | 4 +- .../mods/CreateWebsiteModal/index.tsx | 6 +- .../storages/mods/DeleteBucketModal/index.tsx | 4 +- .../app/storages/mods/FileList/index.tsx | 10 +- .../storages/mods/StorageListPanel/index.tsx | 6 +- .../app/storages/mods/UploadButton/index.tsx | 2 +- web/src/pages/auth/reset-password/index.tsx | 10 +- web/src/pages/auth/signin/index.tsx | 6 +- .../mods/LoginByPasswordPanel/index.tsx | 4 +- .../signin/mods/LoginByPhonePanel/index.tsx | 4 +- web/src/pages/auth/signup/index.tsx | 16 +-- web/src/pages/home/index.tsx | 2 +- .../mods/CreateAppModal/BundleItem/index.tsx | 8 +- .../mods/CreateAppModal/RuntimeItem/index.tsx | 2 +- .../pages/home/mods/CreateAppModal/index.tsx | 8 +- web/src/pages/home/mods/Empty/index.tsx | 8 +- web/src/pages/home/mods/List/index.tsx | 22 ++-- 73 files changed, 326 insertions(+), 218 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index ba5593f0ee..5aeca8593b 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -52,9 +52,11 @@ "eslint-config-react-app": "^7.0.1", "eslint-plugin-simple-import-sort": "^10.0.0", "husky": "^8.0.3", + "install": "^0.13.0", "lint-staged": "^13.2.0", "postcss": "^8.4.21", - "prettier": "^2.8.6", + "prettier": "^2.8.7", + "prettier-plugin-tailwindcss": "^0.2.6", "tailwindcss": "^3.2.7", "typescript": "4.9.5", "vite": "^4.2.1" @@ -6913,6 +6915,15 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/install": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -8329,9 +8340,9 @@ } }, "node_modules/prettier": { - "version": "2.8.6", - "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.6.tgz", - "integrity": "sha512-mtuzdiBbHwPEgl7NxWlqOkithPyp4VN93V7VeHVWBF+ad3I5avc0RVDT4oImXQy9H/AqxA2NSQH8pSxHW6FYbQ==", + "version": "2.8.7", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -8340,6 +8351,80 @@ "node": ">=10.13.0" } }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.2.6.tgz", + "integrity": "sha512-F+7XCl9RLF/LPrGdUMHWpsT6TM31JraonAUyE6eBmpqymFvDwyl0ETHsKFHP1NG+sEfv8bmKqnTxEbWQbHPlBA==", + "dev": true, + "engines": { + "node": ">=12.17.0" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-php": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@shufo/prettier-plugin-blade": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "prettier": ">=2.2.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*", + "prettier-plugin-twig-melody": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-php": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@shufo/prettier-plugin-blade": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + }, + "prettier-plugin-twig-melody": { + "optional": true + } + } + }, "node_modules/prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", @@ -14754,6 +14839,12 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "install": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/install/-/install-0.13.0.tgz", + "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==", + "dev": true + }, "internal-slot": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", @@ -15776,11 +15867,18 @@ "dev": true }, "prettier": { - "version": "2.8.6", - "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.6.tgz", - "integrity": "sha512-mtuzdiBbHwPEgl7NxWlqOkithPyp4VN93V7VeHVWBF+ad3I5avc0RVDT4oImXQy9H/AqxA2NSQH8pSxHW6FYbQ==", + "version": "2.8.7", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", "dev": true }, + "prettier-plugin-tailwindcss": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.2.6.tgz", + "integrity": "sha512-F+7XCl9RLF/LPrGdUMHWpsT6TM31JraonAUyE6eBmpqymFvDwyl0ETHsKFHP1NG+sEfv8bmKqnTxEbWQbHPlBA==", + "dev": true, + "requires": {} + }, "prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", diff --git a/web/package.json b/web/package.json index f0fee58c1d..4c67d38e54 100644 --- a/web/package.json +++ b/web/package.json @@ -57,9 +57,11 @@ "eslint-config-react-app": "^7.0.1", "eslint-plugin-simple-import-sort": "^10.0.0", "husky": "^8.0.3", + "install": "^0.13.0", "lint-staged": "^13.2.0", "postcss": "^8.4.21", - "prettier": "^2.8.6", + "prettier": "^2.8.7", + "prettier-plugin-tailwindcss": "^0.2.6", "tailwindcss": "^3.2.7", "typescript": "4.9.5", "vite": "^4.2.1" diff --git a/web/prettier.config.cjs b/web/prettier.config.cjs index 1e262534c1..b2048cc562 100644 --- a/web/prettier.config.cjs +++ b/web/prettier.config.cjs @@ -3,4 +3,5 @@ module.exports = { tabWidth: 2, trailingComma: "all", semi: true, + plugins: [require("prettier-plugin-tailwindcss")], }; diff --git a/web/src/components/ChargeButton/index.tsx b/web/src/components/ChargeButton/index.tsx index e5a52a5d99..483a9fc49c 100644 --- a/web/src/components/ChargeButton/index.tsx +++ b/web/src/components/ChargeButton/index.tsx @@ -75,10 +75,10 @@ export default function ChargeButton(props: { amount?: number; children: React.R

{t("Balance")}

-

+

{formatPrice(accountQuery.data?.balance)}

-

{t("Recharge amount")}

+

{t("Recharge amount")}

{createChargeOrder.data?.data?.result?.code_url && ( -
+

{t("Scan with WeChat")}

-

+

{t("Order Number")}:{createChargeOrder.data?.data?.order?.id}

-

+

{t("payment status")}: {phaseStatus}

diff --git a/web/src/components/Content/index.tsx b/web/src/components/Content/index.tsx index 97e21757e8..32c86e01a7 100644 --- a/web/src/components/Content/index.tsx +++ b/web/src/components/Content/index.tsx @@ -1,5 +1,5 @@ import React from "react"; export default function Content(props: { children: React.ReactNode }) { - return
{props.children}
; + return
{props.children}
; } diff --git a/web/src/components/DotBadge/index.tsx b/web/src/components/DotBadge/index.tsx index 5488214cba..dc2e3d91e9 100644 --- a/web/src/components/DotBadge/index.tsx +++ b/web/src/components/DotBadge/index.tsx @@ -31,7 +31,7 @@ export default function DotBadge({ } return ( - + {text} ); diff --git a/web/src/components/EditableTable/index.tsx b/web/src/components/EditableTable/index.tsx index d2f4b3a5cb..79034eb951 100644 --- a/web/src/components/EditableTable/index.tsx +++ b/web/src/components/EditableTable/index.tsx @@ -80,7 +80,7 @@ const EditableTable = function (props: { return ( <>
diff --git a/web/src/components/Editor/JSONViewer.tsx b/web/src/components/Editor/JSONViewer.tsx index 474183c904..fb251df041 100644 --- a/web/src/components/Editor/JSONViewer.tsx +++ b/web/src/components/Editor/JSONViewer.tsx @@ -243,12 +243,19 @@ export default function JSONViewer(props: JSONViewerProps) { }; return ( - - {code} - + + {code} + +
); } diff --git a/web/src/components/FileTypeIcon/index.tsx b/web/src/components/FileTypeIcon/index.tsx index 45d93915ba..c92c1b2dc7 100644 --- a/web/src/components/FileTypeIcon/index.tsx +++ b/web/src/components/FileTypeIcon/index.tsx @@ -38,7 +38,7 @@ export default function FileTypeIcon(props: { type: string; className?: string } switch (type) { case FileType.app: return ( - +
diff --git a/web/src/components/Panel/index.tsx b/web/src/components/Panel/index.tsx index 4b221e1c6b..2a89fe8d62 100644 --- a/web/src/components/Panel/index.tsx +++ b/web/src/components/Panel/index.tsx @@ -17,7 +17,7 @@ const Panel = (props: { style={style} bg={bg} onClick={onClick} - className={clsx("rounded px-4 flex flex-col w-full", className)} + className={clsx("flex w-full flex-col rounded px-4", className)} > {props.children} diff --git a/web/src/components/Resize/index.tsx b/web/src/components/Resize/index.tsx index 0e4d05db5f..77e42e4f9c 100644 --- a/web/src/components/Resize/index.tsx +++ b/web/src/components/Resize/index.tsx @@ -41,16 +41,16 @@ export default function Resize(props: { {display === "none" ? null : (
-
+
{type === "x" && width <= 20 ? (
{reverse ? : } @@ -61,15 +61,15 @@ export default function Resize(props: { className={clsx( type === "x" && isDragging ? "h-full " : "h-0", type === "y" && isDragging ? "w-full " : "w-0", - isDragging ? " border-primary-400 border" : "", - "transition-all absolute z-10 overflow-hidden", + isDragging ? " border border-primary-400" : "", + "absolute z-10 overflow-hidden transition-all", )} >
diff --git a/web/src/layouts/Auth/index.tsx b/web/src/layouts/Auth/index.tsx index db4b31714b..4caa72c90c 100644 --- a/web/src/layouts/Auth/index.tsx +++ b/web/src/layouts/Auth/index.tsx @@ -6,8 +6,8 @@ export default function LoginReg() { return (
-
Welcome to laf !
-
life is short, you need laf.
+
Welcome to laf !
+
life is short, you need laf.
diff --git a/web/src/layouts/Basic.tsx b/web/src/layouts/Basic.tsx index abf37f5b9a..110418fa4f 100644 --- a/web/src/layouts/Basic.tsx +++ b/web/src/layouts/Basic.tsx @@ -24,7 +24,7 @@ export default function BasicLayout() { )}
-
+
Made with ️ by laf team
diff --git a/web/src/layouts/Function.tsx b/web/src/layouts/Function.tsx index fffd9bceec..8456e74baa 100644 --- a/web/src/layouts/Function.tsx +++ b/web/src/layouts/Function.tsx @@ -67,7 +67,7 @@ export default function FunctionLayout() { currentApp?.phase !== APP_PHASE_STATUS.Deleted ? (
diff --git a/web/src/layouts/Header/index.tsx b/web/src/layouts/Header/index.tsx index d81c32d54a..07e7fb592d 100644 --- a/web/src/layouts/Header/index.tsx +++ b/web/src/layouts/Header/index.tsx @@ -16,7 +16,7 @@ export default function Header(props: { size: "sm" | "lg" }) { const { colorMode } = useColorMode(); return ( -
+
diff --git a/web/src/pages/403.tsx b/web/src/pages/403.tsx index 3a4baf1e4b..79a01a8f41 100644 --- a/web/src/pages/403.tsx +++ b/web/src/pages/403.tsx @@ -6,10 +6,10 @@ import { t } from "i18next"; export default function Index() { const navigate = useNavigate(); return ( -
-
+
+

403

-

+

{t(`403Message`)}

diff --git a/web/src/pages/404.tsx b/web/src/pages/404.tsx index 3ca1725260..3a4e834465 100644 --- a/web/src/pages/404.tsx +++ b/web/src/pages/404.tsx @@ -6,10 +6,10 @@ import { t } from "i18next"; export default function Index() { const navigate = useNavigate(); return ( -
-
+
+

404

-

+

{t(`404Message`)}

diff --git a/web/src/pages/app/database/BottomPanel/index.tsx b/web/src/pages/app/database/BottomPanel/index.tsx index 36c568b06a..d10b6d6bee 100644 --- a/web/src/pages/app/database/BottomPanel/index.tsx +++ b/web/src/pages/app/database/BottomPanel/index.tsx @@ -9,7 +9,7 @@ function BottomPanel() { const store = useCustomSettingStore(); return ( - +
-
+
diff --git a/web/src/pages/app/database/CollectionDataList/mods/DataPanel/index.tsx b/web/src/pages/app/database/CollectionDataList/mods/DataPanel/index.tsx index 3fb5242479..aae00fa8d9 100644 --- a/web/src/pages/app/database/CollectionDataList/mods/DataPanel/index.tsx +++ b/web/src/pages/app/database/CollectionDataList/mods/DataPanel/index.tsx @@ -143,7 +143,7 @@ export default function DataPanel() { return ( <> - +
-
+
-
+
{entryDataQuery.status !== "loading" && entryDataQuery?.data?.list?.length! === 0 && (
{t("CollectionPanel.EmptyDataText")} - + {t("CreateNow")} @@ -263,7 +263,7 @@ export default function DataPanel() { showBg tooltip={t("Copy").toString()} size={32} - className="ml-2 hover:bg-gray-200 group/icon" + className="group/icon ml-2 hover:bg-gray-200" > -
+
-
+
-
+
diff --git a/web/src/pages/app/database/CollectionListPanel/index.tsx b/web/src/pages/app/database/CollectionListPanel/index.tsx index 03296352e9..06cc2ad176 100644 --- a/web/src/pages/app/database/CollectionListPanel/index.tsx +++ b/web/src/pages/app/database/CollectionListPanel/index.tsx @@ -35,7 +35,7 @@ export default function CollectionListPanel() { return ( { store.setCurrentShow("DB"); }} @@ -59,7 +59,7 @@ export default function CollectionListPanel() { , ]} /> -
+
-
+
{collectionListQuery.isFetching ? ( -
+
) : null} @@ -94,8 +94,8 @@ export default function CollectionListPanel() { store.setCurrentDB(db); }} > -
-
+
+
{db.name}
diff --git a/web/src/pages/app/database/PolicyDataList/index.tsx b/web/src/pages/app/database/PolicyDataList/index.tsx index fb5cc26111..9ea5d9d860 100644 --- a/web/src/pages/app/database/PolicyDataList/index.tsx +++ b/web/src/pages/app/database/PolicyDataList/index.tsx @@ -72,7 +72,7 @@ export default function PolicyDataList() {
{t("CollectionPanel.EmptyPolicyText")} - + {t("CreateNow")} @@ -84,7 +84,7 @@ export default function PolicyDataList() { return ( <> - + { setCurrentData(data); @@ -106,9 +106,9 @@ export default function PolicyDataList() { {t("CollectionPanel.RulesNum")} : {rulesListQuery?.data?.data?.length || 0} -
+
{rulesListQuery.isFetching ? ( -
+
) : rulesListQuery?.data?.data.length ? ( @@ -127,11 +127,11 @@ export default function PolicyDataList() { return ( <>
- + {t("CollectionPanel.Collection")}:{item.collectionName}
@@ -145,7 +145,7 @@ export default function PolicyDataList() { showBg tooltip={t("Copy").toString()} size={32} - className="ml-2 hover:bg-rose-100 group/icon" + className="group/icon ml-2 hover:bg-rose-100" > - + {t("CollectionPanel.SelectCollection")}: {currentData?.collectionName} - + {t("CollectionPanel.RulesContent")}
- + {t("CreateNow")} diff --git a/web/src/pages/app/database/PolicyListPanel/index.tsx b/web/src/pages/app/database/PolicyListPanel/index.tsx index 54eca9b3e1..ec43ea921f 100644 --- a/web/src/pages/app/database/PolicyListPanel/index.tsx +++ b/web/src/pages/app/database/PolicyListPanel/index.tsx @@ -55,8 +55,8 @@ export default function PolicyListPanel() { store.setCurrentPolicy(item); }} > -
-
+
+
{item.name}
diff --git a/web/src/pages/app/database/RightComponent/DeleteButton.tsx b/web/src/pages/app/database/RightComponent/DeleteButton.tsx index adb01b0555..9f6ae86668 100644 --- a/web/src/pages/app/database/RightComponent/DeleteButton.tsx +++ b/web/src/pages/app/database/RightComponent/DeleteButton.tsx @@ -23,7 +23,7 @@ export default function DeleteButton(props: { data: any; deleteMethod: any }) { placement="left" >
- + {title}
- + {store.currentShow === "DB" ? : } diff --git a/web/src/pages/app/database/mods/DeleteCollectionModal/index.tsx b/web/src/pages/app/database/mods/DeleteCollectionModal/index.tsx index 0bdd0c9bae..b6bcb619c0 100644 --- a/web/src/pages/app/database/mods/DeleteCollectionModal/index.tsx +++ b/web/src/pages/app/database/mods/DeleteCollectionModal/index.tsx @@ -66,7 +66,7 @@ function DeleteCollectionModal(props: { database: any }) {

{t("CollectionPanel.InputName")} - {database.name} + {database.name} {t("ToConfirm")}。

diff --git a/web/src/pages/app/functions/mods/BottomPanel/index.tsx b/web/src/pages/app/functions/mods/BottomPanel/index.tsx index cf4453338e..a5f8a0141c 100644 --- a/web/src/pages/app/functions/mods/BottomPanel/index.tsx +++ b/web/src/pages/app/functions/mods/BottomPanel/index.tsx @@ -9,7 +9,7 @@ function BottomPanel() { const store = useCustomSettingStore(); return ( - +
+
@@ -153,7 +153,7 @@ function BodyParamsTab(props: { onChange(values: { contentType: string; data: an <> diff --git a/web/src/pages/app/functions/mods/DebugPanel/HeaderParamsTab/index.tsx b/web/src/pages/app/functions/mods/DebugPanel/HeaderParamsTab/index.tsx index d7df03e0c9..9b3ee08e75 100644 --- a/web/src/pages/app/functions/mods/DebugPanel/HeaderParamsTab/index.tsx +++ b/web/src/pages/app/functions/mods/DebugPanel/HeaderParamsTab/index.tsx @@ -38,7 +38,7 @@ function HeaderParamsTab(props: { onChange(values: Params[]): void }) {
-
{t("FunctionPanel.Name")}
+
diff --git a/web/src/pages/app/functions/mods/DebugPanel/QueryParamsTab/index.tsx b/web/src/pages/app/functions/mods/DebugPanel/QueryParamsTab/index.tsx index 5a4b79ff9f..c6b415c27a 100644 --- a/web/src/pages/app/functions/mods/DebugPanel/QueryParamsTab/index.tsx +++ b/web/src/pages/app/functions/mods/DebugPanel/QueryParamsTab/index.tsx @@ -38,7 +38,7 @@ function HeaderParamsTab(props: { onChange(values: Params[]): void }) {
-
{t("FunctionPanel.Name")}
+
diff --git a/web/src/pages/app/functions/mods/DebugPanel/index.tsx b/web/src/pages/app/functions/mods/DebugPanel/index.tsx index 60a9b63457..9a82e3f33e 100644 --- a/web/src/pages/app/functions/mods/DebugPanel/index.tsx +++ b/web/src/pages/app/functions/mods/DebugPanel/index.tsx @@ -110,7 +110,7 @@ export default function DebugPanel(props: { containerRef: any }) { return ( <> - + @@ -128,8 +128,8 @@ export default function DebugPanel(props: { containerRef: any }) { -
-
+
+
{t("FunctionPanel.Methods")}
{t("FunctionPanel.Name")}
@@ -149,7 +149,7 @@ export default function TriggerModal(props: { children: React.ReactElement }) {
{t("TriggerPanel.EmptyTriggerTip")} - + {t("CreateNow")} diff --git a/web/src/pages/app/logs/index.tsx b/web/src/pages/app/logs/index.tsx index b9e598ffa3..4c828e8da5 100644 --- a/web/src/pages/app/logs/index.tsx +++ b/web/src/pages/app/logs/index.tsx @@ -130,38 +130,38 @@ export default function LogsPage() { /> -
+
{logListQuery.isFetching ? ( -
+
) : null} -
+
{logListQuery.data?.data?.list?.length ? ( logListQuery.data?.data?.list.map((item: TLogItem) => { return ( -
- +
+ [{formatDate(item.created_at, "YYYY-MM-DD HH:mm:ss")}] - + {item.request_id.substring(0, 8)} {item.func}
{ setDetail(item); onOpen(); }} > -
+                      
                         {item.data.substring(0, 200)}
                       
diff --git a/web/src/pages/app/setting/AppEnvList/index.tsx b/web/src/pages/app/setting/AppEnvList/index.tsx index d929cb1ca7..4c0ddea5b0 100644 --- a/web/src/pages/app/setting/AppEnvList/index.tsx +++ b/web/src/pages/app/setting/AppEnvList/index.tsx @@ -21,7 +21,7 @@ const AppEnvList = (props: { onClose?: () => {} }) => { const addEnvironmentMutation = useAddEnvironmentMutation(); return ( <> -
+
{} }) => { bodyText={String(t("SettingPanel.UpdateConfirm"))} confirmButtonText={String(t("Update"))} > - +
diff --git a/web/src/pages/app/setting/AppInfoList/InfoDetail/index.tsx b/web/src/pages/app/setting/AppInfoList/InfoDetail/index.tsx index e33f892942..a01ed1e015 100644 --- a/web/src/pages/app/setting/AppInfoList/InfoDetail/index.tsx +++ b/web/src/pages/app/setting/AppInfoList/InfoDetail/index.tsx @@ -11,10 +11,10 @@ const InfoDetail = function (props: { }) { const { title, leftData, rightData, className } = props; return ( -
+
- - + + {title} diff --git a/web/src/pages/app/setting/AppInfoList/index.tsx b/web/src/pages/app/setting/AppInfoList/index.tsx index bdbe4b975d..2c8012f8db 100644 --- a/web/src/pages/app/setting/AppInfoList/index.tsx +++ b/web/src/pages/app/setting/AppInfoList/index.tsx @@ -28,7 +28,7 @@ const AppEnvList = () => { return ( <> -
+
{ + } >
-
+
{ const dateList = formatDateOption(); return ( <> -
+
void }) { const onSubmit = async (data: any) => {}; return ( <> -

+

{ @@ -44,17 +44,17 @@ export default function AuthDetail(props: { onBack: () => void }) { {t("Back")}

-
+

{t("SettingPanel.Auth")}

- + -
+
{t("SettingPanel.Tel")}: @@ -134,7 +134,7 @@ export default function AuthDetail(props: { onBack: () => void }) { -
+
diff --git a/web/src/pages/app/setting/UserInfo/index.tsx b/web/src/pages/app/setting/UserInfo/index.tsx index fe9a8585ab..9f4d6c0f42 100644 --- a/web/src/pages/app/setting/UserInfo/index.tsx +++ b/web/src/pages/app/setting/UserInfo/index.tsx @@ -16,7 +16,7 @@ export default function UserInfo() { const darkMode = colorMode === "dark"; return ( -
+
{showAuth ? ( { @@ -25,7 +25,7 @@ export default function UserInfo() { /> ) : ( <> - +

@@ -53,13 +53,13 @@ export default function UserInfo() { {t("SettingPanel.showAuth")} */} - + - {t("SettingPanel.Tel")}: + {t("SettingPanel.Tel")}: {userInfo?.phone ? userInfo.phone : t("NoInfo")} - {t("SettingPanel.Registered")}: + {t("SettingPanel.Registered")}: {formatDate(userInfo?.createdAt)} diff --git a/web/src/pages/app/setting/index.tsx b/web/src/pages/app/setting/index.tsx index 03b0249831..b67dc0212a 100644 --- a/web/src/pages/app/setting/index.tsx +++ b/web/src/pages/app/setting/index.tsx @@ -59,7 +59,7 @@ const SettingModal = (props: { - + {tabMatch.map((tab) => { return (

{currentStorage === undefined ? ( - +
{t("StoragePanel.EmptyText")} - + {t("CreateNow")} diff --git a/web/src/pages/app/storages/mods/CreateWebsiteModal/index.tsx b/web/src/pages/app/storages/mods/CreateWebsiteModal/index.tsx index 86afcd7629..703d02c6c0 100644 --- a/web/src/pages/app/storages/mods/CreateWebsiteModal/index.tsx +++ b/web/src/pages/app/storages/mods/CreateWebsiteModal/index.tsx @@ -53,9 +53,9 @@ function CreateWebsiteModal() { {currentStorage?.websiteHosting && currentStorage.websiteHosting.state === BUCKET_STATUS.Active ? (
- {t("StoragePanel.CurrentDomain")} + {t("StoragePanel.CurrentDomain")} {currentStorage?.policy === BUCKET_POLICY_TYPE.private ? ( -

{t("StoragePanel.editHostTip")}

+

{t("StoragePanel.editHostTip")}

) : null} CNAME diff --git a/web/src/pages/app/storages/mods/DeleteBucketModal/index.tsx b/web/src/pages/app/storages/mods/DeleteBucketModal/index.tsx index 2079cc9e02..d07dad6d99 100644 --- a/web/src/pages/app/storages/mods/DeleteBucketModal/index.tsx +++ b/web/src/pages/app/storages/mods/DeleteBucketModal/index.tsx @@ -59,12 +59,12 @@ function DeleteBucketModal(props: { storage: TBucket; onSuccessAction?: () => vo

{t("StoragePanel.DeleteConfirm")} - {" " + storage.name} + {" " + storage.name} {t("DeleteTip")}。

{t("StoragePanel.StorageNameTip")} - {storage.name} + {storage.name} {t("ToConfirm")}。

diff --git a/web/src/pages/app/storages/mods/FileList/index.tsx b/web/src/pages/app/storages/mods/FileList/index.tsx index 7923c68735..1ebb329ead 100644 --- a/web/src/pages/app/storages/mods/FileList/index.tsx +++ b/web/src/pages/app/storages/mods/FileList/index.tsx @@ -109,7 +109,7 @@ export default function FileList() { */} -
+
{query.isFetching ? ( -
+
) : !query.data || @@ -131,7 +131,7 @@ export default function FileList() { query.refetch()}>
{t("StoragePanel.UploadTip")} - + {t("StoragePanel.InstantUpload")}
@@ -183,7 +183,7 @@ export default function FileList() { onClick={() => file.Prefix ? changeDirectory(file) : viewAppFile(file) } - className="font-bold cursor-pointer" + className="cursor-pointer font-bold" > {file.Prefix ? ( diff --git a/web/src/pages/app/storages/mods/StorageListPanel/index.tsx b/web/src/pages/app/storages/mods/StorageListPanel/index.tsx index edc31b29f5..4745bea9c9 100644 --- a/web/src/pages/app/storages/mods/StorageListPanel/index.tsx +++ b/web/src/pages/app/storages/mods/StorageListPanel/index.tsx @@ -65,7 +65,7 @@ export default function StorageListPanel() { , ]} /> -
+
setSearch(e.target.value)} /> -
+
{bucketListQuery.isFetching ? ( -
+
) : null} diff --git a/web/src/pages/app/storages/mods/UploadButton/index.tsx b/web/src/pages/app/storages/mods/UploadButton/index.tsx index 1c048f4bd7..26dcbc5f2c 100644 --- a/web/src/pages/app/storages/mods/UploadButton/index.tsx +++ b/web/src/pages/app/storages/mods/UploadButton/index.tsx @@ -75,7 +75,7 @@ function UploadButton(props: { onUploadSuccess: Function; children: React.ReactE return (
{item.fileName} {item.status ? : ""} diff --git a/web/src/pages/auth/reset-password/index.tsx b/web/src/pages/auth/reset-password/index.tsx index 36ee923069..c6484ac04d 100644 --- a/web/src/pages/auth/reset-password/index.tsx +++ b/web/src/pages/auth/reset-password/index.tsx @@ -109,12 +109,12 @@ export default function ResetPassword() { }; return ( -
+
logo
- + {t("AuthPanel.Phone")} @@ -142,7 +142,7 @@ export default function ResetPassword() { - + {t("AuthPanel.ValidationCode")} @@ -159,7 +159,7 @@ export default function ResetPassword() { placeholder={t("AuthPanel.ValidationCodePlaceholder") || ""} /> - + {t("AuthPanel.NewPassword")} @@ -181,7 +181,7 @@ export default function ResetPassword() { - + {t("AuthPanel.ConfirmPassword")} diff --git a/web/src/pages/auth/signin/index.tsx b/web/src/pages/auth/signin/index.tsx index 1a3a742066..5037ece76c 100644 --- a/web/src/pages/auth/signin/index.tsx +++ b/web/src/pages/auth/signin/index.tsx @@ -40,7 +40,7 @@ export default function SignIn() { }, [providers]); return ( -
+
logo
@@ -61,8 +61,8 @@ export default function SignIn() { {(githubProvider || wechatProvider) && (
-
- or +
+ or
{githubProvider && (