chore: add wails dev and build scripts
This commit is contained in:
@@ -56,7 +56,14 @@ npm run build
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
wails3 dev
|
wails3 dev
|
||||||
wails3 package
|
wails3 build
|
||||||
|
```
|
||||||
|
|
||||||
|
Windows 下也可以直接运行:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
.\dev.bat
|
||||||
|
.\build.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
## 维护约定
|
## 维护约定
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
@for /f "delims=" %%G in ('go env GOPATH') do @set "PATH=%%G\bin;%PATH%" && wails3 build
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"fixed": {
|
||||||
|
"file_version": "1.0.0.0"
|
||||||
|
},
|
||||||
|
"info": {
|
||||||
|
"0000": {
|
||||||
|
"ProductVersion": "1.0.0.0",
|
||||||
|
"CompanyName": "cmbone",
|
||||||
|
"FileDescription": "cmbone desktop application",
|
||||||
|
"LegalCopyright": "(c) 2026 cmbone",
|
||||||
|
"ProductName": "cmbone",
|
||||||
|
"Comments": "Reusable Wails desktop application template"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<assemblyIdentity type="win32" name="cmbone.desktop" version="1.0.0.0" processorArchitecture="*"/>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<asmv3:application>
|
||||||
|
<asmv3:windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||||
|
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
|
||||||
|
</asmv3:windowsSettings>
|
||||||
|
</asmv3:application>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
@for /f "delims=" %%G in ('go env GOPATH') do @set "PATH=%%G\bin;%PATH%" && wails3 dev
|
||||||
+17
-2
@@ -94,12 +94,27 @@ go build -o bin\cmbone.exe .
|
|||||||
wails3 dev
|
wails3 dev
|
||||||
```
|
```
|
||||||
|
|
||||||
打包:
|
Wails 构建:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
wails3 package
|
wails3 build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Windows 快捷脚本:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
.\dev.bat
|
||||||
|
.\build.bat
|
||||||
|
```
|
||||||
|
|
||||||
|
Windows build 资源:
|
||||||
|
|
||||||
|
- `build/windows/wails.exe.manifest`
|
||||||
|
- `build/windows/info.json`
|
||||||
|
- `build/windows/icon.ico`
|
||||||
|
|
||||||
|
`wails3 build` 会重新生成 `frontend/bindings`,当前 CLI 生成的是 `.js` bindings。
|
||||||
|
|
||||||
## 版本升级规则
|
## 版本升级规则
|
||||||
|
|
||||||
- 升级 Go 前,先确认 Wails v3 alpha、SQLite 和热键库的兼容性。
|
- 升级 Go 前,先确认 Wails v3 alpha、SQLite 和热键库的兼容性。
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
| T-031 | 文档化 Wails bindings 生成流程 | T-012 | README 或技术栈文档说明 `wails3 generate bindings` 的使用、失败处理和版本要求 | TODO |
|
| T-031 | 文档化 Wails bindings 生成流程 | T-012 | README 或技术栈文档说明 `wails3 generate bindings` 的使用、失败处理和版本要求 | TODO |
|
||||||
| T-032 | 补充 Windows 打包验证文档 | T-031 | `wails3 package` 前置条件、输出目录和常见失败处理写入 README 或 docs | TODO |
|
| T-032 | 补充 Windows 打包验证文档 | T-031 | `wails3 package` 前置条件、输出目录和常见失败处理写入 README 或 docs | TODO |
|
||||||
| T-033 | 完成一次模板 smoke 清单 | T-023 | 登录、设置、业务样例、日志、统计、组件示例、托盘、热键都按清单验证并记录结果 | TODO |
|
| T-033 | 完成一次模板 smoke 清单 | T-023 | 登录、设置、业务样例、日志、统计、组件示例、托盘、热键都按清单验证并记录结果 | TODO |
|
||||||
|
| T-034 | 添加 Windows Wails 快捷脚本 | T-001 | `dev.bat` 一行把 Go bin 加入当前进程 PATH 并运行 `wails3 dev`;`build.bat` 一行把 Go bin 加入当前进程 PATH 并运行 `wails3 build`;README、技术栈、当前状态和执行流水已同步 | DONE |
|
||||||
|
|
||||||
## Backlog
|
## Backlog
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ MVP 可以先用本地模拟 provider,后续再接真实 AI 后端。
|
|||||||
|
|
||||||
绑定目录:`frontend/bindings/cmbone/internal/services`
|
绑定目录:`frontend/bindings/cmbone/internal/services`
|
||||||
|
|
||||||
|
当前 Wails v3 CLI 会生成 `.js` bindings。前端源码使用无扩展名 import,允许 Vite 解析到这些 `.js` 文件。
|
||||||
|
|
||||||
服务签名变化后优先执行:
|
服务签名变化后优先执行:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
- Wails 版本:`v3.0.0-alpha.9`
|
- Wails 版本:`v3.0.0-alpha.9`
|
||||||
- 前端 runtime:`@wailsio/runtime 3.0.0-alpha.66`
|
- 前端 runtime:`@wailsio/runtime 3.0.0-alpha.66`
|
||||||
- 前端框架:Vue 3、Vite、TypeScript、Tailwind CSS、Ant Design Vue
|
- 前端框架:Vue 3、Vite、TypeScript、Tailwind CSS、Ant Design Vue
|
||||||
|
- 当前 Wails 前端 bindings:由 `wails3 build` / `wails3 generate bindings` 生成的 `.js` 文件。
|
||||||
- 本地数据库:SQLite,用户配置目录下 `cmbone/cmbone.db`
|
- 本地数据库:SQLite,用户配置目录下 `cmbone/cmbone.db`
|
||||||
- 当前主窗口路由:`/#/`,已保留为主应用入口,不再自动跳转到第二窗口。
|
- 当前主窗口路由:`/#/`,已保留为主应用入口,不再自动跳转到第二窗口。
|
||||||
- 当前第二窗口路由:`/#/second`
|
- 当前第二窗口路由:`/#/second`
|
||||||
@@ -53,6 +54,9 @@ Wails CLI:
|
|||||||
```powershell
|
```powershell
|
||||||
go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.9
|
go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.9
|
||||||
wails3 dev
|
wails3 dev
|
||||||
|
wails3 build
|
||||||
|
.\dev.bat
|
||||||
|
.\build.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
## 已知风险
|
## 已知风险
|
||||||
@@ -65,6 +69,7 @@ wails3 dev
|
|||||||
- bindings 生成依赖本机安装的 `wails3`。
|
- bindings 生成依赖本机安装的 `wails3`。
|
||||||
- `npm install` 当前报告 3 个 moderate audit findings,后续如做依赖治理应单独开任务。
|
- `npm install` 当前报告 3 个 moderate audit findings,后续如做依赖治理应单独开任务。
|
||||||
- 前端构建当前有 Browserslist 数据过期和 chunk 大小警告,不阻塞生产构建。
|
- 前端构建当前有 Browserslist 数据过期和 chunk 大小警告,不阻塞生产构建。
|
||||||
|
- Windows 快捷脚本依赖 `go env GOPATH` 下的 `bin\wails3.exe`,如果未安装 Wails CLI,先按 README 安装固定版本。
|
||||||
|
|
||||||
## 最近验证
|
## 最近验证
|
||||||
|
|
||||||
@@ -91,6 +96,15 @@ wails3 dev
|
|||||||
- `go build -o bin\cmbone.exe .` 通过。
|
- `go build -o bin\cmbone.exe .` 通过。
|
||||||
- `bin\cmbone.exe` 启动 6 秒 smoke 通过。
|
- `bin\cmbone.exe` 启动 6 秒 smoke 通过。
|
||||||
|
|
||||||
|
同日新增 Windows Wails 快捷脚本:
|
||||||
|
|
||||||
|
- `dev.bat` 一行把 Go bin 加入当前进程 PATH 并运行 `wails3 dev`。
|
||||||
|
- `build.bat` 一行把 Go bin 加入当前进程 PATH 并运行 `wails3 build`。
|
||||||
|
- 已补齐 `build/windows/wails.exe.manifest` 和 `build/windows/info.json`,使 `wails3 build` 的 Windows syso 生成步骤可运行。
|
||||||
|
- `cmd /c build.bat` 通过。
|
||||||
|
- 使用同样 PATH 逻辑执行 `wails3 dev -help` 通过。
|
||||||
|
- `.\init.ps1` 通过。
|
||||||
|
|
||||||
## 下一步
|
## 下一步
|
||||||
|
|
||||||
从 [`06-tasks.md`](06-tasks.md) 领取第一个 `TODO` 任务。目前建议先做 `T-012`:搭建主应用路由骨架。
|
从 [`06-tasks.md`](06-tasks.md) 领取第一个 `TODO` 任务。目前建议先做 `T-012`:搭建主应用路由骨架。
|
||||||
|
|||||||
+2
-3
@@ -1,6 +1,5 @@
|
|||||||
|
// @ts-check
|
||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
// This file is automatically generated. DO NOT EDIT
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
export {
|
export * from "./models.js";
|
||||||
Hotkey
|
|
||||||
} from "./models.js";
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
// @ts-check
|
||||||
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import {Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
export class Hotkey {
|
||||||
|
/**
|
||||||
|
* Creates a new Hotkey instance.
|
||||||
|
* @param {Partial<Hotkey>} [$$source = {}] - The source object to create the Hotkey.
|
||||||
|
*/
|
||||||
|
constructor($$source = {}) {
|
||||||
|
if (!("id" in $$source)) {
|
||||||
|
/**
|
||||||
|
* 热键ID
|
||||||
|
* @member
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
this["id"] = 0;
|
||||||
|
}
|
||||||
|
if (!("keycode" in $$source)) {
|
||||||
|
/**
|
||||||
|
* 键码
|
||||||
|
* @member
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
this["keycode"] = 0;
|
||||||
|
}
|
||||||
|
if (!("modifiers" in $$source)) {
|
||||||
|
/**
|
||||||
|
* 修饰键
|
||||||
|
* @member
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
this["modifiers"] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.assign(this, $$source);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new Hotkey instance from a string or object.
|
||||||
|
* @param {any} [$$source = {}]
|
||||||
|
* @returns {Hotkey}
|
||||||
|
*/
|
||||||
|
static createFrom($$source = {}) {
|
||||||
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||||
|
return new Hotkey(/** @type {Partial<Hotkey>} */($$parsedSource));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Create as $Create } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
export class Hotkey {
|
|
||||||
/**
|
|
||||||
* 热键ID
|
|
||||||
*/
|
|
||||||
"id": number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 键码
|
|
||||||
*/
|
|
||||||
"keycode": number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修饰键
|
|
||||||
*/
|
|
||||||
"modifiers": number;
|
|
||||||
|
|
||||||
/** Creates a new Hotkey instance. */
|
|
||||||
constructor($$source: Partial<Hotkey> = {}) {
|
|
||||||
if (!("id" in $$source)) {
|
|
||||||
this["id"] = 0;
|
|
||||||
}
|
|
||||||
if (!("keycode" in $$source)) {
|
|
||||||
this["keycode"] = 0;
|
|
||||||
}
|
|
||||||
if (!("modifiers" in $$source)) {
|
|
||||||
this["modifiers"] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new Hotkey instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): Hotkey {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new Hotkey($$parsedSource as Partial<Hotkey>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// @ts-check
|
||||||
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据key获取配置项
|
||||||
|
* @param {string} key
|
||||||
|
* @returns {Promise<string> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function GetAppConfig(key) {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(4279572935, key));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取应用语言
|
||||||
|
* @returns {Promise<string> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function GetLanguage() {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(2277729644));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置或更新配置项
|
||||||
|
* @param {string} key
|
||||||
|
* @param {string} value
|
||||||
|
* @returns {Promise<void> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function SetAppConfig(key, value) {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(2391832275, key, value));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置应用语言
|
||||||
|
* @param {string} lang
|
||||||
|
* @returns {Promise<void> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function SetLanguage(lang) {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(538150432, lang));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据key获取配置项
|
|
||||||
*/
|
|
||||||
export function GetAppConfig(key: string): $CancellablePromise<string> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.AppConfigService.GetAppConfig", key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取应用语言
|
|
||||||
*/
|
|
||||||
export function GetLanguage(): $CancellablePromise<string> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.AppConfigService.GetLanguage");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置或更新配置项
|
|
||||||
*/
|
|
||||||
export function SetAppConfig(key: string, value: string): $CancellablePromise<void> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.AppConfigService.SetAppConfig", key, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置应用语言
|
|
||||||
*/
|
|
||||||
export function SetLanguage(lang: string): $CancellablePromise<void> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.AppConfigService.SetLanguage", lang);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// @ts-check
|
||||||
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {Promise<void> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function OpenSecondWindow() {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(3768296744));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} lang
|
||||||
|
* @returns {Promise<void> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function SetLanguage(lang) {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(3062168746, lang));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
export function OpenSecondWindow(): $CancellablePromise<void> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.AppService.OpenSecondWindow");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新应用语言设置并刷新菜单显示
|
|
||||||
*/
|
|
||||||
export function SetLanguage(lang: string): $CancellablePromise<void> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.AppService.SetLanguage", lang);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// @ts-check
|
||||||
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as models$0 from "../models/models.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {Promise<models$0.Hotkey[]> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function GetHotkeys() {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(925491794));
|
||||||
|
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
||||||
|
return $$createType1($result);
|
||||||
|
}));
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {number} id
|
||||||
|
* @param {number} key
|
||||||
|
* @param {number} modifier
|
||||||
|
* @returns {Promise<void> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function UpHotkey(id, key, modifier) {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(881898498, id, key, modifier));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private type creation functions
|
||||||
|
const $$createType0 = models$0.Hotkey.createFrom;
|
||||||
|
const $$createType1 = $Create.Array($$createType0);
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as models$0 from "../models/models.js";
|
|
||||||
|
|
||||||
export function GetHotkeys(): $CancellablePromise<models$0.Hotkey[]> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.HotkeyService.GetHotkeys").then(($result: any) => {
|
|
||||||
return $$createType1($result);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 快捷键修改
|
|
||||||
*/
|
|
||||||
export function UpHotkey(id: number, key: number, modifier: number): $CancellablePromise<void> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.HotkeyService.UpHotkey", id, key, modifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Private type creation functions
|
|
||||||
const $$createType0 = models$0.Hotkey.createFrom;
|
|
||||||
const $$createType1 = $Create.Array($$createType0);
|
|
||||||
+1
-4
@@ -1,3 +1,4 @@
|
|||||||
|
// @ts-check
|
||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
// This file is automatically generated. DO NOT EDIT
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
@@ -13,7 +14,3 @@ export {
|
|||||||
OCRService,
|
OCRService,
|
||||||
SystemInfo
|
SystemInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
|
||||||
SuiStore
|
|
||||||
} from "./models.js";
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @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 sql$0 from "../../../database/sql/models.js";
|
|
||||||
|
|
||||||
export class SuiStore {
|
|
||||||
"DB": sql$0.DB | null;
|
|
||||||
|
|
||||||
/** Creates a new SuiStore instance. */
|
|
||||||
constructor($$source: Partial<SuiStore> = {}) {
|
|
||||||
if (!("DB" in $$source)) {
|
|
||||||
this["DB"] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new SuiStore instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): SuiStore {
|
|
||||||
const $$createField0_0 = $$createType1;
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
if ("DB" in $$parsedSource) {
|
|
||||||
$$parsedSource["DB"] = $$createField0_0($$parsedSource["DB"]);
|
|
||||||
}
|
|
||||||
return new SuiStore($$parsedSource as Partial<SuiStore>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Private type creation functions
|
|
||||||
const $$createType0 = sql$0.DB.createFrom;
|
|
||||||
const $$createType1 = $Create.Nullable($$createType0);
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// @ts-check
|
||||||
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 识别Base64图片(data:image/png;base64,...)
|
||||||
|
* @param {string} base64str
|
||||||
|
* @returns {Promise<string> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function RecognizeImageBase64(base64str) {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(1021755169, base64str));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
// This file is kept small because wails3 is not available in this environment.
|
|
||||||
// Regenerate bindings with `wails3 generate bindings` when the CLI is installed.
|
|
||||||
|
|
||||||
import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
export function RecognizeImageBase64(base64str: string): $CancellablePromise<string> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.OCRService.RecognizeImageBase64", base64str);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// @ts-check
|
||||||
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {Promise<string> & { cancel(): void }}
|
||||||
|
*/
|
||||||
|
export function GetOS() {
|
||||||
|
let $resultPromise = /** @type {any} */($Call.ByID(1831744513));
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
export function GetOS(): $CancellablePromise<string> {
|
|
||||||
return $Call.ByName("cmbone/internal/services.SystemInfo.GetOS");
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
export {
|
|
||||||
DB
|
|
||||||
} from "./models.js";
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Create as $Create } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DB is a database handle representing a pool of zero or more
|
|
||||||
* underlying connections. It's safe for concurrent use by multiple
|
|
||||||
* goroutines.
|
|
||||||
*
|
|
||||||
* The sql package creates and frees connections automatically; it
|
|
||||||
* also maintains a free pool of idle connections. If the database has
|
|
||||||
* a concept of per-connection state, such state can be reliably observed
|
|
||||||
* within a transaction ([Tx]) or connection ([Conn]). Once [DB.Begin] is called, the
|
|
||||||
* returned [Tx] is bound to a single connection. Once [Tx.Commit] or
|
|
||||||
* [Tx.Rollback] is called on the transaction, that transaction's
|
|
||||||
* connection is returned to [DB]'s idle connection pool. The pool size
|
|
||||||
* can be controlled with [DB.SetMaxIdleConns].
|
|
||||||
*/
|
|
||||||
export class DB {
|
|
||||||
|
|
||||||
/** Creates a new DB instance. */
|
|
||||||
constructor($$source: Partial<DB> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new DB instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): DB {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new DB($$parsedSource as Partial<DB>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
export {
|
|
||||||
FS
|
|
||||||
} from "./models.js";
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Create as $Create } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An FS is a read-only collection of files, usually initialized with a //go:embed directive.
|
|
||||||
* When declared without a //go:embed directive, an FS is an empty file system.
|
|
||||||
*
|
|
||||||
* An FS is a read-only value, so it is safe to use from multiple goroutines
|
|
||||||
* simultaneously and also safe to assign values of type FS to each other.
|
|
||||||
*
|
|
||||||
* FS implements fs.FS, so it can be used with any package that understands
|
|
||||||
* file system interfaces, including net/http, text/template, and html/template.
|
|
||||||
*
|
|
||||||
* See the package documentation for more details about initializing an FS.
|
|
||||||
*/
|
|
||||||
export class FS {
|
|
||||||
|
|
||||||
/** Creates a new FS instance. */
|
|
||||||
constructor($$source: Partial<FS> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new FS instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): FS {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new FS($$parsedSource as Partial<FS>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
export {
|
|
||||||
App,
|
|
||||||
BrowserManager,
|
|
||||||
ClipboardManager,
|
|
||||||
ContextMenuManager,
|
|
||||||
DialogManager,
|
|
||||||
EnvironmentManager,
|
|
||||||
EventManager,
|
|
||||||
KeyBindingManager,
|
|
||||||
MenuManager,
|
|
||||||
ScreenManager,
|
|
||||||
SystemTrayManager,
|
|
||||||
WindowManager
|
|
||||||
} from "./models.js";
|
|
||||||
@@ -1,369 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @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 slog$0 from "../../../../../../log/slog/models.js";
|
|
||||||
|
|
||||||
export class App {
|
|
||||||
/**
|
|
||||||
* Manager pattern for organized API
|
|
||||||
*/
|
|
||||||
"Window": WindowManager | null;
|
|
||||||
"ContextMenu": ContextMenuManager | null;
|
|
||||||
"KeyBinding": KeyBindingManager | null;
|
|
||||||
"Browser": BrowserManager | null;
|
|
||||||
"Env": EnvironmentManager | null;
|
|
||||||
"Dialog": DialogManager | null;
|
|
||||||
"Event": EventManager | null;
|
|
||||||
"Menu": MenuManager | null;
|
|
||||||
"Screen": ScreenManager | null;
|
|
||||||
"Clipboard": ClipboardManager | null;
|
|
||||||
"SystemTray": SystemTrayManager | null;
|
|
||||||
"Logger": slog$0.Logger | null;
|
|
||||||
|
|
||||||
/** Creates a new App instance. */
|
|
||||||
constructor($$source: Partial<App> = {}) {
|
|
||||||
if (!("Window" in $$source)) {
|
|
||||||
this["Window"] = null;
|
|
||||||
}
|
|
||||||
if (!("ContextMenu" in $$source)) {
|
|
||||||
this["ContextMenu"] = null;
|
|
||||||
}
|
|
||||||
if (!("KeyBinding" in $$source)) {
|
|
||||||
this["KeyBinding"] = null;
|
|
||||||
}
|
|
||||||
if (!("Browser" in $$source)) {
|
|
||||||
this["Browser"] = null;
|
|
||||||
}
|
|
||||||
if (!("Env" in $$source)) {
|
|
||||||
this["Env"] = null;
|
|
||||||
}
|
|
||||||
if (!("Dialog" in $$source)) {
|
|
||||||
this["Dialog"] = null;
|
|
||||||
}
|
|
||||||
if (!("Event" in $$source)) {
|
|
||||||
this["Event"] = null;
|
|
||||||
}
|
|
||||||
if (!("Menu" in $$source)) {
|
|
||||||
this["Menu"] = null;
|
|
||||||
}
|
|
||||||
if (!("Screen" in $$source)) {
|
|
||||||
this["Screen"] = null;
|
|
||||||
}
|
|
||||||
if (!("Clipboard" in $$source)) {
|
|
||||||
this["Clipboard"] = null;
|
|
||||||
}
|
|
||||||
if (!("SystemTray" in $$source)) {
|
|
||||||
this["SystemTray"] = null;
|
|
||||||
}
|
|
||||||
if (!("Logger" in $$source)) {
|
|
||||||
this["Logger"] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new App instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): App {
|
|
||||||
const $$createField0_0 = $$createType1;
|
|
||||||
const $$createField1_0 = $$createType3;
|
|
||||||
const $$createField2_0 = $$createType5;
|
|
||||||
const $$createField3_0 = $$createType7;
|
|
||||||
const $$createField4_0 = $$createType9;
|
|
||||||
const $$createField5_0 = $$createType11;
|
|
||||||
const $$createField6_0 = $$createType13;
|
|
||||||
const $$createField7_0 = $$createType15;
|
|
||||||
const $$createField8_0 = $$createType17;
|
|
||||||
const $$createField9_0 = $$createType19;
|
|
||||||
const $$createField10_0 = $$createType21;
|
|
||||||
const $$createField11_0 = $$createType23;
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
if ("Window" in $$parsedSource) {
|
|
||||||
$$parsedSource["Window"] = $$createField0_0($$parsedSource["Window"]);
|
|
||||||
}
|
|
||||||
if ("ContextMenu" in $$parsedSource) {
|
|
||||||
$$parsedSource["ContextMenu"] = $$createField1_0($$parsedSource["ContextMenu"]);
|
|
||||||
}
|
|
||||||
if ("KeyBinding" in $$parsedSource) {
|
|
||||||
$$parsedSource["KeyBinding"] = $$createField2_0($$parsedSource["KeyBinding"]);
|
|
||||||
}
|
|
||||||
if ("Browser" in $$parsedSource) {
|
|
||||||
$$parsedSource["Browser"] = $$createField3_0($$parsedSource["Browser"]);
|
|
||||||
}
|
|
||||||
if ("Env" in $$parsedSource) {
|
|
||||||
$$parsedSource["Env"] = $$createField4_0($$parsedSource["Env"]);
|
|
||||||
}
|
|
||||||
if ("Dialog" in $$parsedSource) {
|
|
||||||
$$parsedSource["Dialog"] = $$createField5_0($$parsedSource["Dialog"]);
|
|
||||||
}
|
|
||||||
if ("Event" in $$parsedSource) {
|
|
||||||
$$parsedSource["Event"] = $$createField6_0($$parsedSource["Event"]);
|
|
||||||
}
|
|
||||||
if ("Menu" in $$parsedSource) {
|
|
||||||
$$parsedSource["Menu"] = $$createField7_0($$parsedSource["Menu"]);
|
|
||||||
}
|
|
||||||
if ("Screen" in $$parsedSource) {
|
|
||||||
$$parsedSource["Screen"] = $$createField8_0($$parsedSource["Screen"]);
|
|
||||||
}
|
|
||||||
if ("Clipboard" in $$parsedSource) {
|
|
||||||
$$parsedSource["Clipboard"] = $$createField9_0($$parsedSource["Clipboard"]);
|
|
||||||
}
|
|
||||||
if ("SystemTray" in $$parsedSource) {
|
|
||||||
$$parsedSource["SystemTray"] = $$createField10_0($$parsedSource["SystemTray"]);
|
|
||||||
}
|
|
||||||
if ("Logger" in $$parsedSource) {
|
|
||||||
$$parsedSource["Logger"] = $$createField11_0($$parsedSource["Logger"]);
|
|
||||||
}
|
|
||||||
return new App($$parsedSource as Partial<App>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* BrowserManager manages browser-related operations
|
|
||||||
*/
|
|
||||||
export class BrowserManager {
|
|
||||||
|
|
||||||
/** Creates a new BrowserManager instance. */
|
|
||||||
constructor($$source: Partial<BrowserManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new BrowserManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): BrowserManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new BrowserManager($$parsedSource as Partial<BrowserManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClipboardManager manages clipboard operations
|
|
||||||
*/
|
|
||||||
export class ClipboardManager {
|
|
||||||
|
|
||||||
/** Creates a new ClipboardManager instance. */
|
|
||||||
constructor($$source: Partial<ClipboardManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new ClipboardManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): ClipboardManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new ClipboardManager($$parsedSource as Partial<ClipboardManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ContextMenuManager manages all context menu operations
|
|
||||||
*/
|
|
||||||
export class ContextMenuManager {
|
|
||||||
|
|
||||||
/** Creates a new ContextMenuManager instance. */
|
|
||||||
constructor($$source: Partial<ContextMenuManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new ContextMenuManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): ContextMenuManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new ContextMenuManager($$parsedSource as Partial<ContextMenuManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DialogManager manages dialog-related operations
|
|
||||||
*/
|
|
||||||
export class DialogManager {
|
|
||||||
|
|
||||||
/** Creates a new DialogManager instance. */
|
|
||||||
constructor($$source: Partial<DialogManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new DialogManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): DialogManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new DialogManager($$parsedSource as Partial<DialogManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EnvironmentManager manages environment-related operations
|
|
||||||
*/
|
|
||||||
export class EnvironmentManager {
|
|
||||||
|
|
||||||
/** Creates a new EnvironmentManager instance. */
|
|
||||||
constructor($$source: Partial<EnvironmentManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new EnvironmentManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): EnvironmentManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new EnvironmentManager($$parsedSource as Partial<EnvironmentManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EventManager manages event-related operations
|
|
||||||
*/
|
|
||||||
export class EventManager {
|
|
||||||
|
|
||||||
/** Creates a new EventManager instance. */
|
|
||||||
constructor($$source: Partial<EventManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new EventManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): EventManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new EventManager($$parsedSource as Partial<EventManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* KeyBindingManager manages all key binding operations
|
|
||||||
*/
|
|
||||||
export class KeyBindingManager {
|
|
||||||
|
|
||||||
/** Creates a new KeyBindingManager instance. */
|
|
||||||
constructor($$source: Partial<KeyBindingManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new KeyBindingManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): KeyBindingManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new KeyBindingManager($$parsedSource as Partial<KeyBindingManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MenuManager manages menu-related operations
|
|
||||||
*/
|
|
||||||
export class MenuManager {
|
|
||||||
|
|
||||||
/** Creates a new MenuManager instance. */
|
|
||||||
constructor($$source: Partial<MenuManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new MenuManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): MenuManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new MenuManager($$parsedSource as Partial<MenuManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ScreenManager {
|
|
||||||
|
|
||||||
/** Creates a new ScreenManager instance. */
|
|
||||||
constructor($$source: Partial<ScreenManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new ScreenManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): ScreenManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new ScreenManager($$parsedSource as Partial<ScreenManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SystemTrayManager manages system tray-related operations
|
|
||||||
*/
|
|
||||||
export class SystemTrayManager {
|
|
||||||
|
|
||||||
/** Creates a new SystemTrayManager instance. */
|
|
||||||
constructor($$source: Partial<SystemTrayManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new SystemTrayManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): SystemTrayManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new SystemTrayManager($$parsedSource as Partial<SystemTrayManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WindowManager manages all window-related operations
|
|
||||||
*/
|
|
||||||
export class WindowManager {
|
|
||||||
|
|
||||||
/** Creates a new WindowManager instance. */
|
|
||||||
constructor($$source: Partial<WindowManager> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new WindowManager instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): WindowManager {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new WindowManager($$parsedSource as Partial<WindowManager>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Private type creation functions
|
|
||||||
const $$createType0 = WindowManager.createFrom;
|
|
||||||
const $$createType1 = $Create.Nullable($$createType0);
|
|
||||||
const $$createType2 = ContextMenuManager.createFrom;
|
|
||||||
const $$createType3 = $Create.Nullable($$createType2);
|
|
||||||
const $$createType4 = KeyBindingManager.createFrom;
|
|
||||||
const $$createType5 = $Create.Nullable($$createType4);
|
|
||||||
const $$createType6 = BrowserManager.createFrom;
|
|
||||||
const $$createType7 = $Create.Nullable($$createType6);
|
|
||||||
const $$createType8 = EnvironmentManager.createFrom;
|
|
||||||
const $$createType9 = $Create.Nullable($$createType8);
|
|
||||||
const $$createType10 = DialogManager.createFrom;
|
|
||||||
const $$createType11 = $Create.Nullable($$createType10);
|
|
||||||
const $$createType12 = EventManager.createFrom;
|
|
||||||
const $$createType13 = $Create.Nullable($$createType12);
|
|
||||||
const $$createType14 = MenuManager.createFrom;
|
|
||||||
const $$createType15 = $Create.Nullable($$createType14);
|
|
||||||
const $$createType16 = ScreenManager.createFrom;
|
|
||||||
const $$createType17 = $Create.Nullable($$createType16);
|
|
||||||
const $$createType18 = ClipboardManager.createFrom;
|
|
||||||
const $$createType19 = $Create.Nullable($$createType18);
|
|
||||||
const $$createType20 = SystemTrayManager.createFrom;
|
|
||||||
const $$createType21 = $Create.Nullable($$createType20);
|
|
||||||
const $$createType22 = slog$0.Logger.createFrom;
|
|
||||||
const $$createType23 = $Create.Nullable($$createType22);
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
export {
|
|
||||||
Logger
|
|
||||||
} from "./models.js";
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
||||||
// This file is automatically generated. DO NOT EDIT
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import { Create as $Create } from "@wailsio/runtime";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A Logger records structured information about each call to its
|
|
||||||
* Log, Debug, Info, Warn, and Error methods.
|
|
||||||
* For each call, it creates a [Record] and passes it to a [Handler].
|
|
||||||
*
|
|
||||||
* To create a new Logger, call [New] or a Logger method
|
|
||||||
* that begins "With".
|
|
||||||
*/
|
|
||||||
export class Logger {
|
|
||||||
|
|
||||||
/** Creates a new Logger instance. */
|
|
||||||
constructor($$source: Partial<Logger> = {}) {
|
|
||||||
|
|
||||||
Object.assign(this, $$source);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new Logger instance from a string or object.
|
|
||||||
*/
|
|
||||||
static createFrom($$source: any = {}): Logger {
|
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
||||||
return new Logger($$parsedSource as Partial<Logger>);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+21
@@ -99,3 +99,24 @@
|
|||||||
- `npm install` 仍报告 3 个 moderate audit findings。
|
- `npm install` 仍报告 3 个 moderate audit findings。
|
||||||
- 前端构建仍提示 Browserslist 数据过期。
|
- 前端构建仍提示 Browserslist 数据过期。
|
||||||
- Vite 仍提示生产 chunk 大于 500 kB。
|
- Vite 仍提示生产 chunk 大于 500 kB。
|
||||||
|
|
||||||
|
### 添加 Windows Wails 快捷脚本
|
||||||
|
|
||||||
|
- 任务:完成 `T-034`,新增一行 bat 脚本运行 Wails dev 和 build 命令。
|
||||||
|
- 结果:
|
||||||
|
- 新增 `dev.bat`,通过 `go env GOPATH` 把 Go bin 加入当前进程 PATH 并运行 `wails3 dev`。
|
||||||
|
- 新增 `build.bat`,通过 `go env GOPATH` 把 Go bin 加入当前进程 PATH 并运行 `wails3 build`。
|
||||||
|
- 补齐 `build/windows/wails.exe.manifest` 和 `build/windows/info.json`,满足 Windows syso 生成步骤。
|
||||||
|
- `wails3 build` 按当前 CLI 重新生成 `frontend/bindings`,当前绑定文件形态为 `.js`。
|
||||||
|
- 更新 README、技术栈、API、当前状态和任务看板。
|
||||||
|
- 验证:
|
||||||
|
- `wails3.exe version` 通过,版本为 `v3.0.0-alpha.9`。
|
||||||
|
- 使用 bat 中同样 PATH 逻辑执行 `wails3 dev -help` 通过。
|
||||||
|
- `cmd /c build.bat` 通过。
|
||||||
|
- `.\init.ps1` 通过。
|
||||||
|
- `git diff --check` 通过。
|
||||||
|
- 非阻塞警告:
|
||||||
|
- `wails3 build` 提示 `wails3 build` 是 `wails3 task` 的 alias。
|
||||||
|
- `npm install` 仍报告 3 个 moderate audit findings。
|
||||||
|
- 前端构建仍提示 Browserslist 数据过期。
|
||||||
|
- Vite 仍提示生产 chunk 大于 500 kB。
|
||||||
|
|||||||
Reference in New Issue
Block a user