修复: 版本更新与设置面板走查问题
- 更新链路: 检查记录远端SHA256,下载完成事件回传,安装时带哈希校验 - 续传: 服务器忽略Range返回200时截断重下防追加损坏,文件名去query - 定时器: 自动检查可重入,配置变更免重启生效,关闭即停,下载加互斥 - 前端: 支持跳过此版本并按版本去重,手动检查不受门禁限制,启动未就绪延时重试 - 更新面板: 新增自动检查开关/间隔/地址配置与进度条状态映射 - 版本历史: cache参数强制刷新与加载超时重试兜底 - 配置: 侧边栏分区全链路持久化,保存请求复用api类型防字段丢失 - 侧边栏: 区块定位改显式类名,不再依赖排序位置 - 绑定: 重新生成并与镜像目录同步
This commit is contained in:
@@ -30,6 +30,7 @@ type App struct {
|
||||
mainWindow *application.WebviewWindow
|
||||
updateAPI *api.UpdateAPI
|
||||
updateTicker *time.Ticker
|
||||
updateCheckStop chan struct{}
|
||||
configAPI *api.ConfigAPI
|
||||
pdfAPI *api.PdfAPI
|
||||
filesystem *filesystem.FileSystemService
|
||||
@@ -172,6 +173,7 @@ func (a *App) ServiceStartup(ctx context.Context, _ application.ServiceOptions)
|
||||
a.mainWindow.EmitEvent(name, data...)
|
||||
}
|
||||
})
|
||||
a.updateAPI.SetConfigChangedCallback(a.resetAutoUpdateCheck)
|
||||
a.startAutoUpdateCheck()
|
||||
}
|
||||
}()
|
||||
@@ -200,9 +202,7 @@ func (a *App) ServiceStartup(ctx context.Context, _ application.ServiceOptions)
|
||||
|
||||
// ServiceShutdown Wails v3 服务关闭生命周期(替代 v2 的 Shutdown)
|
||||
func (a *App) ServiceShutdown() error {
|
||||
if a.updateTicker != nil {
|
||||
a.updateTicker.Stop()
|
||||
}
|
||||
a.stopUpdateTicker()
|
||||
if a.unregisterHotkey != nil {
|
||||
a.unregisterHotkey()
|
||||
}
|
||||
@@ -273,13 +273,6 @@ type RenamePathRequest struct {
|
||||
NewPath string `json:"newPath"`
|
||||
}
|
||||
|
||||
// SaveAppConfigRequest 保存应用配置请求
|
||||
type SaveAppConfigRequest struct {
|
||||
Tabs []api.AppTabDefinition `json:"tabs"`
|
||||
VisibleTabs []string `json:"visibleTabs"`
|
||||
DefaultTab string `json:"defaultTab"`
|
||||
}
|
||||
|
||||
// SftpConnectRequest SFTP 连接请求
|
||||
type SftpConnectRequest struct {
|
||||
Host string `json:"host"`
|
||||
|
||||
Reference in New Issue
Block a user