Update public/index.html
Browse files- public/index.html +33 -6
public/index.html
CHANGED
|
@@ -138,7 +138,7 @@
|
|
| 138 |
padding: 16px;
|
| 139 |
border: 1px solid var(--metric-border);
|
| 140 |
transition: background 0.2s ease, box-shadow 0.2s ease;
|
| 141 |
-
min-height:
|
| 142 |
display: flex;
|
| 143 |
flex-direction: column;
|
| 144 |
box-shadow: 0 0 5px rgba(0, 212, 255, 0.2);
|
|
@@ -146,7 +146,7 @@
|
|
| 146 |
overflow: hidden;
|
| 147 |
}
|
| 148 |
.server-card.not-logged-in {
|
| 149 |
-
min-height:
|
| 150 |
}
|
| 151 |
.server-card:hover {
|
| 152 |
background: var(--metric-hover);
|
|
@@ -175,6 +175,21 @@
|
|
| 175 |
gap: 8px;
|
| 176 |
flex: 1;
|
| 177 |
min-width: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
}
|
| 179 |
.server-name div {
|
| 180 |
overflow: hidden;
|
|
@@ -234,9 +249,13 @@
|
|
| 234 |
border-radius: 4px;
|
| 235 |
border: 1px solid var(--metric-border);
|
| 236 |
margin-top: 12px;
|
| 237 |
-
transition: background 0.2s ease;
|
| 238 |
overflow: hidden;
|
| 239 |
box-shadow: inset 0 0 3px rgba(0, 212, 255, 0.2);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
}
|
| 241 |
.info-block:hover {
|
| 242 |
background: var(--metric-hover);
|
|
@@ -710,7 +729,7 @@
|
|
| 710 |
<div class="container">
|
| 711 |
<div class="overview">
|
| 712 |
<div class="header-container">
|
| 713 |
-
<div class="overview-title">
|
| 714 |
<div class="auth-buttons">
|
| 715 |
<button class="login-button" id="loginButton" onclick="showLoginForm()">登录</button>
|
| 716 |
<button class="logout-button" id="logoutButton" style="display: none;" onclick="logout()">登出</button>
|
|
@@ -1375,6 +1394,14 @@
|
|
| 1375 |
}
|
| 1376 |
}
|
| 1377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1378 |
function renderInstanceCard(instance, container) {
|
| 1379 |
const instanceId = instance.repo_id;
|
| 1380 |
instanceMap.set(instanceId, instance);
|
|
@@ -1404,10 +1431,10 @@
|
|
| 1404 |
|
| 1405 |
card.innerHTML = `
|
| 1406 |
<div class="server-header">
|
| 1407 |
-
<div class="server-name">
|
| 1408 |
<div class="status-dot status-sleep"></div>
|
| 1409 |
${iconSvg}
|
| 1410 |
-
<div>${instance.name}
|
| 1411 |
</div>
|
| 1412 |
<div>
|
| 1413 |
<button class="chart-toggle-button" onclick="toggleChart('${instanceId}')">查看图表</button>
|
|
|
|
| 138 |
padding: 16px;
|
| 139 |
border: 1px solid var(--metric-border);
|
| 140 |
transition: background 0.2s ease, box-shadow 0.2s ease;
|
| 141 |
+
min-height: 150px;
|
| 142 |
display: flex;
|
| 143 |
flex-direction: column;
|
| 144 |
box-shadow: 0 0 5px rgba(0, 212, 255, 0.2);
|
|
|
|
| 146 |
overflow: hidden;
|
| 147 |
}
|
| 148 |
.server-card.not-logged-in {
|
| 149 |
+
min-height: 120px;
|
| 150 |
}
|
| 151 |
.server-card:hover {
|
| 152 |
background: var(--metric-hover);
|
|
|
|
| 175 |
gap: 8px;
|
| 176 |
flex: 1;
|
| 177 |
min-width: 0;
|
| 178 |
+
cursor: pointer;
|
| 179 |
+
position: relative;
|
| 180 |
+
}
|
| 181 |
+
.server-name:hover {
|
| 182 |
+
opacity: 0.8;
|
| 183 |
+
}
|
| 184 |
+
.server-name::after {
|
| 185 |
+
content: '▼';
|
| 186 |
+
font-size: 12px;
|
| 187 |
+
color: var(--accent-color);
|
| 188 |
+
margin-left: 8px;
|
| 189 |
+
transition: transform 0.3s ease;
|
| 190 |
+
}
|
| 191 |
+
.server-card.info-expanded .server-name::after {
|
| 192 |
+
transform: rotate(180deg);
|
| 193 |
}
|
| 194 |
.server-name div {
|
| 195 |
overflow: hidden;
|
|
|
|
| 249 |
border-radius: 4px;
|
| 250 |
border: 1px solid var(--metric-border);
|
| 251 |
margin-top: 12px;
|
| 252 |
+
transition: background 0.2s ease, height 0.3s ease;
|
| 253 |
overflow: hidden;
|
| 254 |
box-shadow: inset 0 0 3px rgba(0, 212, 255, 0.2);
|
| 255 |
+
display: none;
|
| 256 |
+
}
|
| 257 |
+
.server-card.info-expanded .info-block {
|
| 258 |
+
display: block;
|
| 259 |
}
|
| 260 |
.info-block:hover {
|
| 261 |
background: var(--metric-hover);
|
|
|
|
| 729 |
<div class="container">
|
| 730 |
<div class="overview">
|
| 731 |
<div class="header-container">
|
| 732 |
+
<div class="overview-title">🪩 系统概览</div>
|
| 733 |
<div class="auth-buttons">
|
| 734 |
<button class="login-button" id="loginButton" onclick="showLoginForm()">登录</button>
|
| 735 |
<button class="logout-button" id="logoutButton" style="display: none;" onclick="logout()">登出</button>
|
|
|
|
| 1394 |
}
|
| 1395 |
}
|
| 1396 |
|
| 1397 |
+
// 切换信息块显示/隐藏的函数
|
| 1398 |
+
function toggleInfoBlock(instanceId) {
|
| 1399 |
+
const card = document.getElementById(`instance-${instanceId}`);
|
| 1400 |
+
if (!card) return;
|
| 1401 |
+
|
| 1402 |
+
card.classList.toggle('info-expanded');
|
| 1403 |
+
}
|
| 1404 |
+
|
| 1405 |
function renderInstanceCard(instance, container) {
|
| 1406 |
const instanceId = instance.repo_id;
|
| 1407 |
instanceMap.set(instanceId, instance);
|
|
|
|
| 1431 |
|
| 1432 |
card.innerHTML = `
|
| 1433 |
<div class="server-header">
|
| 1434 |
+
<div class="server-name" onclick="toggleInfoBlock('${instanceId}')">
|
| 1435 |
<div class="status-dot status-sleep"></div>
|
| 1436 |
${iconSvg}
|
| 1437 |
+
<div>${instance.name}</div>
|
| 1438 |
</div>
|
| 1439 |
<div>
|
| 1440 |
<button class="chart-toggle-button" onclick="toggleChart('${instanceId}')">查看图表</button>
|