From 965bc618ee1fb906d865f6b9b98372f30c70549f Mon Sep 17 00:00:00 2001 From: Ethanfly Date: Wed, 31 Dec 2025 15:09:11 +0800 Subject: [PATCH] Update version to 1.0.7 in package.json and version.json, and add refresh functionality in HostsManager.vue for improved host management experience. --- package.json | 4 ++-- public/version.json | 6 +++--- src/views/HostsManager.vue | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1e75b15..ac4f846 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phper-dev-manager", - "version": "1.0.6", + "version": "1.0.7", "description": "PHP开发环境管理器 - 管理PHP、MySQL、Nginx、Redis服务", "main": "dist-electron/main.js", "scripts": { @@ -107,4 +107,4 @@ } ] } -} \ No newline at end of file +} diff --git a/public/version.json b/public/version.json index 733d4f3..40c6bf1 100644 --- a/public/version.json +++ b/public/version.json @@ -1,5 +1,5 @@ { - "version": "1.0.6", - "buildTime": "2025-12-26T08:01:20.649Z", - "buildDate": "2025/12/26" + "version": "1.0.7", + "buildTime": "2025-12-31T07:09:02.287Z", + "buildDate": "2025/12/31" } \ No newline at end of file diff --git a/src/views/HostsManager.vue b/src/views/HostsManager.vue index f3d6410..e47b78a 100644 --- a/src/views/HostsManager.vue +++ b/src/views/HostsManager.vue @@ -16,6 +16,10 @@ Hosts 条目
+ + + 刷新 Hosts + 刷新 DNS @@ -101,6 +105,7 @@ interface HostEntry { } const loading = ref(false) +const refreshing = ref(false) const hosts = ref([]) const showAddDialog = ref(false) const adding = ref(false) @@ -118,6 +123,19 @@ const loadHosts = async () => { } } +const refreshHosts = async () => { + refreshing.value = true + try { + hosts.value = await window.electronAPI?.hosts.get() || [] + ElMessage.success('Hosts 列表已刷新') + } catch (error: any) { + console.error('刷新 hosts 失败:', error) + ElMessage.error('刷新失败: ' + error.message) + } finally { + refreshing.value = false + } +} + const addHost = async () => { if (!hostForm.ip || !hostForm.domain) { ElMessage.warning('请填写 IP 地址和域名')