fix: add app_name to API response, fix UiSwitch binding in version pages
This commit is contained in:
@@ -115,6 +115,7 @@ func handleAppCheckUpdate(c *gin.Context) {
|
||||
|
||||
result := gin.H{
|
||||
"has_update": true,
|
||||
"app_name": app.Name,
|
||||
"latest_version": latestVersion.Version,
|
||||
"download_url": downloadURL,
|
||||
"file_size": downloadSize,
|
||||
@@ -253,6 +254,7 @@ func handleAppCheckUpdate(c *gin.Context) {
|
||||
// 构建返回结果
|
||||
result := map[string]interface{}{
|
||||
"has_update": true,
|
||||
"app_name": app.Name,
|
||||
"current_version": clientVersion,
|
||||
"latest_version": latestVersion.Version,
|
||||
"download_url": downloadURL,
|
||||
|
||||
@@ -663,14 +663,14 @@ onMounted(() => {
|
||||
</td>
|
||||
<td class="p-2 text-center">
|
||||
<UiSwitch
|
||||
:checked="formData.entry_files.includes(file.file_path)"
|
||||
@update:checked="toggleEntryFile(file.file_path)"
|
||||
:model-value="formData.entry_files.includes(file.file_path)"
|
||||
@update:model-value="toggleEntryFile(file.file_path)"
|
||||
/>
|
||||
</td>
|
||||
<td class="p-2 text-center">
|
||||
<UiSwitch
|
||||
:checked="formData.desktop_shortcut_files.includes(file.file_path)"
|
||||
@update:checked="toggleDesktopShortcut(file.file_path)"
|
||||
:model-value="formData.desktop_shortcut_files.includes(file.file_path)"
|
||||
@update:model-value="toggleDesktopShortcut(file.file_path)"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -585,14 +585,14 @@ onMounted(() => {
|
||||
</td>
|
||||
<td class="p-2 text-center">
|
||||
<UiSwitch
|
||||
:checked="formData.entry_files.includes(file.file_path)"
|
||||
@update:checked="toggleEntryFile(file.file_path)"
|
||||
:model-value="formData.entry_files.includes(file.file_path)"
|
||||
@update:model-value="toggleEntryFile(file.file_path)"
|
||||
/>
|
||||
</td>
|
||||
<td class="p-2 text-center">
|
||||
<UiSwitch
|
||||
:checked="formData.desktop_shortcut_files.includes(file.file_path)"
|
||||
@update:checked="toggleDesktopShortcut(file.file_path)"
|
||||
:model-value="formData.desktop_shortcut_files.includes(file.file_path)"
|
||||
@update:model-value="toggleDesktopShortcut(file.file_path)"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user