修复图标错误问题
This commit is contained in:
parent
324bdbd48f
commit
d2ce2b2c7b
@ -19,7 +19,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon --inspect --exec tsx src/app.ts",
|
"dev": "nodemon --inspect --exec tsx src/app.ts",
|
||||||
"dev:gui": "chcp 65001 && electronmon -r tsx scripts/main.ts",
|
"dev:gui": "electronmon -r tsx scripts/main.ts",
|
||||||
"lint": "tsc --noEmit",
|
"lint": "tsc --noEmit",
|
||||||
"build": "cross-env NODE_ENV=prod tsx scripts/build.ts",
|
"build": "cross-env NODE_ENV=prod tsx scripts/build.ts",
|
||||||
"pack": "electron-builder --dir",
|
"pack": "electron-builder --dir",
|
||||||
|
|||||||
@ -3,17 +3,21 @@ import path from "path";
|
|||||||
import startServe, { closeServe } from "src/app";
|
import startServe, { closeServe } from "src/app";
|
||||||
|
|
||||||
function createMainWindow(): void {
|
function createMainWindow(): void {
|
||||||
|
const isDev = process.env.NODE_ENV === "dev" || !app.isPackaged;
|
||||||
|
const basePath = isDev ? process.cwd() : app.getAppPath();
|
||||||
|
|
||||||
const win = new BrowserWindow({
|
const win = new BrowserWindow({
|
||||||
width: 900,
|
width: 900,
|
||||||
height: 600,
|
height: 600,
|
||||||
show: true,
|
show: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
|
icon: path.join(
|
||||||
|
basePath,
|
||||||
|
"scripts",
|
||||||
|
process.platform === "win32" ? "logo.ico" : "logo.png"
|
||||||
|
),
|
||||||
});
|
});
|
||||||
// 开发环境和生产环境使用不同的路径
|
const htmlPath = path.join(basePath, "scripts", "web", "index.html");
|
||||||
const isDev = process.env.NODE_ENV === "dev" || !app.isPackaged;
|
|
||||||
const htmlPath = isDev
|
|
||||||
? path.join(process.cwd(), "scripts", "web", "index.html")
|
|
||||||
: path.join(app.getAppPath(), "scripts", "web", "index.html");
|
|
||||||
void win.loadFile(htmlPath);
|
void win.loadFile(htmlPath);
|
||||||
}
|
}
|
||||||
app.whenReady().then(async () => {
|
app.whenReady().then(async () => {
|
||||||
|
|||||||
18
src/types/database.d.ts
vendored
18
src/types/database.d.ts
vendored
@ -1,6 +1,19 @@
|
|||||||
// @db-hash 5c43bd41685a3d64e4043b3ceca985e8
|
// @db-hash 5a633f2d45df5d971905dd32c0ac9880
|
||||||
//该文件由脚本自动生成,请勿手动修改
|
//该文件由脚本自动生成,请勿手动修改
|
||||||
|
|
||||||
|
export interface _t_video_old_20260131 {
|
||||||
|
'configId'?: number | null;
|
||||||
|
'filePath'?: string | null;
|
||||||
|
'firstFrame'?: string | null;
|
||||||
|
'id'?: number;
|
||||||
|
'model'?: string | null;
|
||||||
|
'prompt'?: string | null;
|
||||||
|
'resolution'?: string | null;
|
||||||
|
'scriptId'?: number | null;
|
||||||
|
'state'?: number | null;
|
||||||
|
'storyboardImgs'?: string | null;
|
||||||
|
'time'?: number | null;
|
||||||
|
}
|
||||||
export interface t_aiModelMap {
|
export interface t_aiModelMap {
|
||||||
'configId'?: number | null;
|
'configId'?: number | null;
|
||||||
'id'?: number;
|
'id'?: number;
|
||||||
@ -39,6 +52,7 @@ export interface t_config {
|
|||||||
'manufacturer'?: string | null;
|
'manufacturer'?: string | null;
|
||||||
'model'?: string | null;
|
'model'?: string | null;
|
||||||
'modelType'?: string | null;
|
'modelType'?: string | null;
|
||||||
|
'name'?: string | null;
|
||||||
'type'?: string | null;
|
'type'?: string | null;
|
||||||
'userId'?: number | null;
|
'userId'?: number | null;
|
||||||
}
|
}
|
||||||
@ -137,7 +151,6 @@ export interface t_video {
|
|||||||
'time'?: number | null;
|
'time'?: number | null;
|
||||||
}
|
}
|
||||||
export interface t_videoConfig {
|
export interface t_videoConfig {
|
||||||
'aiConfigId'?: number | null;
|
|
||||||
'audioEnabled'?: number | null;
|
'audioEnabled'?: number | null;
|
||||||
'createTime'?: number | null;
|
'createTime'?: number | null;
|
||||||
'duration'?: number | null;
|
'duration'?: number | null;
|
||||||
@ -157,6 +170,7 @@ export interface t_videoConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DB {
|
export interface DB {
|
||||||
|
"_t_video_old_20260131": _t_video_old_20260131;
|
||||||
"t_aiModelMap": t_aiModelMap;
|
"t_aiModelMap": t_aiModelMap;
|
||||||
"t_assets": t_assets;
|
"t_assets": t_assets;
|
||||||
"t_chatHistory": t_chatHistory;
|
"t_chatHistory": t_chatHistory;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user