diff --git a/src/components/dashboard/ApiKeyEditModal.vue b/src/components/dashboard/ApiKeyEditModal.vue
index b545102..090cf34 100644
--- a/src/components/dashboard/ApiKeyEditModal.vue
+++ b/src/components/dashboard/ApiKeyEditModal.vue
@@ -16,7 +16,7 @@ const emit = defineEmits<{
const formData = ref({
name: '',
description: '',
- ua: ''
+ userAgent: ''
})
watch(() => props.apiKey, (newApiKey) => {
@@ -24,7 +24,7 @@ watch(() => props.apiKey, (newApiKey) => {
formData.value = {
name: newApiKey.name || '',
description: newApiKey.description || '',
- ua: newApiKey.ua || ''
+ userAgent: newApiKey.userAgent || ''
}
}
}, { immediate: true })
@@ -65,7 +65,7 @@ function handleSave() {
User-Agent (正则表达式)
-
+
支持正则表达式,例如 PCL/* 匹配所有 PCL 开头的 UA
diff --git a/src/components/dashboard/LoadGauge.vue b/src/components/dashboard/LoadGauge.vue
new file mode 100644
index 0000000..2acf681
--- /dev/null
+++ b/src/components/dashboard/LoadGauge.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/dashboard/Map.vue b/src/components/dashboard/Map.vue
index 602ebf9..ee3292d 100644
--- a/src/components/dashboard/Map.vue
+++ b/src/components/dashboard/Map.vue
@@ -1,23 +1,24 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/components/dashboard/NodeCard.vue b/src/components/dashboard/NodeCard.vue
index c1158eb..8880189 100644
--- a/src/components/dashboard/NodeCard.vue
+++ b/src/components/dashboard/NodeCard.vue
@@ -1,4 +1,6 @@
-
-
-
-
-
{{ node.name }}
-
{{ node.description }}
-
-
- {{ node.status === 'Online' ? '在线' : node.status === 'Offline' ? '离线' : node.status === 'Pending' ? '等待' : node.status || 'Unknown' }}
-
-
+
+
+
{{ node.name }}
+
+
-
-
{{ tag }}
+
+ {{ tag }}
-
-
-
-
+
+
+
+
+
+
协议:
+
{{ nodeInfo.protocol || '-' }}
+
+
+
+
+
+
地址:
+
{{ nodeInfo.host || '-' }}:{{ nodeInfo.port || '-' }}
+
+
+
+
+
+
中继:
+
{{ nodeInfo.isRelay ? '允许' : '禁止' }}
+
+
+
+
-
{{ node.max_connections }}
-
-
-
-
- 中继
-
-
禁中继
+
带宽:
+
{{ nodeInfo.maximumBandwidth }} Mbps
-
-
-
+
+
+
详情
-
-
+
+
编辑
-
-
+
+
删除
diff --git a/src/components/dashboard/NodeDetailModal.vue b/src/components/dashboard/NodeDetailModal.vue
index a0011a0..8e35f1d 100644
--- a/src/components/dashboard/NodeDetailModal.vue
+++ b/src/components/dashboard/NodeDetailModal.vue
@@ -12,9 +12,34 @@ const emit = defineEmits<{
close: []
}>()
+const nodeInfo = computed(() => props.node?.nodeInfo?.[0] || {})
+
+const nodeStatus = computed(() => {
+ const status = props.node?.nodeStatuses?.[0]?.status
+ if (status === 'online') return 'online'
+ if (status === 'offline') return 'offline'
+ return 'pending'
+})
+
+const statusText = computed(() => {
+ switch (nodeStatus.value) {
+ case 'online': return '在线'
+ case 'offline': return '离线'
+ default: return '等待调配'
+ }
+})
+
+const statusBadgeClass = computed(() => {
+ switch (nodeStatus.value) {
+ case 'online': return 'badge-success'
+ case 'offline': return 'badge-error'
+ default: return 'badge-warning'
+ }
+})
+
const formattedDate = computed(() => {
- if (!props.node?.last_status_update) return '-'
- return new Date(props.node.last_status_update).toLocaleString()
+ if (!props.node?.createdAt) return '-'
+ return new Date(props.node.createdAt).toLocaleString()
})
function handleClose() {
@@ -38,43 +63,34 @@ function handleClose() {
连接地址
-
{{ node.host }}:{{ node.port }}
+
{{ nodeInfo.host || '-' }}:{{ nodeInfo.port || '-' }}
网络名称
-
{{ node.network_name || '-' }}
+
{{ nodeInfo.networkName || '-' }}
协议
-
{{ node.protocol?.toUpperCase() }}
+
{{ nodeInfo.protocol?.toUpperCase() }}
-
最大连接数
-
{{ node.max_connections }}
+
最大带宽
+
{{ nodeInfo.maximumBandwidth || '-' }} Mbps
状态
-
- {{ node.status === 'Online' ? '在线' : node.status === 'Offline' ? '离线' : node.status === 'Pending' ? '等待' : node.status || 'Unknown' }}
+
+ {{ statusText }}
是否允许中继
-
- {{ node.allow_relay ? '是' : '否' }}
+
+ {{ nodeInfo.isRelay ? '是' : '否' }}
-
响应时间
-
{{ node.response_time ? node.response_time + 'ms' : '-' }}
-
-
-
最后状态更新
+
创建时间
{{ formattedDate }}
@@ -91,18 +107,18 @@ function handleClose() {
{{ node.description }}
-
-
+
+
-
{{ node.qq_number }}
+
{{ node.contact.qq }}
-
+
-
{{ node.mail }}
+
{{ node.contact.email }}
diff --git a/src/components/dashboard/NodeEditModal.vue b/src/components/dashboard/NodeEditModal.vue
index 135bdf7..2901b68 100644
--- a/src/components/dashboard/NodeEditModal.vue
+++ b/src/components/dashboard/NodeEditModal.vue
@@ -1,5 +1,5 @@
@@ -133,6 +157,28 @@ function handleSave() {
+
+
+
+
+ 节点公开
+
+
+
+
@@ -148,7 +194,7 @@ function handleSave() {
-