diff --git a/admin/index.html b/admin/index.html index e735297..1d2239d 100644 --- a/admin/index.html +++ b/admin/index.html @@ -137,13 +137,51 @@ } .drawer h3 { margin-bottom: 10px; color: #fff; } + /* Modal */ + .modal-overlay { + position: fixed; inset: 0; + background: rgba(0,0,0,0.6); z-index: 300; + display: flex; align-items: center; justify-content: center; + padding: 20px; + } + .modal { + background: var(--bg2); + border: 1px solid var(--border); + border-radius: 8px; + width: 100%; max-width: 900px; + max-height: 90vh; + display: flex; flex-direction: column; + } + .modal-header { + display: flex; align-items: center; justify-content: space-between; + padding: 14px 18px; + border-bottom: 1px solid var(--border); + flex-shrink: 0; + } + .modal-header h3 { color: #fff; margin: 0; font-size: 16px; } + .modal-body { + padding: 14px 18px; + overflow-y: auto; + flex: 1; + } + .modal-footer { + display: flex; gap: 8px; justify-content: flex-end; + padding: 12px 18px; + border-top: 1px solid var(--border); + flex-shrink: 0; + } + .form-row { + display: flex; gap: 12px; flex-wrap: wrap; + } + .form-row > div { flex: 1; min-width: 120px; } + /* Group */ .group-title { margin: 12px 0 8px; color: #fff; font-size: 14px; text-transform: capitalize; } - /* Form fields inside drawer */ + /* Form fields inside modal */ #profile-form label { display: block; color: var(--text2); @@ -657,18 +695,17 @@ try { await api.updateProfile(id, value); loadProfiles(); } catch (err) { alert(err.message); } }; -// ── Profile Edit ─────────────────────────────────────────────────────────── window.editProfile = async (id) => { try { const p = await api.profile(id); - showProfileDrawer(id, p); + showProfileModal(id, p); } catch (err) { alert(err.message); } }; -function showProfileDrawer(id, p) { - const existing = document.querySelector('.drawer-overlay'); +function showProfileModal(id, p) { + const existing = document.querySelector('.modal-overlay'); if (existing) existing.remove(); const modelVal = Array.isArray(p.model) ? p.model.join('\n') : String(p.model || ''); @@ -677,11 +714,14 @@ const ctxVal = Array.isArray(p.context_providers) ? p.context_providers.join('\n') : String(p.context_providers || ''); const overlay = document.createElement('div'); - overlay.className = 'drawer-overlay'; + overlay.className = 'modal-overlay'; overlay.innerHTML = ` -