mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-29 05:24:25 +08:00
[Feat] Download PLS from API
This commit is contained in:
21
src/aura/types/main/ipc/fs.d.ts
vendored
Normal file
21
src/aura/types/main/ipc/fs.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
type DownloadTaskID = string;
|
||||
type DownloadTaskStatus = "waiting" | "progressing" | "done" | "failed" | "cancelled";
|
||||
|
||||
interface DownloadTask {
|
||||
id: DownloadTaskID;
|
||||
progress: float;
|
||||
curBytes?: number;
|
||||
totalBytes?: number;
|
||||
status: DownloadTaskStatus;
|
||||
dlUrl: string | null;
|
||||
savePath: string | null;
|
||||
message?: string;
|
||||
errorObj?: Error;
|
||||
}
|
||||
|
||||
interface FSTasks {
|
||||
downloadTasks: Map<
|
||||
DownloadTaskID,
|
||||
{ status: DownloadTaskStatus; cancelReq: any }
|
||||
>;
|
||||
}
|
||||
8
src/aura/types/shared/global.d.ts
vendored
8
src/aura/types/shared/global.d.ts
vendored
@@ -11,6 +11,7 @@ type RendererProcessOnlyVal<T> = T;
|
||||
interface GlobalHugoAuraInfo {
|
||||
central?: MainProcessOnlyVal<(...args: any) => any>;
|
||||
configInit: boolean;
|
||||
fsTasks?: MainProcessOnlyVal<FSTasks>;
|
||||
hookedWindows?: MainProcessOnlyVal<HookedWindowsMap>;
|
||||
ipcInit?: MainProcessOnlyVal<boolean>;
|
||||
plsRules?: Record<any, any> | null;
|
||||
@@ -22,12 +23,19 @@ interface GlobalHugoAuraInfo {
|
||||
version: RendererProcessOnlyVal<string>;
|
||||
}
|
||||
|
||||
interface GlobalHugoAuraApiInfo {
|
||||
baseUrl: string;
|
||||
plsUpdate: string;
|
||||
auraUpdate: string;
|
||||
}
|
||||
|
||||
type GlobalHugoAuraConfig = AuraConfig;
|
||||
|
||||
declare global {
|
||||
var ipcRenderer: RendererProcessOnlyVal<IpcRenderer>;
|
||||
var _ACCEPT_DATA: any;
|
||||
var __HUGO_AURA__: GlobalHugoAuraInfo;
|
||||
var __HUGO_AURA_API__: GlobalHugoAuraApiInfo;
|
||||
var __HUGO_AURA_CONFIG__: GlobalHugoAuraConfig;
|
||||
var __HUGO_AURA_CONFIG_MGR__: ConfigManager;
|
||||
var __HUGO_AURA_EVENT_BUS__: EventBus;
|
||||
|
||||
2
src/aura/types/shared/pls/status.d.ts
vendored
2
src/aura/types/shared/pls/status.d.ts
vendored
@@ -12,4 +12,4 @@ interface PLSStatus {
|
||||
|
||||
type PLSLifecycleType = "isDetached" | "isSvcInstalled" | "isSvcStart";
|
||||
|
||||
type PLSLifecycleControlType = "instSvc" | "rmSvc" | "startSvc" | "stopSvc";
|
||||
type PLSLifecycleControlType = "instSvc" | "rmSvc" | "startSvc" | "stopSvc" | "rmBin" | "dlBin";
|
||||
|
||||
Reference in New Issue
Block a user