mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-22 19:10:53 +08:00
图鉴设置增加显示
This commit is contained in:
parent
42c817ff52
commit
31eee4c8ca
24
apps/Note.js
24
apps/Note.js
@ -412,7 +412,11 @@ export async function Note_appoint(e) {
|
|||||||
let type = 0;
|
let type = 0;
|
||||||
if (msg.includes("列表")) {
|
if (msg.includes("列表")) {
|
||||||
let isUser= msg.includes('我的')
|
let isUser= msg.includes('我的')
|
||||||
let temp =tempData[e.user_id]["temp"];
|
let temp =tempData[e.user_id]?.temp;
|
||||||
|
if(!temp&&isUser){
|
||||||
|
e.reply("未获取到您设置的模板信息哦~")
|
||||||
|
return true;
|
||||||
|
}
|
||||||
let xlmsg = msg.replace(/列表|我的/g, "") * 1 || 1
|
let xlmsg = msg.replace(/列表|我的/g, "") * 1 || 1
|
||||||
let listLength=isUser?temp.length:keyType.length
|
let listLength=isUser?temp.length:keyType.length
|
||||||
let sumCount = (listLength / 80 + 0.49).toFixed(0);
|
let sumCount = (listLength / 80 + 0.49).toFixed(0);
|
||||||
@ -501,25 +505,27 @@ const note_file = function(xiaoyao) {
|
|||||||
let url2 = `./plugins/xiaoyao-cvs-plugin/resources/BJT-Templet/` //冤种情况。。
|
let url2 = `./plugins/xiaoyao-cvs-plugin/resources/BJT-Templet/` //冤种情况。。
|
||||||
let url3 = `./plugins/xiaoyao-cvs-plugin/resources/dailyNote/background_image/`
|
let url3 = `./plugins/xiaoyao-cvs-plugin/resources/dailyNote/background_image/`
|
||||||
var urlFile = fs.readdirSync(url1);
|
var urlFile = fs.readdirSync(url1);
|
||||||
var bJTurlFile = fs.readdirSync(url2);
|
|
||||||
var urlType = {};
|
var urlType = {};
|
||||||
for (let val of urlFile) {
|
for (let val of urlFile) {
|
||||||
if (val.includes(".")) continue;
|
if (val.includes(".")) continue;
|
||||||
urlType[val] = url1 + val
|
urlType[val] = url1 + val
|
||||||
}
|
}
|
||||||
for (let val of bJTurlFile) {
|
if (fs.existsSync(url2)) {
|
||||||
if (!val.includes("Template")) continue;
|
var bJTurlFile = fs.readdirSync(url2);
|
||||||
let file = fs.readdirSync(`${url2}${val}`);
|
for (let val of bJTurlFile) {
|
||||||
for (let va of file) {
|
if (!val.includes("Template")) continue;
|
||||||
if (va.includes(".")) continue;
|
let file = fs.readdirSync(`${url2}${val}`);
|
||||||
urlType[va] = url2 + val + "/" + va
|
for (let va of file) {
|
||||||
|
if (va.includes(".")) continue;
|
||||||
|
urlType[va] = url2 + val + "/" + va
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!xiaoyao) {
|
if (!xiaoyao) {
|
||||||
var urlFileOne = fs.readdirSync(url3);
|
var urlFileOne = fs.readdirSync(url3);
|
||||||
for (let val of urlFileOne) {
|
for (let val of urlFileOne) {
|
||||||
if (!val.includes(".")) continue;
|
if (!val.includes(".")) continue;
|
||||||
urlType[val] = url3 + "background_image/" + val
|
urlType[val] = url3 + val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return urlType;
|
return urlType;
|
||||||
|
@ -53,7 +53,7 @@ export const rule = {
|
|||||||
const _path = process.cwd();
|
const _path = process.cwd();
|
||||||
const resPath = `${_path}/plugins/xiaoyao-cvs-plugin/resources/`;
|
const resPath = `${_path}/plugins/xiaoyao-cvs-plugin/resources/`;
|
||||||
const plusPath = `${resPath}/xiaoyao-plus/`;
|
const plusPath = `${resPath}/xiaoyao-plus/`;
|
||||||
|
const notePlus=`${resPath}/BJT-Templet/`;
|
||||||
export async function sysCfg(e, {
|
export async function sysCfg(e, {
|
||||||
render
|
render
|
||||||
}) {
|
}) {
|
||||||
@ -92,8 +92,9 @@ export async function sysCfg(e, {
|
|||||||
Note: getStatus("sys.Note",false),
|
Note: getStatus("sys.Note",false),
|
||||||
Atlas: getStatus("sys.Atlas",false),
|
Atlas: getStatus("sys.Atlas",false),
|
||||||
len:Cfg.get("mb.len", 0),
|
len:Cfg.get("mb.len", 0),
|
||||||
poke: getStatus("note.poke",false),
|
poke: getStatus("note.poke",false),
|
||||||
imgPlus: fs.existsSync(plusPath),
|
imgPlus: fs.existsSync(plusPath),
|
||||||
|
notePlus: fs.existsSync(notePlus),
|
||||||
bg: await rodom(), //获取底图
|
bg: await rodom(), //获取底图
|
||||||
Atlasall:getStatus("Atlas.all",false),
|
Atlasall:getStatus("Atlas.all",false),
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="cfg-box">
|
<div class="cfg-box">
|
||||||
<div class="cfg-group">角色资料与信息查询</div>
|
<div class="cfg-group">图鉴扩展包</div>
|
||||||
<ul class="cfg-ul">
|
<ul class="cfg-ul">
|
||||||
<li class="cfg-li">
|
<li class="cfg-li">
|
||||||
<div class="cfg-line">
|
<div class="cfg-line">
|
||||||
@ -86,6 +86,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="cfg-desc">角色图片的扩展包,包含更多的角色图片</div>
|
<div class="cfg-desc">角色图片的扩展包,包含更多的角色图片</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="cfg-li">
|
||||||
|
<div class="cfg-line">
|
||||||
|
体力模板扩展包
|
||||||
|
<span class="cfg-hint"> #图鉴模板更新</span>
|
||||||
|
{{if notePlus}}
|
||||||
|
<div class="cfg-status">已安装</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="cfg-status status-off">未安装</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="cfg-desc">体力模板的扩展包,包含更多的体力模板</div>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="cfg-box">
|
<div class="cfg-box">
|
||||||
|
Loading…
Reference in New Issue
Block a user