Improved settings

This commit is contained in:
2025-06-07 21:12:07 +08:00
parent 31addd5a20
commit 61f293ce6f
18 changed files with 1480 additions and 1098 deletions

View File

@@ -5,42 +5,6 @@
// @ts-ignore: Unused imports
import {Create as $Create} from "@wailsio/runtime";
/**
* A Duration represents the elapsed time between two instants
* as an int64 nanosecond count. The representation limits the
* largest representable duration to approximately 290 years.
*/
export enum Duration {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = 0,
minDuration = -9223372036854775808,
maxDuration = 9223372036854775807,
/**
* Common durations. There is no definition for units of Day or larger
* to avoid confusion across daylight savings time zone transitions.
*
* To count the number of units in a [Duration], divide:
*
* second := time.Second
* fmt.Print(int64(second/time.Millisecond)) // prints 1000
*
* To convert an integer number of units to a Duration, multiply:
*
* seconds := 10
* fmt.Print(time.Duration(seconds)*time.Second) // prints 10s
*/
Nanosecond = 1,
Microsecond = 1000,
Millisecond = 1000000,
Second = 1000000000,
Minute = 60000000000,
Hour = 3600000000000,
};
/**
* A Time represents an instant in time with nanosecond precision.
*

View File

@@ -35,7 +35,7 @@ export function GetConfig(): Promise<models$0.AppConfig | null> & { cancel(): vo
}
/**
* ResetConfig 置为默认配置
* ResetConfig 强制重置所有配置为默认
*/
export function ResetConfig(): Promise<void> & { cancel(): void } {
let $resultPromise = $Call.ByID(3593047389) as any;

View File

@@ -51,10 +51,10 @@ export function ServiceShutdown(): Promise<void> & { cancel(): void } {
}
/**
* SetProgressCallback 设置进度回调
* SetProgressBroadcaster 设置进度广播函数
*/
export function SetProgressCallback(callback: $models.MigrationProgressCallback): Promise<void> & { cancel(): void } {
let $resultPromise = $Call.ByID(75752256, callback) as any;
export function SetProgressBroadcaster(broadcaster: any): Promise<void> & { cancel(): void } {
let $resultPromise = $Call.ByID(3244071921, broadcaster) as any;
return $resultPromise;
}

View File

@@ -5,10 +5,6 @@
// @ts-ignore: Unused imports
import {Create as $Create} from "@wailsio/runtime";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as time$0 from "../../../time/models.js";
/**
* MemoryStats 内存统计信息
*/
@@ -85,88 +81,24 @@ export class MigrationProgress {
*/
"status": MigrationStatus;
/**
* 当前处理的文件
*/
"currentFile": string;
/**
* 已处理文件数
*/
"processedFiles": number;
/**
* 总文件数
*/
"totalFiles": number;
/**
* 已处理字节数
*/
"processedBytes": number;
/**
* 总字节数
*/
"totalBytes": number;
/**
* 进度百分比 (0-100)
*/
"progress": number;
/**
* 状态消息
*/
"message": string;
/**
* 错误信息
*/
"error"?: string;
/**
* 开始时间
*/
"startTime": time$0.Time;
/**
* 估计剩余时间
*/
"estimatedTime": time$0.Duration;
/** Creates a new MigrationProgress instance. */
constructor($$source: Partial<MigrationProgress> = {}) {
if (!("status" in $$source)) {
this["status"] = ("" as MigrationStatus);
}
if (!("currentFile" in $$source)) {
this["currentFile"] = "";
}
if (!("processedFiles" in $$source)) {
this["processedFiles"] = 0;
}
if (!("totalFiles" in $$source)) {
this["totalFiles"] = 0;
}
if (!("processedBytes" in $$source)) {
this["processedBytes"] = 0;
}
if (!("totalBytes" in $$source)) {
this["totalBytes"] = 0;
}
if (!("progress" in $$source)) {
this["progress"] = 0;
}
if (!("message" in $$source)) {
this["message"] = "";
}
if (!("startTime" in $$source)) {
this["startTime"] = null;
}
if (!("estimatedTime" in $$source)) {
this["estimatedTime"] = (0 as time$0.Duration);
}
Object.assign(this, $$source);
}
@@ -180,11 +112,6 @@ export class MigrationProgress {
}
}
/**
* MigrationProgressCallback 进度回调函数类型
*/
export type MigrationProgressCallback = any;
/**
* MigrationStatus 迁移状态
*/
@@ -194,16 +121,6 @@ export enum MigrationStatus {
*/
$zero = "",
/**
* 空闲状态
*/
MigrationStatusIdle = "idle",
/**
* 准备中
*/
MigrationStatusPreparing = "preparing",
/**
* 迁移中
*/
@@ -218,9 +135,4 @@ export enum MigrationStatus {
* 失败
*/
MigrationStatusFailed = "failed",
/**
* 取消
*/
MigrationStatusCancelled = "cancelled",
};