@nestim/koishi-plugin-qqgm-webui 0.2.9 → 0.2.10
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/index.js +1 -1
- package/package.json +1 -1
- package/public/app.js +7 -0
- package/public/index.html +4 -0
- package/public/styles.css +6 -0
package/index.js
CHANGED
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -24,6 +24,11 @@ function showToast(text) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function go(page) {
|
|
27
|
+
const monitorNav = $('.nav-item[data-page="monitor"]');
|
|
28
|
+
if (page === 'monitor' && monitorNav && monitorNav.classList.contains('disabled')) {
|
|
29
|
+
showToast('安装 qqgm-monitor 后可用');
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
27
32
|
$$('.nav-item').forEach((item) => item.classList.toggle('active', item.dataset.page === page));
|
|
28
33
|
$$('.nav-sub').forEach((item) => item.classList.toggle('active', item.dataset.page === page));
|
|
29
34
|
$$('.page').forEach((item) => item.classList.toggle('active', item.id === `page-${page}`));
|
|
@@ -57,6 +62,8 @@ function setMonitorState(on) {
|
|
|
57
62
|
if (!monitor || !welcome) return;
|
|
58
63
|
monitor.hidden = !on;
|
|
59
64
|
welcome.hidden = on;
|
|
65
|
+
const nav = $('.nav-item[data-page="monitor"]');
|
|
66
|
+
if (nav) nav.classList.toggle('disabled', !on);
|
|
60
67
|
const title = $('#pageTitle');
|
|
61
68
|
if (title) title.textContent = '总览';
|
|
62
69
|
}
|
package/public/index.html
CHANGED
|
@@ -198,6 +198,10 @@
|
|
|
198
198
|
</div>
|
|
199
199
|
</div>
|
|
200
200
|
|
|
201
|
+
<div class="welcome-status">
|
|
202
|
+
<div><span class="pulse"></span><b>主插件已连接</b><span>v1.6.0 · 作者 Miseat</span></div>
|
|
203
|
+
<div>已安装 6 个附属插件 · 监控未安装</div>
|
|
204
|
+
</div>
|
|
201
205
|
<div class="welcome-grid">
|
|
202
206
|
<article class="card welcome-card">
|
|
203
207
|
<span class="step">01</span>
|
package/public/styles.css
CHANGED
|
@@ -46,6 +46,8 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
46
46
|
.nav-item:hover { color: #e8eefb; background: rgba(255,255,255,.045); }
|
|
47
47
|
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(79,125,243,.24), rgba(79,125,243,.08)); box-shadow: inset 2px 0 0 #5b8def; }
|
|
48
48
|
.nav-item.active svg { color: #8fb0ff; }
|
|
49
|
+
.nav-item.disabled { opacity: .35; cursor: not-allowed; }
|
|
50
|
+
.nav-item.disabled:hover { background: none; color: #93a1b8; }
|
|
49
51
|
.nav-badge { margin-left: auto; font-style: normal; font-size: 10.5px; background: #1c2b42; color: #9fb4d6; border-radius: 20px; padding: 2px 7px; }
|
|
50
52
|
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: #2dd4bf; margin-left: auto; box-shadow: 0 0 0 4px rgba(45,212,191,.12); }
|
|
51
53
|
.sidebar-footer { position: absolute; left: 14px; right: 14px; bottom: 16px; border-top: 1px solid rgba(255,255,255,.07); padding-top: 11px; background: var(--nav); }
|
|
@@ -273,6 +275,10 @@ code { background: #f2f5f9; color: #55657d; border-radius: 4px; padding: 1px 4px
|
|
|
273
275
|
.welcome-actions .btn.primary { background: #fff; color: #1b3154; box-shadow: none; }
|
|
274
276
|
.welcome-actions .link-btn { color: #9dbcf0; margin-left: 4px; }
|
|
275
277
|
.welcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
|
|
278
|
+
.welcome-status { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 10.5px; color: #8796aa; }
|
|
279
|
+
.welcome-status div { display: flex; align-items: center; gap: 8px; }
|
|
280
|
+
.welcome-status b { color: #3e4e65; font-weight: 600; }
|
|
281
|
+
.welcome-status .pulse { width: 6px; height: 6px; }
|
|
276
282
|
.welcome-card { position: relative; padding: 18px; }
|
|
277
283
|
.welcome-card .step { font-size: 10px; letter-spacing: .1em; color: #8fa3bd; }
|
|
278
284
|
.welcome-card h3 { margin: 8px 0 6px; font-size: 14px; }
|