diff --git a/frontend/src/components/Sparkline.vue b/frontend/src/components/Sparkline.vue new file mode 100644 index 00000000..07d84127 --- /dev/null +++ b/frontend/src/components/Sparkline.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/frontend/src/pages/index/CpuHistoryModal.vue b/frontend/src/pages/index/CpuHistoryModal.vue new file mode 100644 index 00000000..bc20a818 --- /dev/null +++ b/frontend/src/pages/index/CpuHistoryModal.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/frontend/src/pages/index/IndexPage.vue b/frontend/src/pages/index/IndexPage.vue index 8eca5521..42805641 100644 --- a/frontend/src/pages/index/IndexPage.vue +++ b/frontend/src/pages/index/IndexPage.vue @@ -13,6 +13,9 @@ import XrayStatusCard from './XrayStatusCard.vue'; import PanelUpdateModal from './PanelUpdateModal.vue'; import LogModal from './LogModal.vue'; import BackupModal from './BackupModal.vue'; +import CpuHistoryModal from './CpuHistoryModal.vue'; +import XrayLogModal from './XrayLogModal.vue'; +import VersionModal from './VersionModal.vue'; // Drive AD-Vue 4's built-in dark algorithm from our reactive theme. const antdThemeConfig = computed(() => ({ @@ -45,6 +48,9 @@ const requestUri = window.location.pathname; const logsOpen = ref(false); const backupOpen = ref(false); const panelUpdateOpen = ref(false); +const cpuHistoryOpen = ref(false); +const xrayLogsOpen = ref(false); +const versionOpen = ref(false); // Page-level loading overlay; modals can request it via @busy. const loading = ref(false); @@ -64,11 +70,9 @@ async function restartXray() { await refresh(); } -// Modal-button stubs that aren't ported yet — keep wired so buttons -// don't appear broken; full implementations come in 5c-iv-b / -v. -function openCpuHistory() { /* CPU history sparkline — 5c-iv-b */ } -function openXrayLogs() { /* xray-logs viewer — 5c-iv-b */ } -function openVersionSwitch() { /* xray version picker — 5c-iv-b */ } +function openCpuHistory() { cpuHistoryOpen.value = true; } +function openXrayLogs() { xrayLogsOpen.value = true; } +function openVersionSwitch() { versionOpen.value = true; } diff --git a/frontend/src/pages/index/VersionModal.vue b/frontend/src/pages/index/VersionModal.vue new file mode 100644 index 00000000..30d044ae --- /dev/null +++ b/frontend/src/pages/index/VersionModal.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/frontend/src/pages/index/XrayLogModal.vue b/frontend/src/pages/index/XrayLogModal.vue new file mode 100644 index 00000000..f03251e4 --- /dev/null +++ b/frontend/src/pages/index/XrayLogModal.vue @@ -0,0 +1,174 @@ + + + + + + +