fix: add app_name to API response, fix UiSwitch binding in version pages

This commit is contained in:
Trae AI
2026-06-20 06:09:58 +08:00
parent a32d3bc863
commit 7f8bb5d6c3
3 changed files with 10 additions and 8 deletions
+2
View File
@@ -115,6 +115,7 @@ func handleAppCheckUpdate(c *gin.Context) {
result := gin.H{ result := gin.H{
"has_update": true, "has_update": true,
"app_name": app.Name,
"latest_version": latestVersion.Version, "latest_version": latestVersion.Version,
"download_url": downloadURL, "download_url": downloadURL,
"file_size": downloadSize, "file_size": downloadSize,
@@ -253,6 +254,7 @@ func handleAppCheckUpdate(c *gin.Context) {
// 构建返回结果 // 构建返回结果
result := map[string]interface{}{ result := map[string]interface{}{
"has_update": true, "has_update": true,
"app_name": app.Name,
"current_version": clientVersion, "current_version": clientVersion,
"latest_version": latestVersion.Version, "latest_version": latestVersion.Version,
"download_url": downloadURL, "download_url": downloadURL,
+4 -4
View File
@@ -663,14 +663,14 @@ onMounted(() => {
</td> </td>
<td class="p-2 text-center"> <td class="p-2 text-center">
<UiSwitch <UiSwitch
:checked="formData.entry_files.includes(file.file_path)" :model-value="formData.entry_files.includes(file.file_path)"
@update:checked="toggleEntryFile(file.file_path)" @update:model-value="toggleEntryFile(file.file_path)"
/> />
</td> </td>
<td class="p-2 text-center"> <td class="p-2 text-center">
<UiSwitch <UiSwitch
:checked="formData.desktop_shortcut_files.includes(file.file_path)" :model-value="formData.desktop_shortcut_files.includes(file.file_path)"
@update:checked="toggleDesktopShortcut(file.file_path)" @update:model-value="toggleDesktopShortcut(file.file_path)"
/> />
</td> </td>
</tr> </tr>
+4 -4
View File
@@ -585,14 +585,14 @@ onMounted(() => {
</td> </td>
<td class="p-2 text-center"> <td class="p-2 text-center">
<UiSwitch <UiSwitch
:checked="formData.entry_files.includes(file.file_path)" :model-value="formData.entry_files.includes(file.file_path)"
@update:checked="toggleEntryFile(file.file_path)" @update:model-value="toggleEntryFile(file.file_path)"
/> />
</td> </td>
<td class="p-2 text-center"> <td class="p-2 text-center">
<UiSwitch <UiSwitch
:checked="formData.desktop_shortcut_files.includes(file.file_path)" :model-value="formData.desktop_shortcut_files.includes(file.file_path)"
@update:checked="toggleDesktopShortcut(file.file_path)" @update:model-value="toggleDesktopShortcut(file.file_path)"
/> />
</td> </td>
</tr> </tr>