diff --git a/apps/help.js b/apps/help.js index 2633fd29..a4122d4f 100644 --- a/apps/help.js +++ b/apps/help.js @@ -16,8 +16,14 @@ export async function help(e, { render }) { helpFile = await import(`file://${helpFilePath}?version=${new Date().getTime()}`); const { helpCfg } = helpFile; + let helpGroup = []; lodash.forEach(helpCfg, (group) => { + if (group.auth && group.auth === "master" && !e.isMaster) { + return; + } + + lodash.forEach(group.list, (help) => { let icon = help.icon * 1; if (!icon) { @@ -27,12 +33,14 @@ export async function help(e, { render }) { help.css = `background-position:-${x * 50}px -${y * 50}px`; } - }) + }); + + helpGroup.push(group); }); let base64 = await render("help", "index", { - helpCfg, - cfgScale: Cfg.scale(1) + helpCfg: helpGroup, + cfgScale: Cfg.scale(1.05) }, "png"); if (base64) { e.reply(segment.image(`base64://${base64}`)); diff --git a/resources/help/bg.jpg b/resources/common/theme/bg-01.jpg similarity index 100% rename from resources/help/bg.jpg rename to resources/common/theme/bg-01.jpg diff --git a/resources/help/header.png b/resources/common/theme/main-01.png similarity index 100% rename from resources/help/header.png rename to resources/common/theme/main-01.png diff --git a/resources/help/header.jpg b/resources/help/header.jpg deleted file mode 100644 index d56f0185..00000000 Binary files a/resources/help/header.jpg and /dev/null differ diff --git a/resources/help/help-list.js b/resources/help/help-list.js index aede6f1c..de203ff5 100644 --- a/resources/help/help-list.js +++ b/resources/help/help-list.js @@ -32,10 +32,6 @@ export const helpCfg = [{ icon: 15, title: "#体力 #体力帮助", desc: "查询体力,绑定Cookie帮助" - }, { - icon: 86, - title: "#签到", - desc: "米游社原神签到" }, { icon: 5, title: "#原石 #原石统计", @@ -48,12 +44,16 @@ export const helpCfg = [{ icon: 22, title: "#我的ck #删除ck", desc: "查看绑定的cookie 删除cookie" + }, { + icon: 86, + title: "#签到", + desc: "米游社原神签到" }] }, { group: "喵喵扩展 Miao-Plugin", list: [{ icon: 60, - title: "#老婆 #老婆设置心海,雷神", + title: "#老婆 #老婆设置心海,雷神", desc: "设置老婆,查看老婆信息卡片" }, { icon: 88, @@ -67,14 +67,6 @@ export const helpCfg = [{ icon: 56, title: "#角色持有率 #深渊出场率", desc: "查看角色的持有率及深渊出场率信息" - }, { - icon: 32, - title: "#喵喵设置", - desc: "管理员可用:配置喵喵功能" - }, { - icon: 35, - title: "#喵喵更新素材", - desc: "管理员可用:更新增量图像素材包" }] }, { group: "其他查询指令", @@ -108,10 +100,19 @@ export const helpCfg = [{ desc: "其他命令" }] }, { - group: "管理命令", + group: "管理命令,仅管理员可用", + auth: "master", list: [{ icon: 85, title: "#用户统计", desc: "查看用户CK-UID列表" + }, { + icon: 32, + title: "#喵喵设置", + desc: "配置喵喵功能" + }, { + icon: 35, + title: "#喵喵更新图像", + desc: "更新喵喵的增量角色图像素材" }] }]; \ No newline at end of file diff --git a/resources/help/index.css b/resources/help/index.css index 7f38806f..e0524152 100644 --- a/resources/help/index.css +++ b/resources/help/index.css @@ -1,13 +1,13 @@ body { transform: scale(1); - width: 600px; - background: url("bg.jpg"); + width: 800px; + background: url("../common/theme/bg-01.jpg"); } .container { - background: url(header.png) top left no-repeat; + background: url(../common/theme/main-01.png) top left no-repeat; background-size: 100% auto; - width: 600px; + width: 800px; } .label { @@ -65,7 +65,7 @@ body { padding: 12px 0 12px 50px; line-height: 24px; position: relative; - width: 50%; + width: 33.33%; text-align: left; } diff --git a/resources/help/index.html b/resources/help/index.html index 98107646..599443c9 100644 --- a/resources/help/index.html +++ b/resources/help/index.html @@ -20,7 +20,7 @@