mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-21 14:38:30 +00:00
修正获取原图列表无法屏蔽的bug
This commit is contained in:
parent
822f619bf2
commit
3749002d1e
@ -14,11 +14,11 @@ Miao-Plugin 是一个 Yunzai-Bot 的升级插件,提供包括角色查询等
|
||||
|
||||
```
|
||||
// 使用gitee
|
||||
git clone https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
|
||||
git clone --depth=1 https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
|
||||
pnpm install -P
|
||||
|
||||
// 使用github
|
||||
git clone https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
|
||||
git clone --depth=1 https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
|
||||
pnpm install -P
|
||||
```
|
||||
|
||||
|
@ -208,6 +208,7 @@ export async function profileImgList (e) {
|
||||
}
|
||||
if ([1, 0].includes(Cfg.get('originalPic') * 1)) {
|
||||
e.reply('已禁止获取面板图列表')
|
||||
return true
|
||||
}
|
||||
let nickname = Bot.nickname
|
||||
if (e.isGroup) {
|
||||
|
@ -78,7 +78,7 @@ const ProfileChange = {
|
||||
type
|
||||
}
|
||||
})
|
||||
} else if (keyRet[4] !== '武器') {
|
||||
} else if (keyRet[4] !== '武器' && keyRet[4] !== '花') {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
import Cfg from './Cfg.js'
|
||||
import render from './common/Render.js'
|
||||
import Render from './common/Render.js'
|
||||
import { Version } from './index.js'
|
||||
import lodash from 'lodash'
|
||||
|
||||
const Common = {
|
||||
render,
|
||||
render: Render.render,
|
||||
cfg: Cfg.get,
|
||||
sleep (ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
|
@ -1,32 +1,36 @@
|
||||
import { Version } from '../index.js'
|
||||
import Cfg from '../Cfg.js'
|
||||
import { Version, Cfg } from '#miao'
|
||||
|
||||
export default async function (path, params, cfg) {
|
||||
let { e } = cfg
|
||||
if (!e.runtime) {
|
||||
console.log('未找到e.runtime,请升级至最新版Yunzai')
|
||||
}
|
||||
let BotName = Version.isMiao ? 'Miao-Yunzai' : 'Yunzai-Bot'
|
||||
return e.runtime.render('miao-plugin', path, params, {
|
||||
retType: cfg.retMsgId ? 'msgId' : 'default',
|
||||
beforeRender ({ data }) {
|
||||
let resPath = data.pluResPath
|
||||
const layoutPath = process.cwd() + '/plugins/miao-plugin/resources/common/layout/'
|
||||
return {
|
||||
...data,
|
||||
_res_path: resPath,
|
||||
_layout_path: layoutPath,
|
||||
_tpl_path: process.cwd() + '/plugins/miao-plugin/resources/common/tpl/',
|
||||
defaultLayout: layoutPath + 'default.html',
|
||||
elemLayout: layoutPath + 'elem.html',
|
||||
sys: {
|
||||
scale: Cfg.scale(cfg.scale || 1),
|
||||
copyright: `Created By ${BotName}<span class="version">${Version.yunzai}</span> & Miao-Plugin<span class="version">${Version.version}</span>`
|
||||
},
|
||||
pageGotoParams: {
|
||||
waitUntil: 'networkidle2'
|
||||
const Render = {
|
||||
async render (path, params, cfg) {
|
||||
let { e } = cfg
|
||||
if (!e.runtime) {
|
||||
console.log('未找到e.runtime,请升级至最新版Yunzai')
|
||||
}
|
||||
let BotName = Version.isMiao ? 'Miao-Yunzai' : 'Yunzai-Bot'
|
||||
return e.runtime.render('miao-plugin', path, params, {
|
||||
retType: cfg.retMsgId ? 'msgId' : 'default',
|
||||
beforeRender ({ data }) {
|
||||
let resPath = data.pluResPath
|
||||
const layoutPath = process.cwd() + '/plugins/miao-plugin/resources/common/layout/'
|
||||
return {
|
||||
...data,
|
||||
_res_path: resPath,
|
||||
_miao_path: resPath,
|
||||
_layout_path: layoutPath,
|
||||
_tpl_path: process.cwd() + '/plugins/miao-plugin/resources/common/tpl/',
|
||||
defaultLayout: layoutPath + 'default.html',
|
||||
elemLayout: layoutPath + 'elem.html',
|
||||
sys: {
|
||||
scale: Cfg.scale(cfg.scale || 1)
|
||||
},
|
||||
copyright: `Created By ${BotName}<span class="version">${Version.yunzai}</span> & Miao-Plugin<span class="version">${Version.version}</span>`,
|
||||
pageGotoParams: {
|
||||
waitUntil: 'networkidle2'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default Render
|
@ -76,7 +76,7 @@
|
||||
<div class="cont-title">角色列表</div>
|
||||
<div class="avatar-list">
|
||||
{{each avatars avatar idx}}
|
||||
<% include(_layout_path+'../tpl/avatar-card.html', [avatar,{_res_path, cardType:'mini'}]) %>
|
||||
<% include(_tpl_path+'/avatar-card.html', [avatar,{_res_path, cardType:'mini'}]) %>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="cont-footer cont-notice">
|
||||
|
@ -4,18 +4,18 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="shortcut icon" href="#"/>
|
||||
<link rel="preload" href="{{_res_path}}common/font/HYWH-65W.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_res_path}}common/font/NZBZ.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_res_path}}common/font/tttgbnumber.woff" as="font" type="font/woff">
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}common/common.css"/>
|
||||
<link rel="preload" href="{{_miao_path}}common/font/HYWH-65W.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_miao_path}}common/font/NZBZ.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_miao_path}}common/font/tttgbnumber.woff" as="font" type="font/woff">
|
||||
<link rel="stylesheet" type="text/css" href="{{_miao_path}}common/common.css"/>
|
||||
<title>miao-plugin</title>
|
||||
{{block 'css'}}
|
||||
{{/block}}
|
||||
</head>
|
||||
<body class="elem-{{element||elem||`hydro`}} {{displayMode || mode || `default`}}-mode {{bodyClass}}" {{sys.scale}}>
|
||||
<body class="elem-{{element||elem||`hydro`}} {{displayMode || mode || `default`}}-mode {{bodyClass}}" {{sys.scale}}>
|
||||
<div class="container" id="container">
|
||||
{{block 'main'}}{{/block}}
|
||||
<div class="copyright">{{@sys.copyright}}</div>
|
||||
<div class="copyright">{{@copyright || sys?.copyright}}</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -4,10 +4,10 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="shortcut icon" href="#"/>
|
||||
<link rel="preload" href="{{_res_path}}common/font/HYWH-65W.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_res_path}}common/font/NZBZ.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_res_path}}common/font/tttgbnumber.woff" as="font" type="font/woff">
|
||||
<link rel="stylesheet" type="text/css" href="{{_res_path}}common/common.css"/>
|
||||
<link rel="preload" href="{{_miao_path}}common/font/HYWH-65W.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_miao_path}}common/font/NZBZ.woff" as="font" type="font/woff">
|
||||
<link rel="preload" href="{{_miao_path}}common/font/tttgbnumber.woff" as="font" type="font/woff">
|
||||
<link rel="stylesheet" type="text/css" href="{{_miao_path}}common/common.css"/>
|
||||
<title>miao-plugin</title>
|
||||
{{block 'css'}}
|
||||
{{/block}}
|
||||
@ -15,7 +15,7 @@
|
||||
<body class="elem-{{element||elem||`hydro`}} {{displayMode || mode || `default`}}-mode {{bodyClass}}" {{sys.scale}}>
|
||||
<div class="container elem-bg" id="container">
|
||||
{{block 'main'}}{{/block}}
|
||||
<div class="copyright">{{@sys.copyright}}</div>
|
||||
<div class="copyright">{{@copyright || sys?.copyright}}</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -58,7 +58,7 @@
|
||||
<div class="abyss-team">
|
||||
{{set ds=floor?.display?.up?.avatars||[] }}
|
||||
{{each ds id idx}}
|
||||
<% include(_layout_path+'../tpl/avatar-card.html', [avatars[id],{_res_path, cardType:cardTypes[ds.length][idx]}]) %>
|
||||
<% include(_tpl_path+'/avatar-card.html', [avatars[id],{_res_path, cardType:cardTypes[ds.length][idx]}]) %>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user