V2.2.4 版本

This commit is contained in:
2024-05-24 13:46:19 +08:00
parent 74009113fa
commit 17709c1a0b
57 changed files with 4484 additions and 2338 deletions
+3
View File
@@ -39,6 +39,9 @@ export const ClipSetting = {
}, {
label: "缩放",
value: "KFTypeScale"
}, {
label: "随机",
value: "KFTypeRandom"
}]
}
},
+23
View File
@@ -1,6 +1,9 @@
import { get } from "lodash";
import { define } from "../define";
let fspromises = require("fs").promises;
import { Tools } from "../../main/tools";
import { errorMessage } from "../../main/generalTools";
let tools = new Tools();
// Create a shared object
export const SdSettingDefine = {
@@ -42,6 +45,26 @@ export const SdSettingDefine = {
return get(setting, "webui", null);
} else
return get(setting.webui, property, null);
},
/**
* 保存一个大的属性添加到配置文件中
* @param {*} property
* @param {*} value
*/
SavePropertyValue: async function (property, value) {
try {
global.fileQueue.enqueue(async () => {
// 复制文件到指定的文件夹
await tools.writeJsonFilePropertyValue(define.sd_setting, property, value);
})
} catch (error) {
throw error;
}
}
};