云崽名从package读取

This commit is contained in:
小花花花儿 2024-01-25 00:56:49 +08:00
parent 08b2773a9f
commit 12e280b38c
12 changed files with 37 additions and 16 deletions

View File

@ -1,5 +1,6 @@
import fs from 'node:fs'
import _ from 'lodash'
import cfg from '../../../lib/config/config.js'
import { Common, Version } from '#miao'
import { Character } from '#miao.models'
@ -31,10 +32,21 @@ export default class base {
*/
get screenData() {
const layoutPath = process.cwd() + '/plugins/genshin/resources/html/layout/'
let yunzaiName = cfg.package.name
if (yunzaiName == 'miao-yunzai') {
yunzaiName = 'Miao-Yunzai'
} else if (yunzaiName == 'yunzai') {
yunzaiName = 'Yunzai-Bot'
} else if (yunzaiName == 'trss-yunzai') {
yunzaiName = 'TRSS-Yunzai'
} else {
yunzaiName = _.capitalize(yunzaiName)
}
let data = {
saveId: this.userId,
cwd: this._path,
yzVersion: `v${Version.yunzai}`,
yzName: yunzaiName,
genshinLayout: layoutPath + 'genshin.html',
defaultLayout: layoutPath + 'default.html'
}

View File

@ -63,14 +63,23 @@ export default class ExportLog extends base {
if (!this.uid) return false
let list = this.getAllList().list
let yunzaiName = cfg.package.name
if (yunzaiName == 'miao-yunzai') {
yunzaiName = 'Miao-Yunzai'
} else if (yunzaiName == 'yunzai') {
yunzaiName = 'Yunzai-Bot'
} else if (yunzaiName == 'trss-yunzai') {
yunzaiName = 'TRSS-Yunzai'
} else {
yunzaiName = _.capitalize(yunzaiName)
}
let data = {
info: {
uid: this.uid,
lang: list[0].lang,
export_time: moment().format('YYYY-MM-DD HH:mm:ss'),
export_timestamp: moment().format('X'),
export_app: 'Miao-Yunzai',
export_app: yunzaiName,
export_app_version: cfg.package.version,
},
list

View File

@ -42,7 +42,7 @@
</div>
</div>
<div class="logo">详情内容使用【#{{game}}{{typeName}}】加上序号查看,如【#{{game}}{{typeName}}2】</div>
<div class="logo">Created By Miao-Yunzai</div>
<div class="logo">Created By {{yzName}}</div>
</div>
</div>
</body>

View File

@ -120,7 +120,7 @@
</div>
</div>
</div>
<!-- <div class="logo">Created By Miao-Yunzai</div> -->
<!-- <div class="logo">Created By {{yzName}}</div> -->
</div>
</body>
<script type="text/javascript" src="{{pluResPath.replace('StarRail/', '')}}script/qrcode.min.js"></script>

View File

@ -77,7 +77,7 @@
<li><span>#删除无效用户</span>: 删除当前所有请求失效的用户的CK数据暂不会删除公共CK</li>
</ul>
</div>
<div class="copyright">Created By Miao-Yunzai</div>
<div class="copyright">Created By {{yzName}}</div>
</div>
</body>
</html>

View File

@ -77,7 +77,7 @@
</div>
</div>
<div class="logo">Created By Miao-Yunzai</div>
<div class="logo">Created By {{yzName}}</div>
</div>
</body>

View File

@ -115,7 +115,7 @@
<div class="logo">左下角为使用次数,仅展示已有行动牌</div>
</div>
{{/if}}
<div class="logo">Created By Miao-Yunzai</div>
<div class="logo">Created By {{yzName}}</div>
</div>
</body>

View File

@ -50,7 +50,7 @@
</div>
</div>
{{/each}}
<div class="logo">Created By Miao-Yunzai</div>
<div class="logo">Created By {{yzName}}</div>
</div>
</body>

View File

@ -18,7 +18,7 @@
<body class="body_box">
<div class="container" id="container">
{{block 'main'}}{{/block}}
<div class="logo">Created By Miao-Yunzai {{yzVersion}}</div>
<div class="logo">Created By {{yzName}} {{yzVersion}}</div>
</div>
</body>
</html>

View File

@ -42,7 +42,7 @@
</div>
</div>
<div class="logo">详情内容使用【#{{game}}{{typeName}}】加上序号查看,如【#{{game}}{{typeName}}2】</div>
<div class="logo">Created By Miao-Yunzai</div>
<div class="logo">Created By {{yzName}}</div>
</div>
</div>
</body>

View File

@ -120,7 +120,7 @@
</div>
</div>
</div>
<!-- <div class="logo">Created By Miao-Yunzai</div> -->
<!-- <div class="logo">Created By {{yzName}}</div> -->
</div>
</body>
<script type="text/javascript" src="{{pluResPath}}script/qrcode.min.js"></script>

View File

@ -52,7 +52,7 @@
<div class="tab_lable">详细统计</div>
<div id="chartContainer2"></div>
</div>
<div class="logo">Created By Miao-Yunzai & seven-plugin</div>
<div class="logo">Created By {{yzName}} & seven-plugin</div>
</div>
</body>