mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-30 05:54:26 +08:00
[🚧 Fix] <PLS & FS> Improve PLS download logic & UX
1. [+] 增加了 PLS 下载操作的取消功能 2. [/] 修复了 FS IPC 中 `downloadFile` 时, 过早地从 downloadTasks 中删除任务的逻辑错误。 3. [↑] 改进了 PLS IPC 中 `handlePLSDownload` 获取版本信息时的逻辑, 现在该函数会从全局 API 信息中逐个尝试 API 域名。减少了极端网络环境下, 版本信息获取失败的可能性。 4. [/] 修复了下载失败后, 下载按钮依然保持灰显的问题。 5. [+] 为 PLS 下载增加了进度条显示。 6. [/] 优化了 `plsConnectionManager` 中一些不必要的 IPC 状态同步 (有些时候还会导致逻辑错误)。
This commit is contained in:
2
src/aura/types/main/ipc/fs.d.ts
vendored
2
src/aura/types/main/ipc/fs.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
type DownloadTaskID = string;
|
||||
type DownloadTaskStatus = "waiting" | "progressing" | "done" | "failed" | "cancelled";
|
||||
type DownloadTaskStatus = "waiting" | "progressing" | "done" | "failed" | "cancelled" | "struggling";
|
||||
|
||||
interface DownloadTask {
|
||||
id: DownloadTaskID;
|
||||
|
||||
2
src/aura/types/shared/global.d.ts
vendored
2
src/aura/types/shared/global.d.ts
vendored
@@ -24,7 +24,7 @@ interface GlobalHugoAuraInfo {
|
||||
}
|
||||
|
||||
interface GlobalHugoAuraApiInfo {
|
||||
baseUrl: string;
|
||||
domains: string[];
|
||||
plsUpdate: string;
|
||||
auraUpdate: string;
|
||||
}
|
||||
|
||||
17
src/aura/types/shared/pls/status.d.ts
vendored
17
src/aura/types/shared/pls/status.d.ts
vendored
@@ -1,15 +1,28 @@
|
||||
import { RendererProcessOnlyVal } from "../global";
|
||||
|
||||
type PLSStatusDesc =
|
||||
| "dead"
|
||||
| "running"
|
||||
| "notReady"
|
||||
| "downloading"
|
||||
| "notInstalled";
|
||||
|
||||
interface PLSStatus {
|
||||
installed: boolean;
|
||||
detached: boolean;
|
||||
connected: boolean;
|
||||
launched: boolean;
|
||||
status: string;
|
||||
status: PLSStatusDesc;
|
||||
version: string;
|
||||
authToken: string;
|
||||
}
|
||||
|
||||
type PLSLifecycleType = "isDetached" | "isSvcInstalled" | "isSvcStart";
|
||||
|
||||
type PLSLifecycleControlType = "instSvc" | "rmSvc" | "startSvc" | "stopSvc" | "rmBin" | "dlBin";
|
||||
type PLSLifecycleControlType =
|
||||
| "instSvc"
|
||||
| "rmSvc"
|
||||
| "startSvc"
|
||||
| "stopSvc"
|
||||
| "rmBin"
|
||||
| "dlBin";
|
||||
|
||||
Reference in New Issue
Block a user