diff --git a/CHANGELOG.md b/CHANGELOG.md index 969cac6..cb116da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# 0.1 +* 刷新角色面板图片版 +* 优化指令分配 +* 添加版本信息 + +# 0.05 +* 支持查看角色面板,发送 `%角色名/别名+面板` +* 修复一些问题 + +# 0.04 +* 支持获取抽卡链接,发送 `%获取抽卡链接` +* 支持面板刷新,发送 `%刷新面板` + # 0.0.3 * 支持抽卡刷新,发送 `#zzz刷新抽卡链接` 或 `%刷新抽卡链接` diff --git a/apps/panel.js b/apps/panel.js index 2d2aef3..7e0c480 100644 --- a/apps/panel.js +++ b/apps/panel.js @@ -62,10 +62,6 @@ export class Panel extends ZZZPlugin { const uid = await this.getUID(); if (!uid) return false; const result = getPanelList(uid); - if (!result) { - await this.reply('未找到面板列表,请先刷新面板'); - return false; - } await this.getPlayerInfo(); const timer = setTimeout(() => { if (this?.reply) { diff --git a/lib/render.js b/lib/render.js index 662607b..b53b015 100644 --- a/lib/render.js +++ b/lib/render.js @@ -73,7 +73,7 @@ const render = (e, renderPath, renderData = {}, cfg = {}) => { // 版权信息 copyright: `Created By ${version.name}${version.yunzai} & ${pluginName}${version.version}`, // 版权信息(简化版) - createdby: `Created By ${pluginName} & Powered By ZZZure`, + createdby: `Created By
${pluginName}
${version.version}
& Powered By
ZZZure
`, }, quality: 100, }; diff --git a/resources/common/layout/index.css b/resources/common/layout/index.css index 2dcefb0..acdba53 100644 --- a/resources/common/layout/index.css +++ b/resources/common/layout/index.css @@ -18,13 +18,29 @@ body { } .copyright { - text-align: center; font-size: 0.7em; color: #797979; padding-bottom: 2em; + display: flex; + justify-content: center; + align-items: center; + gap: 0.3em; } .copyright .highlight { color: #fff; + position: relative; +} +.copyright .with-version { + padding-right: 1.8em; +} +.copyright .with-version .version { + padding: 0.1em 0.3em; + border-radius: 0.2em; + font-size: 0.8em; + color: #fff; + position: absolute; + top: -0.5em; + right: -0.5em; } /*# sourceMappingURL=index.css.map */ diff --git a/resources/common/layout/index.scss b/resources/common/layout/index.scss index 7d0830f..a451807 100644 --- a/resources/common/layout/index.scss +++ b/resources/common/layout/index.scss @@ -21,11 +21,28 @@ body { } .copyright { - text-align: center; font-size: 0.7em; color: #797979; padding-bottom: 2em; + display: flex; + justify-content: center; + align-items: center; + gap: 0.3em; .highlight { color: #fff; + position: relative; + } + .with-version { + padding-right: 1.8em; + .version { + // background-color: #3f3f3f; + padding: 0.1em 0.3em; + border-radius: 0.2em; + font-size: 0.8em; + color: #fff; + position: absolute; + top: -0.5em; + right: -0.5em; + } } } diff --git a/resources/panel/list.html b/resources/panel/list.html index 8a0622e..f52bab2 100644 --- a/resources/panel/list.html +++ b/resources/panel/list.html @@ -12,6 +12,9 @@
+ {{if list.length === 0}} +
暂无数据,请先刷新面板
+ {{/if}} {{each list item}}
@@ -30,4 +33,4 @@
{{/block}} - \ No newline at end of file + diff --git a/resources/panel/refresh.css b/resources/panel/refresh.css index df5e681..85caa6f 100644 --- a/resources/panel/refresh.css +++ b/resources/panel/refresh.css @@ -61,6 +61,13 @@ align-content: flex-start; padding: 0.4em 0.6em 0.5em; } +.panel > .list .empty { + color: white; + font-size: 0.8em; + text-align: center; + width: 100%; + padding-top: 0.6em; +} .panel > .list .item { display: flex; flex-direction: column; @@ -74,6 +81,15 @@ margin-bottom: 0.2em; position: relative; } +.panel > .list .item .icon .new { + position: absolute; + right: 0.2em; + top: 0.4em; + width: 0.5em; + height: 0.5em; + background-color: rgb(51, 235, 0); + border-radius: 50%; +} .panel > .list .item .icon img.streng { width: 3.5em; height: 3.5em; diff --git a/resources/panel/refresh.html b/resources/panel/refresh.html index f092c93..26323d0 100644 --- a/resources/panel/refresh.html +++ b/resources/panel/refresh.html @@ -12,9 +12,15 @@
+ {{if list.length === 0}} +
暂无数据,请确认查询正确
+ {{/if}} {{each list item}}
+ {{if item?.isNew}} +
+ {{/if}}
{{item.rank}} @@ -30,4 +36,4 @@
{{/block}} - \ No newline at end of file + diff --git a/resources/panel/refresh.scss b/resources/panel/refresh.scss index 52f8d6a..d04d3b8 100644 --- a/resources/panel/refresh.scss +++ b/resources/panel/refresh.scss @@ -60,7 +60,13 @@ flex-wrap: wrap; align-content: flex-start; padding: 0.4em 0.6em 0.5em; - + .empty { + color: white; + font-size: 0.8em; + text-align: center; + width: 100%; + padding-top: 0.6em; + } .item { display: flex; flex-direction: column; @@ -72,6 +78,15 @@ background: url('./images/avatar_box.png') center / contain no-repeat; margin-bottom: 0.2em; position: relative; + .new { + position: absolute; + right: 0.2em; + top: 0.4em; + width: 0.5em; + height: 0.5em; + background-color: rgb(51, 235, 0); + border-radius: 50%; + } img.streng { width: 3.5em; height: 3.5em;