ZDDC/browse/css/manage-access.css
ZDDC 1bd73b1512 feat(browse): CodeMirror for all editable text files; drop the .zddc form; tidy access dialog
- Editor routing: the CodeMirror editor is now the general editor for editable
  text files that aren't markdown — yaml/.zddc keep schema lint + completion +
  hover; txt/csv/tsv/json/xml/html/css/js/log/ini/conf/… open as a plaintext
  code editor (line numbers, find, save) instead of a read-only <pre>. HTML now
  edits its source (was an iframe render); PDF stays an iframe. Mode is yaml-only
  (the vendored CM mode); others plaintext, lint gutter suppressed.
- Abandon the .zddc schema FORM (preview-zddc-form.js deleted): .zddc opens in
  CodeMirror. Guided dialogs (Manage access, …) are the front door for common
  tasks; CodeMirror is the full/raw surface. One fewer half-baked middle layer.
- Manage Access dialog laid out cleanly: grid rows (who fills + shrinks, level
  sizes to content) so long emails/levels never overflow; short level labels
  with tooltips + a one-line legend; box-sizing fixed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 10:18:31 -05:00

90 lines
2.4 KiB
CSS

/* manage-access.js — guided "who can do what here" dialog. */
.ma-overlay {
position: fixed;
inset: 0;
z-index: 9800;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.4);
}
.ma-box {
background: var(--bg-elevated, var(--bg, #fff));
color: var(--text, #222);
border: 1px solid var(--border, #ccc);
border-radius: 8px;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
padding: 1.1rem 1.25rem;
width: min(34rem, 94vw);
max-height: 90vh;
overflow: auto;
}
.ma-title { margin: 0 0 0.2rem; font-size: 1.15rem; }
.ma-sub {
margin: 0 0 0.8rem;
font-size: 0.82rem;
color: var(--text-muted, #777);
word-break: break-all;
}
.ma-list { display: flex; flex-direction: column; gap: 0.4rem; }
/* who fills the row and shrinks (min-width:0); level + delete size to content
so nothing overflows the dialog regardless of email/principal length. */
.ma-row {
display: grid;
grid-template-columns: minmax(0, 1fr) max-content max-content;
gap: 0.5rem;
align-items: center;
}
.ma-who,
.ma-level {
box-sizing: border-box;
padding: 0.4rem 0.5rem;
font: inherit;
border: 1px solid var(--border, #ccc);
border-radius: 4px;
background: var(--bg, #fff);
color: var(--text, #222);
}
.ma-who { width: 100%; min-width: 0; }
.ma-level { width: 8.5rem; cursor: pointer; }
.ma-legend {
margin: 0.5rem 0 0;
font-size: 0.74rem;
color: var(--text-muted, #888);
}
.ma-del {
border: none;
background: transparent;
color: var(--text-muted, #999);
cursor: pointer;
font-size: 1rem;
padding: 0.2rem 0.4rem;
border-radius: 4px;
}
.ma-del:hover { background: var(--bg-secondary, rgba(0, 0, 0, 0.06)); color: var(--danger, #c14242); }
.ma-add {
margin: 0.6rem 0 0;
border: 1px dashed var(--border, #bbb);
background: transparent;
color: var(--primary, #2868c8);
cursor: pointer;
padding: 0.35rem 0.6rem;
border-radius: 4px;
font: inherit;
}
.ma-add:hover { background: var(--bg-secondary, rgba(0, 0, 0, 0.04)); }
.ma-inherit {
display: flex;
align-items: center;
gap: 0.3rem;
margin: 0.9rem 0 0;
font-size: 0.88rem;
}
.ma-err { color: var(--danger, #c14242); font-size: 0.82rem; margin: 0.5rem 0 0; min-height: 0; }
.ma-err:empty { display: none; }
.ma-actions {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
margin-top: 1rem;
}