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{
|
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,
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user