From e24e70dde2e29a03c675f8867ed01674fb56ede9 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 8 May 2026 12:26:51 +0200 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20Phase=205c-i=20=E2=80=94=20in?= =?UTF-8?q?dex.html=20dashboard=20shell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the smoke-test App.vue with a real IndexPage shell so the /index.html route now boots the actual dashboard layout in Vue 3: - a-config-provider drives AD-Vue 4's dark algorithm from useTheme (same pattern as LoginPage) - AppSidebar (Phase 5b component) is wired in with basePath + requestUri props - a-spin loading state with placeholder card while we build out the rest of the page - Page palette mirrors the legacy: light #f0f2f5, dark #0a1222 (--dark-color-background), ultra-dark #21242a The 1,805-line legacy index.html is too big for one commit. Split into five sub-phases on the todo list: ii) status cards + /server/status polling, iii) xray status card, iv) logs/backup/panel-update modals, v) custom-geo section. frontend/src/App.vue and frontend/src/main.js (smoke-test scaffold) are removed — both purposes now served by IndexPage and index.js. Co-Authored-By: Claude Opus 4.7 --- frontend/index.html | 3 +- frontend/src/App.vue | 70 ------------------- frontend/src/index.js | 18 +++++ frontend/src/main.js | 9 --- frontend/src/pages/index/IndexPage.vue | 95 ++++++++++++++++++++++++++ 5 files changed, 115 insertions(+), 80 deletions(-) delete mode 100644 frontend/src/App.vue create mode 100644 frontend/src/index.js delete mode 100644 frontend/src/main.js create mode 100644 frontend/src/pages/index/IndexPage.vue diff --git a/frontend/index.html b/frontend/index.html index 68effba1..2d5853bb 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -6,7 +6,8 @@ 3x-ui +
- + diff --git a/frontend/src/App.vue b/frontend/src/App.vue deleted file mode 100644 index 7d062cc9..00000000 --- a/frontend/src/App.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - diff --git a/frontend/src/index.js b/frontend/src/index.js new file mode 100644 index 00000000..e62747ab --- /dev/null +++ b/frontend/src/index.js @@ -0,0 +1,18 @@ +import { createApp } from 'vue'; +import Antd, { message } from 'ant-design-vue'; +import 'ant-design-vue/dist/reset.css'; + +import { setupAxios } from '@/api/axios-init.js'; +// Importing useTheme triggers the boot side-effect that applies the +// stored theme to / before Vue mounts. +import '@/composables/useTheme.js'; +import IndexPage from '@/pages/index/IndexPage.vue'; + +setupAxios(); + +const messageContainer = document.getElementById('message'); +if (messageContainer) { + message.config({ getContainer: () => messageContainer }); +} + +createApp(IndexPage).use(Antd).mount('#app'); diff --git a/frontend/src/main.js b/frontend/src/main.js deleted file mode 100644 index f4920af9..00000000 --- a/frontend/src/main.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createApp } from 'vue'; -import Antd from 'ant-design-vue'; -import 'ant-design-vue/dist/reset.css'; - -import App from './App.vue'; - -const app = createApp(App); -app.use(Antd); -app.mount('#app'); diff --git a/frontend/src/pages/index/IndexPage.vue b/frontend/src/pages/index/IndexPage.vue new file mode 100644 index 00000000..bbbb0e06 --- /dev/null +++ b/frontend/src/pages/index/IndexPage.vue @@ -0,0 +1,95 @@ + + + + +