🐞 fix: 修复部分问题

1. 强制更新无法强制问题
2. 帮助页面无法显示版本号
This commit is contained in:
zhiyu1998 2023-03-12 00:39:27 +08:00
parent 5d3aec4326
commit 6e4a175d3a
4 changed files with 68 additions and 54 deletions

View File

@ -57,11 +57,9 @@ export class update extends plugin {
const pluginName = "rconsole-plugin";
let command = "";
let command = `git -C ./plugins/${pluginName}/ pull --no-rebase`;
if (isForce) {
command = `git checkout . && git -C ./plugins/${pluginName}/ pull --no-rebase`;
} else {
command = `git -C ./plugins/${pluginName}/ pull --no-rebase`;
command = `git reset --hard origin/master && ${command}`;
}
this.oldCommitId = await this.getCommitId(pluginName);
await e.reply("正在执行更新操作,请稍等");

View File

@ -27,7 +27,7 @@ export default class Help extends base {
})
}
let versionData = config.getConfig('version')
const versionData = config.getConfig('version')
const version =
(versionData && versionData.length && versionData[0].version) || '1.0.0'

View File

@ -4,12 +4,14 @@
font-weight: normal;
font-style: normal;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
user-select: none;
}
body {
font-family: sans-serif;
font-size: 16px;
@ -18,12 +20,14 @@ body {
transform: scale(1.5);
transform-origin: 0 0;
}
.container {
width: 788px;
padding: 20px 15px 10px 15px;
background-image: url(../../img/bg.jpeg);
background-size: 100%;
}
.head_box {
border-radius: 15px;
font-family: 'tttgbnumber';
@ -32,22 +36,27 @@ body {
color: white;
box-shadow: 0 5px 10px 0 rgb(0 0 0 / 15%);
}
.head_box .id_text {
font-size: 24px;
}
.head_box .day_text {
font-size: 20px;
}
.head_box .genshin_logo {
position: absolute;
top: -10px;
right: 15px;
width: 97px;
}
.base_info {
position: relative;
padding-left: 10px;
}
.uid {
font-family: tttgbnumber;
}
@ -61,6 +70,7 @@ body {
box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, 0.8);
position: relative;
}
.tab_lable {
position: absolute;
top: -10px;
@ -73,20 +83,24 @@ body {
border-radius: 15px 0px 15px 15px;
z-index: 20;
}
.data_line {
display: flex;
justify-content: space-around;
margin-bottom: 14px;
}
.data_line_item {
width: 100px;
text-align: center;
/*margin: 0 20px;*/
}
.num {
font-family: tttgbnumber;
font-size: 24px;
}
.data_box .lable {
font-size: 14px;
color: #7f858a;
@ -111,6 +125,7 @@ body {
border-radius: 8px;
margin: 0 0px 10px 10px;
}
.list .item .icon {
width: 24px;
height: 24px;
@ -119,11 +134,13 @@ body {
position: relative;
flex-shrink: 0;
}
.list .item .title {
font-size: 16px;
margin-left: 6px;
line-height: 20px;
}
/* .list .item .title .text{
white-space: nowrap;
} */
@ -132,6 +149,7 @@ body {
color: #999;
margin-top: 2px;
}
.logo {
text-align: center;
font-size: 14px;

View File

@ -1,12 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link
rel="stylesheet"
type="text/css"
href="{{pluResPath}}html/help/help.css"
/>
<link rel="stylesheet" type="text/css" href="{{pluResPath}}html/help/help.css" />
<link rel="preload" href="{{resPath}}font/tttgbnumber.ttf" as="font" />
<link rel="preload" href="{{pluResPath}}img/bg.jpeg" as="image" />
<link rel="preload" href="{{pluResPath}}img/rank/top.png" as="image" />
@ -18,7 +15,7 @@
<div class="container" id="container">
<div class="head_box">
<div class="id_text">R-Plugin</div>
<h2 class="day_text">使用说明-v{{update}}</h2>
<h2 class="day_text">使用说明-当前版本v{{version}}</h2>
<img class="genshin_logo" src="{{pluResPath}}img/rank/top.png" />
</div>
{{each helpData val}}
@ -42,4 +39,5 @@
<div class="logo">Created By Yunzai-Bot & R-Plugin</div>
</div>
</body>
</html>