refresh面板

This commit is contained in:
ZyeAlex 2024-07-18 00:50:01 +08:00
parent 47e28f78ba
commit ea566684b5
12 changed files with 417 additions and 11 deletions

View file

@ -48,18 +48,20 @@ export class Panel extends ZZZPlugin {
await this.reply('面板列表刷新失败,请稍后再试');
return;
}
const newChar = result.filter(item => item.isNew);
let str = '面板列表获取成功,本次共刷新了' + newChar.length + '个角色:\n';
for (const item of result) {
str += item.name_mi18n + (item.isNew ? '(新)' : '') + '、';
const newChar = result.filter((item) => item.isNew);
// let str = '面板列表获取成功,本次共刷新了' + newChar.length + '个角色:\n'
// for (const item of result) {
// str += item.name_mi18n + (item.isNew ? '(新)' : '') + '、'
// }
// str = str.slice(0, -1)
// str += '\n总计' + result.length + '个角色'
// await this.reply(str)
const finalData = {
uid: uid,
newChar: newChar.length,
list: result,
}
str = str.slice(0, -1);
str += '\n总计' + result.length + '个角色';
await this.reply(str);
// const finalData = {
// list: noteData,
// };
// await render(this.e, 'panel/refresh.html', finalData);
await render(this.e, 'panel/refresh.html', finalData);
}
async getCharPanelList() {
const uid = await this.getUID();