V 2.2.10 新增MJ的代理模式

This commit is contained in:
2024-06-24 13:11:19 +08:00
parent 79a1929e79
commit bac97bc41c
102 changed files with 6374 additions and 1172 deletions
+5 -5
View File
@@ -13,9 +13,10 @@ import { func } from './func.js'
import { AsyncQueue } from "./quene.js"
import { DEFINE_STRING } from '../define/define_string.js'
import { Tools } from './tools.js'
import { ImageGenerate } from './backPrompt/imageGenerate.js'
import { ImageGenerate } from './ReverseManage/imageGenerate.js'
import { Setting } from './setting/setting.js'
import { has, isEmpty } from 'lodash'
import { AutoSyncMJConfig2210 } from './setting/autoSync.js'
// ipc
import { DiscordIpc, RemoveDiscordIpc } from './IPCEvent/discordIpc.js'
@@ -33,7 +34,6 @@ async function InitData(gl) {
gl.config = res;
gl.requestQuene = new AsyncQueue(gl, res.task_number);
gl.fileQueue = new AsyncQueue(gl, 1);
gl.logger = new Logger(define.logger_path);
return res;
}
@@ -148,7 +148,9 @@ app.whenReady().then(async () => {
optimizer.watchWindowShortcuts(window)
})
//
global.logger = new Logger(define.logger_path);
// 同步数据
await AutoSyncMJConfig2210();
global.newWindow = [];
mainWindow = createWindow('ShowMessage', null)
@@ -399,8 +401,6 @@ ipcMain.handle(DEFINE_STRING.GET_PERMISSION, async (event) => {
}
})
// 试用文件资源打开指定的文件夹
ipcMain.on(DEFINE_STRING.OPEN_FOLDER, (event, value) => shell.openPath(path.join(global.config.project_path, "tmp/" + value)));
// 监听字幕的保存
ipcMain.handle(DEFINE_STRING.SAVE_NEW_WORD, async (event, value) => {