diff --git a/.preview/device_database/option_1_telemetry_flow.html b/.preview/device_database/option_1_telemetry_flow.html new file mode 100644 index 0000000..4b9c74c --- /dev/null +++ b/.preview/device_database/option_1_telemetry_flow.html @@ -0,0 +1,195 @@ + + + + + +方案 1:Telemetry Card Flow 流式遥测设备库 (推荐·家族风) + + + +
+
+
+ +

设备数据库管理

+
+ +
+ +
+ + +
+ +
+ +
+
+
+
+
33X_BLE_62200024
+
+ 电量: 未知 + 固件: 未知 + 最后同步: 2026-08-12 14:32:25 +
+
+
+
未绑定
+
+ + +
+
+
+
+
33X_BLE_2200002
+
+ 电量: 未知 + 固件: 未知 + 最后同步: 2026-08-12 14:32:25 +
+
+
+
未绑定
+
+ + +
+
+
+
+
33X_BLE_62200025
+
+ 电量: 未知 + 固件: 未知 + 最后同步: 2026-08-12 14:32:25 +
+
+
+
未绑定
+
+
+
+ + diff --git a/设置页面UI优化/用户管理/baseline_ui.html b/设置页面UI优化/用户管理/baseline_ui.html index 080c4c8..5e287b7 100644 --- a/设置页面UI优化/用户管理/baseline_ui.html +++ b/设置页面UI优化/用户管理/baseline_ui.html @@ -162,26 +162,115 @@ body { display: flex; align-items: center; gap: 10px; + position: relative; } .db-label { font-size: 14px; font-weight: 700; color: var(--text-main); } -.db-select-pill { + +/* 真实高质感下拉选择器控件 */ +.db-select-trigger { + height: 38px; + min-width: 220px; background: #FFFFFF; - color: var(--color-primary); - border: 1.5px solid var(--color-primary-border); - padding: 6px 14px; - border-radius: 100px; - font-size: 13.5px; - font-weight: 700; + color: var(--text-main); + border: 1.5px solid #CBD5E1; + border-radius: 8px; + padding: 0 12px 0 14px; + font-size: 14px; + font-weight: 600; display: flex; align-items: center; - gap: 8px; + justify-content: space-between; + gap: 12px; cursor: pointer; transition: all 0.15s ease; - box-shadow: 0 2px 6px rgba(37, 99, 235, 0.06); + box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04); } -.db-select-pill:hover { +.db-select-trigger:hover { border-color: var(--color-primary); + background: #FFFFFF; + box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08); +} +.db-select-trigger.open { + border-color: var(--color-primary); + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); +} +.db-select-val { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 13.5px; + font-weight: 700; + color: var(--text-main); +} +.db-select-chevron { + width: 18px; + height: 18px; + fill: #64748B; + transition: transform 0.2s ease; + flex-shrink: 0; +} +.db-select-trigger.open .db-select-chevron { + transform: rotate(180deg); + fill: var(--color-primary); +} + +/* 下拉菜单浮层 */ +.db-dropdown-menu { + display: none; + position: absolute; + top: calc(100% + 6px); + left: 64px; + min-width: 240px; + background: #FFFFFF; + border: 1.5px solid var(--divider); + border-radius: 10px; + box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.04); + z-index: 50; + padding: 6px; + flex-direction: column; + gap: 2px; +} +.db-dropdown-menu.show { + display: flex; +} +.db-menu-item { + padding: 9px 12px; + border-radius: 6px; + font-size: 13.5px; + font-weight: 600; + font-family: ui-monospace, monospace; + color: var(--text-main); + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + transition: all 0.15s ease; +} +.db-menu-item:hover { background: var(--color-primary-light); + color: var(--color-primary); +} +.db-menu-item.active { + background: var(--color-primary-light); + color: var(--color-primary); + font-weight: 700; +} +.db-menu-divider { + height: 1px; + background: var(--divider); + margin: 4px 0; +} +.db-menu-action { + padding: 8px 12px; + border-radius: 6px; + font-size: 13px; + font-weight: 700; + color: var(--color-primary); + display: flex; + align-items: center; + gap: 6px; + cursor: pointer; +} +.db-menu-action:hover { + background: #EFF6FF; } .top-actions-group { @@ -441,9 +530,31 @@ input:checked + .slider:before { transform: translateX(20px); }
用户表: -
- UserDatabase_CHINA - +
+
+ + UserDatabase_CHINA +
+ +
+ + +
+
+ UserDatabase_CHINA + +
+
+ UserDatabase_GLOBAL +
+
+ UserDatabase_TRAIN_2026 +
+
+
+ + 管理/新建用户表... +
@@ -727,6 +838,45 @@ input:checked + .slider:before { transform: translateX(20px); } showMainView(); } + function toggleDbDropdown(e) { + e.stopPropagation(); + const trigger = document.getElementById('dbSelectTrigger'); + const menu = document.getElementById('dbDropdownMenu'); + const isOpen = menu.classList.contains('show'); + if (isOpen) { + menu.classList.remove('show'); + trigger.classList.remove('open'); + } else { + menu.classList.add('show'); + trigger.classList.add('open'); + } + } + + function selectDatabase(dbName) { + document.getElementById('selectedDbText').innerText = dbName; + document.querySelectorAll('.db-menu-item').forEach(it => { + if (it.innerText.includes(dbName)) { + it.classList.add('active'); + it.innerHTML = `${dbName}`; + } else { + it.classList.remove('active'); + it.innerHTML = `${it.innerText.trim()}`; + } + }); + document.getElementById('dbDropdownMenu').classList.remove('show'); + document.getElementById('dbSelectTrigger').classList.remove('open'); + } + + // 点击外部区域自动关闭下拉浮层 + document.addEventListener('click', function(e) { + const menu = document.getElementById('dbDropdownMenu'); + const trigger = document.getElementById('dbSelectTrigger'); + if (menu && !menu.contains(e.target) && !trigger.contains(e.target)) { + menu.classList.remove('show'); + trigger.classList.remove('open'); + } + }); + function deleteUserRow(btn, name) { if (confirm(`确认要从当前用户表中删除学员 [${name}] 的档案吗?`)) { btn.closest('.user-row-card').remove(); diff --git a/设置页面UI优化/用户管理/image.png b/设置页面UI优化/用户管理/image.png index db29f03..c593d67 100644 Binary files a/设置页面UI优化/用户管理/image.png and b/设置页面UI优化/用户管理/image.png differ