mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 06:58:24 +00:00
调整帮助界面的展示样式
This commit is contained in:
parent
962c9ce16f
commit
889a5bb317
14
apps/help.js
14
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}`));
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 743 KiB After Width: | Height: | Size: 743 KiB |
Binary file not shown.
Before Width: | Height: | Size: 266 KiB |
@ -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: "更新喵喵的增量角色图像素材"
|
||||
}]
|
||||
}];
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
<div class="help-group">{{helpGroup.group}}</div>
|
||||
<div class="help-table">
|
||||
{{each helpGroup.list help idx}}
|
||||
{{if idx%2 == 0}}
|
||||
{{if idx%3 == 0}}
|
||||
<div class="tr">
|
||||
{{/if}}
|
||||
<div class="td">
|
||||
@ -28,7 +28,7 @@
|
||||
<strong class="help-title">{{help.title}}</strong>
|
||||
<span class="help-desc">{{help.desc}}</span>
|
||||
</div>
|
||||
{{if idx%2 ==1 || idx == helpGroup.list.length -1}}
|
||||
{{if idx%3 ==2 || idx == helpGroup.list.length -1}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
Loading…
Reference in New Issue
Block a user