Korrigiere den Dark-Mode in der Strukturnavigation und zeige "Eigentümer einsetzen" nur, wenn es nötig ist.
Die Navigationsspalte der Akten und Vorgänge hatte einen festen hellen Hintergrund, im Dark-Mode stand darauf helle Schrift. Dasselbe galt für den Lesebereich, die Statusmarke und ein Auswahlfeld. Texte in der Markenfarbe sind im Dark-Mode jetzt hell, die gedämpfte Beschriftung ist besser lesbar, und zwei nicht definierte Farbvariablen sind ersetzt. In der Betreiberübersicht der Datenräume steht der Eigentümer mit Hinweis, ob er noch handeln kann. Die Schaltfläche "Eigentümer einsetzen" erscheint nur, wenn der Eigentümer nicht mehr aktiv ist; bisher stand sie bei jedem Raum, und der Server lehnte sie bei aktivem Eigentümer ab. Der Backend-Test der Raumrollen läuft grün, der Frontend-Build ebenfalls. Der Dark-Mode wurde nicht im Browser geprüft. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1765714ccd
commit
30b6544514
4 files changed
+55
-25
No files matched your search
@@ -566,6 +566,12 @@ def admin_rooms(principal: Principal = Depends(get_principal), conn: Connection
|
||||
rows = conn.execute(
|
||||
"""
|
||||
SELECT r.id, r.name, r.status, r.created_at,
|
||||
(SELECT o.display_name FROM auth_accounts o WHERE o.id = r.owner_id) AS owner_name,
|
||||
EXISTS (
|
||||
SELECT 1 FROM auth_accounts o
|
||||
JOIN room_memberships om ON om.subject_id = o.id AND om.room_id = r.id AND om.status = 'active'
|
||||
WHERE o.id = r.owner_id AND o.status = 'active'
|
||||
) AS owner_active,
|
||||
(SELECT count(*) FROM room_memberships m WHERE m.room_id = r.id AND m.status = 'active') AS members,
|
||||
COALESCE((
|
||||
SELECT json_agg(a.display_name ORDER BY a.display_name)
|
||||
@@ -584,6 +590,8 @@ def admin_rooms(principal: Principal = Depends(get_principal), conn: Connection
|
||||
"name": row["name"],
|
||||
"status": row["status"],
|
||||
"members": row["members"],
|
||||
"owner": row["owner_name"],
|
||||
"owner_active": row["owner_active"],
|
||||
"managers": row["managers"],
|
||||
"has_manager": bool(row["managers"]),
|
||||
"created_at": dump_dt(row["created_at"]),
|
||||
|
||||
@@ -209,6 +209,7 @@ def test_operator_sees_rooms_without_content_and_fills_an_orphaned_room(client,
|
||||
overview = operator.request("GET", "/api/v1/admin/rooms")["items"]
|
||||
row = next(item for item in overview if item["id"] == room)
|
||||
assert row["managers"] == ["Ada Rolle"] and row["members"] == 1 and row["has_manager"] is True
|
||||
assert row["owner"] == "Ada Rolle" and row["owner_active"] is True
|
||||
assert "Nur für Ada" not in str(overview)
|
||||
operator.request("GET", f"/api/v1/rooms/{room}/members", status=403)
|
||||
ben.request("GET", "/api/v1/admin/rooms", status=403)
|
||||
|
||||
@@ -38,7 +38,10 @@ export function AdminRoomsPanel() {
|
||||
return (
|
||||
<section className="card stack" aria-label="Alle Datenräume (Betreiber)">
|
||||
<h2>Alle Datenräume (Betreiber)</h2>
|
||||
<p className="muted">Der Betreiber sieht Namen, Zustand, Eigentümer und Verwalter, aber keine Inhalte.</p>
|
||||
<p className="muted">
|
||||
Der Betreiber sieht Namen, Zustand, Eigentümer und Verwalter, aber keine Inhalte. Einen Eigentümer setzt er nur ein, wenn der bisherige nicht mehr
|
||||
handeln kann. Sonst überträgt ihn der Eigentümer selbst.
|
||||
</p>
|
||||
<ErrorNote error={error} />
|
||||
{notice ? <p className="notice" role="status">{notice}</p> : null}
|
||||
<ul className="index">
|
||||
@@ -47,11 +50,18 @@ export function AdminRoomsPanel() {
|
||||
<strong>{room.name}</strong>
|
||||
<span>
|
||||
{room.status === "archived" ? "Archiviert · " : ""}
|
||||
{room.members} Mitglied(er) · {room.has_manager ? `Verwalter: ${room.managers.join(", ")}` : "Kein aktiver Verwalter"}
|
||||
{room.members} Mitglied(er) · Eigentümer: {room.owner || "unbekannt"}{room.owner_active ? "" : " (nicht mehr aktiv)"} ·{" "}
|
||||
{room.has_manager ? `Verwalter: ${room.managers.join(", ")}` : "Kein aktiver Verwalter"}
|
||||
</span>
|
||||
<button type="button" className="quiet" onClick={() => setAssign({ room: room.id, email: "", kind: room.has_manager ? "owner" : "managers" })}>
|
||||
{room.has_manager ? "Eigentümer einsetzen" : "Verwalter einsetzen"}
|
||||
</button>
|
||||
{!room.has_manager ? (
|
||||
<button type="button" className="quiet" onClick={() => setAssign({ room: room.id, email: "", kind: "managers" })}>
|
||||
Verwalter einsetzen
|
||||
</button>
|
||||
) : !room.owner_active ? (
|
||||
<button type="button" className="quiet" onClick={() => setAssign({ room: room.id, email: "", kind: "owner" })}>
|
||||
Eigentümer einsetzen
|
||||
</button>
|
||||
) : null}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
+31
-20
@@ -8,6 +8,7 @@
|
||||
--text2: #5c574e;
|
||||
--text3: #6f6a62;
|
||||
--brand: #085041;
|
||||
--brand-ink: #085041;
|
||||
--accent: #1d9e75;
|
||||
--accent-2: #5dcaa5;
|
||||
--accent-3: #9fe1cb;
|
||||
@@ -31,9 +32,10 @@
|
||||
--border2: rgba(255, 255, 255, 0.14);
|
||||
--text1: #eeecea;
|
||||
--text2: #aaa9a4;
|
||||
--text3: #686762;
|
||||
--text3: #8b8a85;
|
||||
--accent-light: #04342c;
|
||||
--accent-dark: #5dcaa5;
|
||||
--brand-ink: #5dcaa5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,8 +183,8 @@ label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(-
|
||||
background: var(--bg);
|
||||
}
|
||||
.login-card { width: min(28rem, 100%); display: grid; gap: 16px; }
|
||||
.login-card h1 { color: var(--brand); letter-spacing: -0.02em; font-size: 28px; margin: 0; }
|
||||
.login-mark { color: var(--brand); display: grid; justify-content: center; pointer-events: none; }
|
||||
.login-card h1 { color: var(--brand-ink); letter-spacing: -0.02em; font-size: 28px; margin: 0; }
|
||||
.login-mark { color: var(--brand-ink); display: grid; justify-content: center; pointer-events: none; }
|
||||
|
||||
.app-shell {
|
||||
display: flex;
|
||||
@@ -586,7 +588,7 @@ button.nav-item:active { transform: none; }
|
||||
font-size: 15px;
|
||||
letter-spacing: 0.01em;
|
||||
text-transform: none;
|
||||
color: var(--brand);
|
||||
color: var(--brand-ink);
|
||||
font-weight: 700;
|
||||
}
|
||||
.chapter-title.is-nested { font-size: 14px; font-weight: 650; }
|
||||
@@ -603,7 +605,7 @@ button.nav-item:active { transform: none; }
|
||||
justify-content: center;
|
||||
flex: none;
|
||||
background: transparent;
|
||||
color: var(--brand);
|
||||
color: var(--brand-ink);
|
||||
border: 1px solid var(--border2);
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -621,7 +623,7 @@ button.nav-item:active { transform: none; }
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--brand);
|
||||
color: var(--brand-ink);
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
}
|
||||
@@ -658,7 +660,7 @@ button.nav-item:active { transform: none; }
|
||||
.bezug-trigger { width: auto; min-height: 28px; height: 28px; }
|
||||
}
|
||||
.markdown-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
|
||||
.markdown-editor__preview { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 8rem; overflow: auto; }
|
||||
.markdown-editor__preview { border: 1px solid var(--border2); border-radius: 8px; padding: 10px 12px; min-height: 8rem; overflow: auto; }
|
||||
.markdown-editor__preview h1, .markdown-editor__preview h2, .markdown-editor__preview h3 { margin: 0.4em 0; }
|
||||
.markdown-editor__preview p, .markdown-editor__preview ul, .markdown-editor__preview ol { margin: 0.4em 0; }
|
||||
@media (max-width: 720px) {
|
||||
@@ -787,7 +789,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
border: 1px solid var(--border2);
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
color: var(--brand);
|
||||
color: var(--brand-ink);
|
||||
font-size: 13px;
|
||||
font-weight: 650;
|
||||
}
|
||||
@@ -842,7 +844,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
}
|
||||
.menu-popover__panel button[aria-selected="true"] { background: var(--accent-light); color: var(--brand); }
|
||||
.menu-popover__panel button[aria-selected="true"] { background: var(--accent-light); color: var(--brand-ink); }
|
||||
.menu-popover__panel button.danger { background: #fcebeb; color: var(--danger); }
|
||||
.menu-popover__label { margin: 6px 4px 0; color: var(--text3); font-size: 12px; font-weight: 700; }
|
||||
.bezug-entry { display: grid; gap: 2px; }
|
||||
@@ -861,7 +863,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
height: auto;
|
||||
padding: 0 6px;
|
||||
background: transparent;
|
||||
color: var(--brand);
|
||||
color: var(--brand-ink);
|
||||
font-size: 13px;
|
||||
font-weight: 650;
|
||||
}
|
||||
@@ -1007,7 +1009,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
.mail-preview p span, .mail-letter p span { display: inline-block; min-width: 3.2rem; color: var(--text3); font-size: 12px; font-weight: 700; }
|
||||
.mail-preview__party { font-weight: 700; }
|
||||
.mail-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.mail-files button.is-current { background: var(--accent-light); color: var(--text); }
|
||||
.mail-files button.is-current { background: var(--accent-light); color: var(--text1); }
|
||||
.mail-attachment__caption { margin: 12px 0 0; font-weight: 650; }
|
||||
.schriftwechsel {
|
||||
display: grid;
|
||||
@@ -1063,7 +1065,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
}
|
||||
.mail-letter__html td,
|
||||
.mail-letter__html th {
|
||||
border: 1px solid var(--line);
|
||||
border: 1px solid var(--border2);
|
||||
padding: 4px 6px;
|
||||
vertical-align: top;
|
||||
}
|
||||
@@ -1189,7 +1191,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
aspect-ratio: 280 / 298;
|
||||
}
|
||||
|
||||
.app-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; }
|
||||
.app-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-ink); text-decoration: none; }
|
||||
.app-main:has(.workspace) {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
@@ -1262,7 +1264,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
padding: 8px 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
.surface-tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--accent); }
|
||||
.surface-tabs button[aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--accent); }
|
||||
.structure { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 10px 12px; overflow: hidden; }
|
||||
.structure__tree, .structure__chapters { min-height: 0; overflow: auto; }
|
||||
.structure__tree { flex: 1 1 auto; }
|
||||
@@ -1299,7 +1301,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
margin-top: 1px;
|
||||
}
|
||||
.nav-tree__title { min-width: 0; flex: 1; overflow-wrap: break-word; }
|
||||
.nav-tree__link.is-current, .chapter-link.is-current { background: var(--accent-light); color: var(--brand); }
|
||||
.nav-tree__link.is-current, .chapter-link.is-current { background: var(--accent-light); color: var(--brand-ink); }
|
||||
.nav-tree__link.is-current .nav-tree__title, .nav-tree__link.is-ancestor .nav-tree__title { font-weight: 700; }
|
||||
.chapter-links { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--border); }
|
||||
.chapter-links li { display: flex; align-items: center; gap: 2px; }
|
||||
@@ -1389,7 +1391,7 @@ button.unit-switch {
|
||||
line-height: 22px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
button.unit-switch[aria-expanded="true"] { color: var(--brand); }
|
||||
button.unit-switch[aria-expanded="true"] { color: var(--brand-ink); }
|
||||
.unit-detail, .comparison, .chrono { display: grid; gap: 8px; margin-top: 8px; }
|
||||
.unit-detail--slim { gap: 4px; margin-top: 2px; justify-items: start; text-align: left; }
|
||||
.unit-detail h4, .chrono h3 { margin: 0; font-size: 13px; text-align: left; }
|
||||
@@ -1453,7 +1455,7 @@ body.is-list-carry .preview-row:not(.is-carry-source) > .entry-mark[data-assign-
|
||||
border: 1px dashed var(--accent);
|
||||
border-radius: 6px;
|
||||
background: var(--accent-light);
|
||||
color: var(--brand);
|
||||
color: var(--brand-ink);
|
||||
font-size: 13px;
|
||||
font-weight: 650;
|
||||
line-height: 20px;
|
||||
@@ -1469,7 +1471,7 @@ body.is-list-carry .preview-row:not(.is-carry-source) > .entry-mark[data-assign-
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
background: var(--accent-light);
|
||||
color: var(--brand);
|
||||
color: var(--brand-ink);
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
line-height: 22px;
|
||||
@@ -1562,7 +1564,7 @@ button.pick-tree__twist {
|
||||
}
|
||||
.chapter-menu { flex-wrap: wrap; }
|
||||
.trail, .chapter-title, .target-line, .export-tree__title { overflow-wrap: anywhere; }
|
||||
.chapter-link__move button:hover:not(:disabled) { background: var(--accent-light); color: var(--brand); }
|
||||
.chapter-link__move button:hover:not(:disabled) { background: var(--accent-light); color: var(--brand-ink); }
|
||||
.chapter-link__move button:disabled { opacity: 0.35; }
|
||||
.chapter-add { justify-content: flex-start; }
|
||||
.content-toolbar { align-items: center; margin-bottom: 6px; gap: 8px; }
|
||||
@@ -1621,7 +1623,7 @@ button.pick-tree__twist {
|
||||
.reader-pane__heading h2 { font-size: 22px; overflow-wrap: anywhere; margin: 0; }
|
||||
.mail-letter__way { display: flex; align-items: center; gap: 8px; }
|
||||
.reader-pane__heading p, .reader-back { color: var(--text2); font-size: 14px; }
|
||||
.reader-back { background: transparent; color: var(--brand); padding-inline: 0; }
|
||||
.reader-back { background: transparent; color: var(--brand-ink); padding-inline: 0; }
|
||||
.reader-pane__tools { display: flex; gap: 4px; }
|
||||
.reader-pane__stage { flex: 1; min-height: 240px; overflow: auto; padding: 8px 16px 16px; }
|
||||
.reader-pane__state, .reader-note {
|
||||
@@ -1727,3 +1729,12 @@ button.pick-tree__twist {
|
||||
background: var(--surface);
|
||||
}
|
||||
.share-target.is-over { border-color: var(--accent); background: var(--accent-light); color: var(--text1); }
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.workspace-nav { background: var(--surface2); }
|
||||
.workspace-reader { background: #1a2420; }
|
||||
.status-pill { background: #3a2f12; color: #e8c880; }
|
||||
.status-pill.is-closed { background: #2a2a28; color: var(--text2); }
|
||||
.context-select select { background: var(--surface); }
|
||||
.menu-popover__panel button.danger { background: rgba(216, 90, 48, 0.16); }
|
||||
}
|
||||
Reference in new issue
Block a user