+ {/* 检查中 */}
+ {checking && (
+
+ )}
+
+ {/* 发现更新 */}
+ {!checking && hasUpdate && updateInfo && (
+ <>
+
+ 当前版本: {CURRENT_VERSION}
+ →
+ 新版本: {updateInfo.version}
+
+
+ {updateInfo.body && (
+
+
更新内容:
+
{updateInfo.body}
+
+ )}
+
+ {isMandatory && (
+
+
+ 此版本为强制更新,必须安装后才能继续使用
+
+ )}
+ >
+ )}
+
+ {/* 下载进度 */}
+ {downloading && (
+
+
+
+ {progress}%
+ {totalBytes > 0 && (
+
+ {formatBytes(downloadedBytes)} / {formatBytes(totalBytes)}
+
+ )}
+
+
+ )}
+
+ {/* 安装完成 */}
+ {installing && (
+
+
+
更新已下载并安装完成
+
重启应用后即可使用新版本
+
+ )}
+
+ {/* 错误 */}
+ {error && (
+
+
+ {error}
+
+ )}
+
+ {!checking && !downloading && !installing && (
+ <>
+ {!isMandatory && (
+
+ )}
+
+ >
+ )}
+
+ {downloading && (
+
+ )}
+
+ {installing && (
+
+ )}
+