mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 08:41:22 +00:00
fix: 状态卡片百分比错误
feat: 群聊Bot开关,防止Bot乱窜
This commit is contained in:
@ -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} 成功
|
18
liteyuki/resources/templates/css/card.css
Normal file
18
liteyuki/resources/templates/css/card.css
Normal 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;
|
||||
}
|
@ -5,7 +5,6 @@ body {
|
||||
color: white;
|
||||
/ / 上10px,左右10px,下0px / / margin: 24 px;
|
||||
margin: 20px;
|
||||
|
||||
}
|
||||
|
||||
.info-box {
|
||||
|
9
liteyuki/resources/templates/js/status.js
Normal file
9
liteyuki/resources/templates/js/status.js
Normal file
@ -0,0 +1,9 @@
|
||||
const data = JSON.parse(document.getElementById('data').innerText);
|
||||
|
||||
function createPieChartOption(title, data){
|
||||
// data为各项占比列表
|
||||
}
|
||||
|
||||
function createBarChartOption(title, percent){
|
||||
// percent为百分比,最大值为100
|
||||
}
|
@ -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
|
||||
|
14
liteyuki/resources/templates/status.html
Normal file
14
liteyuki/resources/templates/status.html
Normal 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>
|
Reference in New Issue
Block a user