🐛 Fixed bug

This commit is contained in:
2025-06-21 15:03:35 +08:00
parent 145b868a44
commit 1153c0a652
22 changed files with 646 additions and 309 deletions

View File

@@ -345,6 +345,11 @@ export class GeneralConfig {
*/
"enableSystemTray": boolean;
/**
* 开机启动设置
*/
"startAtLogin": boolean;
/**
* 全局热键设置
* 是否启用全局热键
@@ -367,6 +372,9 @@ export class GeneralConfig {
if (!("enableSystemTray" in $$source)) {
this["enableSystemTray"] = false;
}
if (!("startAtLogin" in $$source)) {
this["startAtLogin"] = false;
}
if (!("enableGlobalHotkey" in $$source)) {
this["enableGlobalHotkey"] = false;
}
@@ -381,10 +389,10 @@ export class GeneralConfig {
* Creates a new GeneralConfig instance from a string or object.
*/
static createFrom($$source: any = {}): GeneralConfig {
const $$createField4_0 = $$createType6;
const $$createField5_0 = $$createType6;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
if ("globalHotkey" in $$parsedSource) {
$$parsedSource["globalHotkey"] = $$createField4_0($$parsedSource["globalHotkey"]);
$$parsedSource["globalHotkey"] = $$createField5_0($$parsedSource["globalHotkey"]);
}
return new GeneralConfig($$parsedSource as Partial<GeneralConfig>);
}

View File

@@ -7,6 +7,7 @@ import * as DocumentService from "./documentservice.js";
import * as HotkeyService from "./hotkeyservice.js";
import * as KeyBindingService from "./keybindingservice.js";
import * as MigrationService from "./migrationservice.js";
import * as StartupService from "./startupservice.js";
import * as SystemService from "./systemservice.js";
import * as TrayService from "./trayservice.js";
export {
@@ -16,6 +17,7 @@ export {
HotkeyService,
KeyBindingService,
MigrationService,
StartupService,
SystemService,
TrayService
};

View File

@@ -0,0 +1,19 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
/**
* StartupService 开机启动服务
* @module
*/
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import {Call as $Call, Create as $Create} from "@wailsio/runtime";
/**
* SetEnabled 设置开机启动状态
*/
export function SetEnabled(enabled: boolean): Promise<void> & { cancel(): void } {
let $resultPromise = $Call.ByID(2911601468, enabled) as any;
return $resultPromise;
}