fix: 状态卡片百分比错误

feat: 群聊Bot开关,防止Bot乱窜
This commit is contained in:
2024-04-12 00:32:08 +08:00
parent f9e5742821
commit 33dd2f104d
11 changed files with 129 additions and 25 deletions

View File

@ -121,4 +121,7 @@ rpm.move_up=上移
rpm.move_down=下移
rpm.move_top=置顶
npm.update=更新
npm.update=更新
liteyuki.group_already=群 {GROUP} 已经是 {STATUS} 状态,无需重复操作
liteyuki.group_success=群 {GROUP} {STATUS} 成功

View File

@ -0,0 +1,18 @@
#data-storage {
display: none;
}
body {
background-repeat: repeat-y;
background-size: cover;
background-position: center;
margin: 20px;
}
.info-box {
border-radius: 30px;
padding: 30px;
backdrop-filter: blur(10px);
background-color: rgba(0, 0, 0, 0.5);
margin-bottom: 20px;
}

View File

@ -5,7 +5,6 @@ body {
color: white;
/ / 10px10px0px / / margin: 24 px;
margin: 20px;
}
.info-box {

View File

@ -0,0 +1,9 @@
const data = JSON.parse(document.getElementById('data').innerText);
function createPieChartOption(title, data){
// data为各项占比列表
}
function createBarChartOption(title, percent){
// percent为百分比最大值为100
}

View File

@ -132,8 +132,7 @@
used += item.value
}
})
console.log(used, total)
return used / total * 100
return (1 - used / total) * 100
}
@ -146,6 +145,7 @@
top: 'center',
textStyle: {
//文字颜色
lineHeight: 36,
color: '#fff',
fontSize: 30

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Liteyuki Status</title>
<link rel="stylesheet" href="css/card.css">
</head>
<body>
<div class="data-storage" id="data">{{ data | tojson }}</div>
<div class="info-box" id="device-info"></div>
<div class="info-box" id="disk-info"></div>
<div class="info-box" id="motto-info"></div>
</body>
</html>