V2.2.4 版本
This commit is contained in:
@@ -39,6 +39,9 @@ export const ClipSetting = {
|
||||
}, {
|
||||
label: "缩放",
|
||||
value: "KFTypeScale"
|
||||
}, {
|
||||
label: "随机",
|
||||
value: "KFTypeRandom"
|
||||
}]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user