Skip to content

Commit d392433

Browse files
committed
优化主题
1 parent a59f811 commit d392433

3 files changed

Lines changed: 127 additions & 12 deletions

File tree

src/components/vps/VpsLatencyChart.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const isLastSeenOffline = computed(() => {
228228
</script>
229229

230230
<template>
231-
<div class="relative w-full bg-white/40 dark:bg-slate-900/40 rounded-2xl border border-slate-200/60 dark:border-slate-800/60 p-4 transition-all overflow-hidden group">
231+
<div class="relative w-full bg-white/40 dark:bg-slate-900/40 rounded-2xl border border-slate-200/60 dark:border-slate-800/60 p-4 transition-all overflow-hidden group vps-latency-shell">
232232
<div class="flex flex-col md:flex-row md:items-center justify-between gap-4 mb-4">
233233
<div class="flex flex-col gap-2">
234234
<div class="flex items-center gap-2">
@@ -306,7 +306,7 @@ const isLastSeenOffline = computed(() => {
306306
<line v-if="hoverX"
307307
:x1="hoverX" :y1="chartPadding.top"
308308
:x2="hoverX" :y2="svgHeight - chartPadding.bottom"
309-
stroke="currentColor" class="text-blue-500/50" stroke-width="1.5" stroke-dasharray="4,2" />
309+
stroke="currentColor" class="text-blue-500/50 latency-guideline" stroke-width="1.5" stroke-dasharray="4,2" />
310310

311311
<!-- Hover Points -->
312312
<circle v-for="ap in activePoints" :key="ap.name"

src/components/vps/VpsMetricChart.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const gradientId = computed(() => {
9696
</script>
9797

9898
<template>
99-
<div class="rounded-2xl border border-white/40 dark:border-white/10 bg-white/70 dark:bg-gray-900/60 p-4 shadow-sm">
99+
<div class="rounded-2xl border border-white/40 dark:border-white/10 bg-white/70 dark:bg-gray-900/60 p-4 shadow-sm vps-metric-chart-shell">
100100
<div class="flex items-center justify-between">
101101
<div>
102102
<p class="text-xs text-gray-500 dark:text-gray-400">{{ title }}</p>
@@ -120,7 +120,7 @@ const gradientId = computed(() => {
120120
</defs>
121121
<rect x="0" y="0" width="200" height="90" fill="transparent" />
122122
<path v-if="hasData" :d="areaPath" :fill="`url(#${gradientId})`" />
123-
<polyline v-if="hasData" :points="polylinePoints" fill="none" :stroke="color" stroke-width="2" />
123+
<polyline v-if="hasData" :points="polylinePoints" fill="none" :stroke="color" stroke-width="2" class="vps-metric-chart-line" />
124124
<text v-if="!hasData" x="100" y="45" text-anchor="middle" class="fill-gray-400 text-[10px]">暂无数据</text>
125125
</svg>
126126
</div>

src/views/PublicVpsMonitorView.vue

Lines changed: 123 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ const showStats = computed(() => themeConfig.value.showStats !== false && layout
5252
const showAnomalies = computed(() => themeConfig.value.showAnomalies !== false && layoutClass.value !== 'minimal');
5353
const showFeatured = computed(() => themeConfig.value.showFeatured !== false && layoutClass.value !== 'minimal');
5454
const showDetailTable = computed(() => themeConfig.value.showDetailTable !== false);
55-
const showFooter = computed(() => themeConfig.value.footerText !== '' && publicLayout.value.footerEnabled !== false);
55+
// Show the in-page footer copy only when the MiSub global footer is disabled.
56+
// If the global footer is enabled, keep the page cleaner and rely on the global footer.
57+
const showFooter = computed(() => themeConfig.value.footerText !== '' && publicLayout.value.footerEnabled === false);
5658
const orderedSections = computed(() => {
5759
const raw = Array.isArray(themeConfig.value.sectionOrder) ? themeConfig.value.sectionOrder : ['anomalies', 'nodes', 'featured', 'details'];
5860
const valid = ['anomalies', 'nodes', 'featured', 'details'];
@@ -1139,7 +1141,7 @@ onUnmounted(() => {
11391141

11401142
<div v-if="anomalyExpanded" class="grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3">
11411143
<article v-for="node in anomalyNodes" :key="node.id" class="rounded-[18px] border border-rose-200/50 bg-white/85 p-3 dark:border-rose-900/28 dark:bg-slate-900/55 anomaly-card">
1142-
<div class="relative mb-2 h-1 w-full rounded-full bg-rose-100 dark:bg-slate-800 anomaly-status">
1144+
<div class="relative mb-2 h-1 w-full rounded-full bg-transparent anomaly-status">
11431145
<div class="h-1 rounded-full bg-rose-500" :style="{ width: node.status === 'offline' ? '88%' : '72%' }"></div>
11441146
</div>
11451147
<div class="flex items-start justify-between gap-3">
@@ -1171,7 +1173,7 @@ onUnmounted(() => {
11711173
<div class="space-y-6 vps-section" :style="sectionOrderStyle('nodes')">
11721174
<div class="flex flex-wrap items-center justify-between gap-3">
11731175
<h2 class="text-2xl font-bold text-[#1f1b17] dark:text-slate-100 flex items-center gap-3">
1174-
<span class="text-blue-500">✦</span> 全部节点
1176+
<span class="text-blue-500 node-section-accent">✦</span> 全部节点
11751177
</h2>
11761178
<div class="flex items-center gap-2">
11771179
<span class="text-xs text-[#8a7f70] dark:text-slate-400">在线与离线节点统一展示</span>
@@ -1280,7 +1282,7 @@ onUnmounted(() => {
12801282
<div class="vps-card-back rounded-[18px] border p-4 flex flex-col h-full vps-node-back" :class="nodeCardClass">
12811283
<div class="mb-2 flex items-center justify-between border-b border-[#efe6db] pb-1.5 dark:border-slate-800">
12821284
<h4 class="flex items-center gap-1 text-[11px] font-semibold text-[#1f1b17] dark:text-slate-100">
1283-
<span class="text-blue-500 text-[10px]">🌐</span> 网络状态
1285+
<span class="text-blue-500 text-[10px] node-section-accent">🌐</span> 网络状态
12841286
</h4>
12851287
<span class="text-[9px] text-[#8a7f70] dark:text-slate-400 opacity-70">点击返回</span>
12861288
</div>
@@ -1838,7 +1840,7 @@ onUnmounted(() => {
18381840
}
18391841

18401842
.vps-theme-fresh .node-status-bar {
1841-
background-image: linear-gradient(90deg, #22d3ee, #38bdf8, #818cf8) !important;
1843+
background-image: linear-gradient(90deg, #10b981, #38bdf8, #f59e0b) !important;
18421844
}
18431845

18441846
.vps-theme-fresh .vps-metric-chart {
@@ -2047,7 +2049,7 @@ onUnmounted(() => {
20472049
}
20482050

20492051
.vps-theme-minimal .node-status-bar {
2050-
background-image: linear-gradient(90deg, #94a3b8, #cbd5f5, #e2e8f0) !important;
2052+
background-image: linear-gradient(90deg, #10b981, #38bdf8, #f59e0b) !important;
20512053
}
20522054

20532055
.vps-theme-minimal .vps-metric-chart {
@@ -2404,7 +2406,7 @@ onUnmounted(() => {
24042406
}
24052407

24062408
.vps-theme-tech .node-status-bar {
2407-
background-image: linear-gradient(90deg, #22d3ee, #38bdf8, #0ea5e9) !important;
2409+
background-image: linear-gradient(90deg, #10b981, #38bdf8, #f59e0b) !important;
24082410
}
24092411

24102412
.vps-theme-tech .vps-metric-chart {
@@ -2764,7 +2766,7 @@ onUnmounted(() => {
27642766
}
27652767

27662768
.vps-theme-glass .node-status-bar {
2767-
background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(191, 219, 254, 0.8), rgba(165, 180, 252, 0.8)) !important;
2769+
background-image: linear-gradient(90deg, #10b981, #38bdf8, #f59e0b) !important;
27682770
}
27692771

27702772
.vps-theme-glass .vps-metric-chart {
@@ -2875,3 +2877,116 @@ onUnmounted(() => {
28752877
background: rgba(15, 23, 42, 0.6) !important;
28762878
}
28772879
</style>
2880+
.vps-theme-fresh .vps-metric-chart-shell {
2881+
border-color: rgba(186, 230, 253, 0.6) !important;
2882+
background: rgba(239, 246, 255, 0.92) !important;
2883+
}
2884+
2885+
.vps-theme-fresh .node-section-accent {
2886+
color: #0ea5e9 !important;
2887+
}
2888+
2889+
.vps-theme-fresh .vps-latency-shell {
2890+
border-color: rgba(186, 230, 253, 0.6) !important;
2891+
background: rgba(239, 246, 255, 0.6) !important;
2892+
}
2893+
2894+
.dark .vps-theme-fresh .vps-latency-shell {
2895+
border-color: rgba(56, 189, 248, 0.28) !important;
2896+
background: rgba(8, 16, 31, 0.55) !important;
2897+
}
2898+
2899+
.vps-theme-fresh .latency-guideline {
2900+
color: rgba(14, 165, 233, 0.55) !important;
2901+
}
2902+
2903+
.dark .vps-theme-fresh .vps-metric-chart-shell {
2904+
border-color: rgba(56, 189, 248, 0.28) !important;
2905+
background: rgba(8, 16, 31, 0.8) !important;
2906+
}
2907+
2908+
.vps-theme-minimal .vps-metric-chart-shell {
2909+
border-color: rgba(226, 232, 240, 0.9) !important;
2910+
background: rgba(255, 255, 255, 0.95) !important;
2911+
}
2912+
2913+
.vps-theme-minimal .node-section-accent {
2914+
color: #475569 !important;
2915+
}
2916+
2917+
.vps-theme-minimal .vps-latency-shell {
2918+
border-color: rgba(226, 232, 240, 0.9) !important;
2919+
background: rgba(255, 255, 255, 0.6) !important;
2920+
}
2921+
2922+
.dark .vps-theme-minimal .vps-latency-shell {
2923+
border-color: rgba(148, 163, 184, 0.3) !important;
2924+
background: rgba(15, 23, 42, 0.6) !important;
2925+
}
2926+
2927+
.vps-theme-minimal .latency-guideline {
2928+
color: rgba(71, 85, 105, 0.35) !important;
2929+
}
2930+
2931+
.dark .vps-theme-minimal .vps-metric-chart-shell {
2932+
border-color: rgba(148, 163, 184, 0.3) !important;
2933+
background: rgba(15, 23, 42, 0.8) !important;
2934+
}
2935+
2936+
.vps-theme-tech .vps-metric-chart-shell {
2937+
border-color: rgba(34, 211, 238, 0.3) !important;
2938+
background: rgba(240, 253, 250, 0.85) !important;
2939+
}
2940+
2941+
.vps-theme-tech .node-section-accent {
2942+
color: #22d3ee !important;
2943+
}
2944+
2945+
.vps-theme-tech .vps-latency-shell {
2946+
border-color: rgba(34, 211, 238, 0.3) !important;
2947+
background: rgba(240, 253, 250, 0.55) !important;
2948+
}
2949+
2950+
.dark .vps-theme-tech .vps-latency-shell {
2951+
border-color: rgba(34, 211, 238, 0.22) !important;
2952+
background: rgba(6, 10, 22, 0.6) !important;
2953+
}
2954+
2955+
.vps-theme-tech .latency-guideline {
2956+
color: rgba(34, 211, 238, 0.5) !important;
2957+
}
2958+
2959+
.dark .vps-theme-tech .vps-metric-chart-shell {
2960+
border-color: rgba(34, 211, 238, 0.22) !important;
2961+
background: rgba(6, 10, 22, 0.88) !important;
2962+
}
2963+
2964+
.vps-theme-glass .vps-metric-chart-shell {
2965+
border-color: rgba(255, 255, 255, 0.35) !important;
2966+
background: rgba(255, 255, 255, 0.45) !important;
2967+
backdrop-filter: blur(12px);
2968+
}
2969+
2970+
.vps-theme-glass .node-section-accent {
2971+
color: rgba(255, 255, 255, 0.85) !important;
2972+
}
2973+
2974+
.vps-theme-glass .vps-latency-shell {
2975+
border-color: rgba(255, 255, 255, 0.35) !important;
2976+
background: rgba(255, 255, 255, 0.22) !important;
2977+
backdrop-filter: blur(14px);
2978+
}
2979+
2980+
.dark .vps-theme-glass .vps-latency-shell {
2981+
border-color: rgba(255, 255, 255, 0.16) !important;
2982+
background: rgba(15, 23, 42, 0.55) !important;
2983+
}
2984+
2985+
.vps-theme-glass .latency-guideline {
2986+
color: rgba(255, 255, 255, 0.45) !important;
2987+
}
2988+
2989+
.dark .vps-theme-glass .vps-metric-chart-shell {
2990+
border-color: rgba(255, 255, 255, 0.16) !important;
2991+
background: rgba(15, 23, 42, 0.65) !important;
2992+
}

0 commit comments

Comments
 (0)