2025-06-16 21:24:10 +08:00
|
|
|
const IPC_METHOD_BASE = "$aura.debug";
|
|
|
|
|
|
2025-06-17 00:16:43 +08:00
|
|
|
const path = require("path");
|
|
|
|
|
|
2025-06-16 21:24:10 +08:00
|
|
|
const debugSettings = [
|
|
|
|
|
{
|
|
|
|
|
id: 0,
|
|
|
|
|
categoryName: "日志与输出",
|
|
|
|
|
child: [
|
|
|
|
|
{
|
|
|
|
|
index: 0,
|
|
|
|
|
id: "openHugoAuraLogDir",
|
|
|
|
|
type: "button",
|
|
|
|
|
style: "outline",
|
|
|
|
|
name: "HugoAura 日志目录",
|
|
|
|
|
description: "",
|
|
|
|
|
restart: false,
|
|
|
|
|
reload: false,
|
|
|
|
|
associateVal: null,
|
|
|
|
|
auraIf: () => true,
|
|
|
|
|
buttonContent: "打开",
|
|
|
|
|
valueGetter: async () => {
|
2025-06-17 00:16:43 +08:00
|
|
|
if (
|
|
|
|
|
global.__HUGO_AURA__.auraDir &&
|
|
|
|
|
global.__HUGO_AURA__.auraDir !== ""
|
|
|
|
|
) {
|
|
|
|
|
return (
|
|
|
|
|
"目录位置: " + path.join(global.__HUGO_AURA__.auraDir, "logs")
|
|
|
|
|
);
|
2025-06-16 21:24:10 +08:00
|
|
|
} else {
|
|
|
|
|
return "未能获取日志目录位置";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
callbackFn: async (event) => {
|
|
|
|
|
const childProc = require("child_process");
|
2025-06-17 00:16:43 +08:00
|
|
|
childProc.spawn(`explorer.exe`, [
|
|
|
|
|
`${path.join(global.__HUGO_AURA__.auraDir, "logs")}`,
|
|
|
|
|
]);
|
2025-06-16 21:24:10 +08:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
module.exports = { debugSettings };
|