Add .mdb import button and modal with server-side migration runner

This commit is contained in:
2026-03-12 14:15:13 -06:00
parent d7fde71e15
commit 68300d0375
6 changed files with 365 additions and 0 deletions
+100
View File
@@ -311,3 +311,103 @@ td {
margin-top: auto;
}
.form-actions .btn-primary { flex: 1; padding: 8px; }
/* ── Import modal ── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.4);
z-index: 200;
opacity: 0;
pointer-events: none;
transition: opacity 0.15s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -48%);
width: 480px;
max-width: calc(100vw - 2rem);
background: var(--surface);
border-radius: 6px;
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
z-index: 201;
display: flex;
flex-direction: column;
opacity: 0;
pointer-events: none;
transition: opacity 0.15s, transform 0.15s;
}
.modal.open {
opacity: 1;
pointer-events: auto;
transform: translate(-50%, -50%);
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 16px;
background: var(--header-bg);
color: var(--header-fg);
border-radius: 6px 6px 0 0;
flex-shrink: 0;
}
.modal-header h2 { font-size: 14px; font-weight: 600; }
.modal-body {
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
}
.modal-desc {
font-size: 12px;
color: var(--text-muted);
line-height: 1.5;
}
.modal-desc code {
font-family: monospace;
background: var(--bg);
padding: 1px 4px;
border-radius: 3px;
}
input[type="file"] {
border: 1px solid var(--border);
border-radius: 4px;
padding: 6px 8px;
font-size: 13px;
font-family: var(--font);
width: 100%;
background: var(--surface);
cursor: pointer;
}
.import-log {
font-family: monospace;
font-size: 11px;
background: #0f172a;
color: #94a3b8;
border-radius: 4px;
padding: 10px 12px;
max-height: 200px;
overflow-y: auto;
white-space: pre-wrap;
word-break: break-all;
line-height: 1.5;
}
.import-log.success { color: #86efac; }
.import-log.error { color: #fca5a5; }
.modal-footer {
display: flex;
gap: 8px;
padding: 12px 16px;
border-top: 1px solid var(--border);
}