From bcbb9bb16ab78e31eb65927970b61fe9e129d60f Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Tue, 20 May 2025 01:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feat:=20Add=20the=20`/console/*`=20rou?= =?UTF-8?q?te?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/App.js | 32 ++++++++++++++++---------------- web/src/components/HeaderBar.js | 10 +++++----- web/src/components/SiderBar.js | 24 ++++++++++++------------ 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/web/src/App.js b/web/src/App.js index ed53f6a0..bf5b69c4 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -55,7 +55,7 @@ function App() { } /> @@ -63,7 +63,7 @@ function App() { } /> } key={location.pathname}> @@ -71,7 +71,7 @@ function App() { } /> } key={location.pathname}> @@ -79,7 +79,7 @@ function App() { } /> @@ -87,7 +87,7 @@ function App() { } /> @@ -95,7 +95,7 @@ function App() { } /> @@ -103,7 +103,7 @@ function App() { } /> @@ -111,7 +111,7 @@ function App() { } /> } key={location.pathname}> @@ -119,7 +119,7 @@ function App() { } /> } key={location.pathname}> @@ -183,7 +183,7 @@ function App() { } /> } key={location.pathname}> @@ -193,7 +193,7 @@ function App() { } /> } key={location.pathname}> @@ -203,7 +203,7 @@ function App() { } /> } key={location.pathname}> @@ -213,7 +213,7 @@ function App() { } /> @@ -221,7 +221,7 @@ function App() { } /> } key={location.pathname}> @@ -231,7 +231,7 @@ function App() { } /> } key={location.pathname}> @@ -241,7 +241,7 @@ function App() { } /> } key={location.pathname}> diff --git a/web/src/components/HeaderBar.js b/web/src/components/HeaderBar.js index 6726820f..5bc84813 100644 --- a/web/src/components/HeaderBar.js +++ b/web/src/components/HeaderBar.js @@ -61,8 +61,8 @@ const HeaderBar = () => { }, { text: t('控制台'), - itemKey: 'detail', - to: '/detail', + itemKey: 'console', + to: '/console', }, { text: t('定价'), @@ -216,7 +216,7 @@ const HeaderBar = () => { { - navigate('/personal'); + navigate('/console/personal'); setMobileMenuOpen(false); }} className="!px-3 !py-1.5 !text-sm !text-semi-color-text-0 hover:!bg-semi-color-fill-1 dark:!text-gray-200 dark:hover:!bg-blue-500 dark:hover:!text-white" @@ -228,7 +228,7 @@ const HeaderBar = () => { { - navigate('/token'); + navigate('/console/token'); setMobileMenuOpen(false); }} className="!px-3 !py-1.5 !text-sm !text-semi-color-text-0 hover:!bg-semi-color-fill-1 dark:!text-gray-200 dark:hover:!bg-blue-500 dark:hover:!text-white" @@ -240,7 +240,7 @@ const HeaderBar = () => { { - navigate('/topup'); + navigate('/console/topup'); setMobileMenuOpen(false); }} className="!px-3 !py-1.5 !text-sm !text-semi-color-text-0 hover:!bg-semi-color-fill-1 dark:!text-gray-200 dark:hover:!bg-blue-500 dark:hover:!text-white" diff --git a/web/src/components/SiderBar.js b/web/src/components/SiderBar.js index 65a2412f..0c6e9817 100644 --- a/web/src/components/SiderBar.js +++ b/web/src/components/SiderBar.js @@ -77,20 +77,20 @@ const iconStyle = (itemKey, selectedKeys) => { // Define routerMap as a constant outside the component const routerMap = { home: '/', - channel: '/channel', - token: '/token', - redemption: '/redemption', - topup: '/topup', - user: '/user', - log: '/log', - midjourney: '/midjourney', - setting: '/setting', + channel: '/console/channel', + token: '/console/token', + redemption: '/console/redemption', + topup: '/console/topup', + user: '/console/user', + log: '/console/log', + midjourney: '/console/midjourney', + setting: '/console/setting', about: '/about', - detail: '/detail', + detail: '/console', pricing: '/pricing', - task: '/task', - playground: '/playground', - personal: '/personal', + task: '/console/task', + playground: '/console/playground', + personal: '/console/personal', }; const SiderBar = () => {