@nestim/koishi-plugin-qqgm-webui 0.2.14 → 0.2.16
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 +11 -0
- package/public/styles.css +2 -2
package/index.js
CHANGED
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -126,6 +126,17 @@ async function initMemoryData() {
|
|
|
126
126
|
if (!data || !data.installed) return;
|
|
127
127
|
const badge = $('.nav-badge');
|
|
128
128
|
if (badge) badge.textContent = String(data.total || 0);
|
|
129
|
+
const headP = $('#page-memory .page-head p');
|
|
130
|
+
if (headP) {
|
|
131
|
+
headP.textContent = data.useSqlite
|
|
132
|
+
? `当前 SQLite · ${data.total || 0} 条;切换前备份 koishi.yml`
|
|
133
|
+
: (data.needsMigration
|
|
134
|
+
? `当前 MD · 识别到 ${data.md?.total || 0} 条旧记忆,可迁移到 SQLite`
|
|
135
|
+
: '当前 MD · 没有识别到旧记忆文件');
|
|
136
|
+
}
|
|
137
|
+
const segButtons = $$('#page-memory .segmented button');
|
|
138
|
+
if (segButtons[0]) segButtons[0].classList.toggle('active', !data.useSqlite);
|
|
139
|
+
if (segButtons[1]) segButtons[1].classList.toggle('active', !!data.useSqlite);
|
|
129
140
|
const migrateBtn = $('#migrateMemory');
|
|
130
141
|
const switchBtn = $('#switchMd');
|
|
131
142
|
if (migrateBtn) migrateBtn.hidden = !data.needsMigration;
|
package/public/styles.css
CHANGED
|
@@ -62,7 +62,7 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
62
62
|
.icon-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
|
|
63
63
|
|
|
64
64
|
/* main */
|
|
65
|
-
.main { min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
|
|
65
|
+
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
|
|
66
66
|
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(255,255,255,.82); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
|
|
67
67
|
.crumb { display: flex; align-items: center; gap: 9px; font-size: 13px; }
|
|
68
68
|
.crumb-muted { color: #9aa6b7; }
|
|
@@ -77,7 +77,7 @@ svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round
|
|
|
77
77
|
.pill.online { color: #17845b; background: #e8f7f0; }
|
|
78
78
|
.pill.online i { width: 6px; height: 6px; background: #21b47b; border-radius: 50%; }
|
|
79
79
|
.top-actions .icon-btn { color: #7d8ba1; background: #fff; border: 1px solid var(--line); font-size: 15px; }
|
|
80
|
-
.content { flex: 1; overflow: auto; padding: 26px 28px 34px; }
|
|
80
|
+
.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 26px 28px 34px; }
|
|
81
81
|
.page { display: none; animation: fade .18s ease; }
|
|
82
82
|
.page.active { display: block; }
|
|
83
83
|
@keyframes fade { from { opacity: .2; transform: translateY(3px); } to { opacity: 1; transform: none; } }
|