koishi-plugin-adapter-onebot-multi 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +82 -18
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1779,7 +1779,8 @@ var StatusPanel = class {
|
|
|
1779
1779
|
.bot-avatar { width: 64px; height: 64px; border: var(--nl-border); border-radius: 50%; background: #fff; }
|
|
1780
1780
|
.bot-info { flex: 1; }
|
|
1781
1781
|
.bot-id { font-weight: 900; font-size: 1.2rem; }
|
|
1782
|
-
.bot-protocol { color: #92400e; font-size: 0.9rem; font-weight: 700; background: #fffbeb; display: inline-block; padding: 2px 6px; border: 2px solid #451a03; border-radius: 6px; margin-top: 4px; }
|
|
1782
|
+
.bot-protocol { color: #92400e; font-size: 0.9rem; font-weight: 700; background: #fffbeb; display: inline-block; padding: 2px 6px; border: 2px solid #451a03; border-radius: 6px; margin-top: 4px; text-decoration: none; cursor: pointer; transition: all 0.15s; }
|
|
1783
|
+
.bot-protocol:hover { background: #fef3c7; transform: scale(1.02); }
|
|
1783
1784
|
.status-badge { padding: 0.4rem 0.8rem; border: 2px solid #451a03; border-radius: 20px; font-size: 0.8rem; font-weight: 900; }
|
|
1784
1785
|
.status-online { background: #dcfce7; border-color: #10b981; color: #15803d; }
|
|
1785
1786
|
.status-offline { background: #fee2e2; border-color: #ef4444; color: #b91c1c; }
|
|
@@ -1805,9 +1806,39 @@ var StatusPanel = class {
|
|
|
1805
1806
|
.empty-state h3 { font-size: 1.5rem; margin-bottom: 1rem; }
|
|
1806
1807
|
.footer { margin-top: 3rem; text-align: center; font-weight: 700; color: #92400e; }
|
|
1807
1808
|
@media (max-width: 768px) {
|
|
1808
|
-
body { padding:
|
|
1809
|
-
.
|
|
1809
|
+
body { padding: 0.5rem; align-items: flex-start; }
|
|
1810
|
+
.auth-box { padding: 1.5rem; margin: 0.5rem; }
|
|
1811
|
+
.auth-box h1 { font-size: 1.4rem; }
|
|
1812
|
+
.admin-container { padding: 0.75rem; border-radius: 12px; }
|
|
1813
|
+
.admin-container h1 { font-size: 1.3rem; margin-bottom: 0.75rem; }
|
|
1814
|
+
.toolbar { gap: 0.4rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
|
|
1815
|
+
.toolbar .btn { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
|
|
1816
|
+
.bots { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
|
|
1817
|
+
.bot-card { padding: 0.75rem; border-radius: 10px; box-shadow: 2px 2px 0 #451a03; }
|
|
1818
|
+
.bot-card:hover { transform: none; box-shadow: 2px 2px 0 #451a03; }
|
|
1819
|
+
.bot-header { gap: 0.5rem; margin-bottom: 0.5rem; }
|
|
1820
|
+
.bot-avatar { width: 36px; height: 36px; }
|
|
1821
|
+
.bot-info { min-width: 0; }
|
|
1822
|
+
.bot-id { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1823
|
+
.bot-protocol { font-size: 0.7rem; padding: 1px 4px; }
|
|
1824
|
+
.status-badge { padding: 0.2rem 0.4rem; font-size: 0.65rem; }
|
|
1825
|
+
.bot-stats { padding: 0.5rem; gap: 4px; grid-template-columns: repeat(3, 1fr); border-radius: 8px; margin-bottom: 0.5rem; }
|
|
1826
|
+
.bot-stat-label { font-size: 0.6rem; }
|
|
1827
|
+
.bot-stat-value { font-size: 0.75rem; }
|
|
1828
|
+
.bot-actions { gap: 0.3rem; }
|
|
1829
|
+
.bot-actions .btn { padding: 0.3rem 0.5rem; font-size: 0.7rem; }
|
|
1830
|
+
.modal-content { padding: 1rem; margin: 0.5rem; }
|
|
1831
|
+
.modal h2 { font-size: 1.1rem; }
|
|
1832
|
+
.modal-actions { flex-direction: column; gap: 0.5rem; }
|
|
1833
|
+
.toast { left: 0.5rem; right: 0.5rem; transform: none; text-align: center; padding: 0.75rem; font-size: 0.85rem; }
|
|
1834
|
+
.footer { margin-top: 1.5rem; font-size: 0.8rem; }
|
|
1835
|
+
}
|
|
1836
|
+
@media (max-width: 400px) {
|
|
1837
|
+
.toolbar { flex-direction: column; }
|
|
1838
|
+
.toolbar .btn { width: 100%; text-align: center; }
|
|
1810
1839
|
.bots { grid-template-columns: 1fr; }
|
|
1840
|
+
.bot-stats { grid-template-columns: repeat(3, 1fr); }
|
|
1841
|
+
.bot-actions { flex-direction: row; flex-wrap: wrap; }
|
|
1811
1842
|
}
|
|
1812
1843
|
</style>
|
|
1813
1844
|
</head>
|
|
@@ -2224,7 +2255,7 @@ var StatusPanel = class {
|
|
|
2224
2255
|
<img class="bot-avatar" src="http://q.qlogo.cn/headimg_dl?dst_uin=${bot.selfId}&spec=640" alt="avatar">
|
|
2225
2256
|
<div class="bot-info">
|
|
2226
2257
|
<div class="bot-id">${displayName}</div>
|
|
2227
|
-
<
|
|
2258
|
+
<a class="bot-protocol" href="https://wpa.qq.com/msgrd?v=3&uin=${bot.selfId}&site=qq&menu=yes" target="_blank" title="点击添加好友">QQ: ${bot.selfId}</a>
|
|
2228
2259
|
</div>
|
|
2229
2260
|
<span class="status-badge status-${bot.status}">${statusText}</span>
|
|
2230
2261
|
</div>
|
|
@@ -2320,7 +2351,8 @@ var StatusPanel = class {
|
|
|
2320
2351
|
.bot-avatar { width: 64px; height: 64px; border: var(--nl-border); border-radius: 50%; background: #fff; }
|
|
2321
2352
|
.bot-info { flex: 1; }
|
|
2322
2353
|
.bot-id { font-weight: 900; font-size: 1.2rem; }
|
|
2323
|
-
.bot-protocol { color: #92400e; font-size: 0.9rem; font-weight: 700; background: #fffbeb; display: inline-block; padding: 2px 6px; border: 2px solid #451a03; border-radius: 6px; margin-top: 4px; }
|
|
2354
|
+
.bot-protocol { color: #92400e; font-size: 0.9rem; font-weight: 700; background: #fffbeb; display: inline-block; padding: 2px 6px; border: 2px solid #451a03; border-radius: 6px; margin-top: 4px; text-decoration: none; cursor: pointer; transition: all 0.15s; }
|
|
2355
|
+
.bot-protocol:hover { background: #fef3c7; transform: scale(1.02); }
|
|
2324
2356
|
.status-badge { padding: 0.4rem 0.8rem; border: 2px solid #451a03; border-radius: 20px; font-size: 0.8rem; font-weight: 900; }
|
|
2325
2357
|
.status-online { background: #dcfce7; border-color: #10b981; color: #15803d; }
|
|
2326
2358
|
.status-offline { background: #fee2e2; border-color: #ef4444; color: #b91c1c; }
|
|
@@ -2331,9 +2363,6 @@ var StatusPanel = class {
|
|
|
2331
2363
|
.bot-stat-value { font-weight: 700; font-size: 1rem; }
|
|
2332
2364
|
.footer { margin-top: 3rem; text-align: center; font-weight: 700; color: #92400e; }
|
|
2333
2365
|
.refresh-btn {
|
|
2334
|
-
position: fixed;
|
|
2335
|
-
bottom: 2rem;
|
|
2336
|
-
right: 2rem;
|
|
2337
2366
|
background: var(--nl-primary);
|
|
2338
2367
|
border: var(--nl-border);
|
|
2339
2368
|
color: var(--nl-text);
|
|
@@ -2344,14 +2373,10 @@ var StatusPanel = class {
|
|
|
2344
2373
|
font-weight: 800;
|
|
2345
2374
|
box-shadow: var(--nl-shadow);
|
|
2346
2375
|
transition: all 0.1s;
|
|
2347
|
-
z-index: 100;
|
|
2348
2376
|
}
|
|
2349
2377
|
.refresh-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #451a03; }
|
|
2350
2378
|
.refresh-btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #451a03; }
|
|
2351
2379
|
.admin-btn {
|
|
2352
|
-
position: fixed;
|
|
2353
|
-
bottom: 2rem;
|
|
2354
|
-
right: 9rem;
|
|
2355
2380
|
background: #f3f4f6;
|
|
2356
2381
|
border: var(--nl-border);
|
|
2357
2382
|
color: var(--nl-text);
|
|
@@ -2362,15 +2387,52 @@ var StatusPanel = class {
|
|
|
2362
2387
|
font-weight: 800;
|
|
2363
2388
|
box-shadow: var(--nl-shadow);
|
|
2364
2389
|
transition: all 0.1s;
|
|
2365
|
-
z-index: 100;
|
|
2366
2390
|
text-decoration: none;
|
|
2367
2391
|
}
|
|
2368
2392
|
.admin-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #451a03; }
|
|
2369
2393
|
.admin-btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #451a03; }
|
|
2394
|
+
.floating-btns {
|
|
2395
|
+
position: fixed;
|
|
2396
|
+
bottom: 1.5rem;
|
|
2397
|
+
right: 1.5rem;
|
|
2398
|
+
display: flex;
|
|
2399
|
+
gap: 0.75rem;
|
|
2400
|
+
z-index: 100;
|
|
2401
|
+
}
|
|
2370
2402
|
@media (max-width: 768px) {
|
|
2371
|
-
body { padding:
|
|
2372
|
-
.container { padding:
|
|
2373
|
-
|
|
2403
|
+
body { padding: 0.5rem; }
|
|
2404
|
+
.container { padding: 0.75rem; border-radius: 12px; }
|
|
2405
|
+
h1 { font-size: 1.3rem !important; margin-bottom: 1rem !important; }
|
|
2406
|
+
.stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
|
|
2407
|
+
.stat-card { padding: 0.5rem; border-radius: 10px; }
|
|
2408
|
+
.stat-value { font-size: 1.5rem; }
|
|
2409
|
+
.stat-label { font-size: 11px; }
|
|
2410
|
+
.bots { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
|
|
2411
|
+
.bot-card { padding: 0.75rem; border-radius: 10px; box-shadow: 2px 2px 0 #451a03; }
|
|
2412
|
+
.bot-card:hover { transform: none; box-shadow: 2px 2px 0 #451a03; }
|
|
2413
|
+
.bot-header { gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
|
|
2414
|
+
.bot-avatar { width: 36px; height: 36px; }
|
|
2415
|
+
.bot-info { flex: 1; min-width: 0; }
|
|
2416
|
+
.bot-id { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2417
|
+
.bot-protocol { font-size: 0.7rem; padding: 1px 4px; }
|
|
2418
|
+
.status-badge { padding: 0.2rem 0.4rem; font-size: 0.65rem; }
|
|
2419
|
+
.bot-stats { padding: 0.5rem; gap: 4px; grid-template-columns: repeat(3, 1fr); border-radius: 8px; }
|
|
2420
|
+
.bot-stat-label { font-size: 0.6rem; }
|
|
2421
|
+
.bot-stat-value { font-size: 0.75rem; }
|
|
2422
|
+
.footer { margin-top: 1rem; font-size: 0.75rem; }
|
|
2423
|
+
.floating-btns { bottom: 0.75rem; right: 0.75rem; gap: 0.4rem; }
|
|
2424
|
+
.admin-btn, .refresh-btn {
|
|
2425
|
+
position: static;
|
|
2426
|
+
padding: 0.5rem 0.8rem;
|
|
2427
|
+
font-size: 0.8rem;
|
|
2428
|
+
border-width: 2px;
|
|
2429
|
+
box-shadow: 2px 2px 0 #451a03;
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
@media (max-width: 400px) {
|
|
2433
|
+
.bots { grid-template-columns: 1fr; }
|
|
2434
|
+
.bot-stats { grid-template-columns: repeat(3, 1fr); }
|
|
2435
|
+
.floating-btns { flex-direction: row; }
|
|
2374
2436
|
}
|
|
2375
2437
|
</style>
|
|
2376
2438
|
</head>
|
|
@@ -2385,8 +2447,10 @@ var StatusPanel = class {
|
|
|
2385
2447
|
<div class="bots">${botCardsHtml}</div>
|
|
2386
2448
|
<div class="footer">更新时间: ${updatedAtStr}</div>
|
|
2387
2449
|
</div>
|
|
2388
|
-
<
|
|
2389
|
-
|
|
2450
|
+
<div class="floating-btns">
|
|
2451
|
+
<a href="${basePath}/admin" class="admin-btn">管理 🛠️</a>
|
|
2452
|
+
<button class="refresh-btn" onclick="location.reload()">刷新 ⚡</button>
|
|
2453
|
+
</div>
|
|
2390
2454
|
<script>setTimeout(() => location.reload(), 30000)</script>
|
|
2391
2455
|
</body>
|
|
2392
2456
|
</html>`;
|