From 322ad491c1a4a3fac2e8baf18f75371d88548fc0 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 22 Oct 2026 11:55:13 +0200 Subject: [PATCH] =?UTF-8?q?=C3=9Cbertrage=20den=20Stil=20des=20Ordnerbaums?= =?UTF-8?q?=20auf=20die=20Struktur=20in=20Akte=20und=20Vorgang.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Strukturspalte der Detailseiten nutzt jetzt dieselben farbigen Symbole wie die Ablage: Ordner für Akten, Dokumentstapel für Vorgänge, Lesezeichen für Kapitel und Unterkapitel, Liste für Überblick und Inhalte, Kette für Querverweise. Zeilen, Hover, Auswahl, Auf- und Zuklappen und die Einrückung der Unterstrukturen entsprechen dem Ordnerbaum, in Hell und Dunkel. Im Browser gegen die lokale Umgebung geprüft (Akte mit Kapiteln und Unterkapiteln, Vorgang, Hell und Dunkel). Der Frontend-Build und alle Node-Tests laufen grün. Co-Authored-By: Claude Sonnet 5.5 --- frontend/src/library/MiniIcon.jsx | 22 ++++++++++++++++++++++ frontend/src/pages/workspace.jsx | 10 ++++++---- frontend/src/styles.css | 23 ++++++++++++++++++++++- 3 files changed, 50 insertions(+), 5 deletions(-) diff --git a/frontend/src/library/MiniIcon.jsx b/frontend/src/library/MiniIcon.jsx index e268110..01d7786 100644 --- a/frontend/src/library/MiniIcon.jsx +++ b/frontend/src/library/MiniIcon.jsx @@ -9,6 +9,28 @@ export function MiniIcon({ kind }) { ); } + if (kind === "chapter") { + return ( + + + + ); + } + if (kind === "contents") { + return ( + + + + + ); + } + if (kind === "link") { + return ( + + + + ); + } if (kind === "room") { return ( diff --git a/frontend/src/pages/workspace.jsx b/frontend/src/pages/workspace.jsx index d2f946b..45b455a 100644 --- a/frontend/src/pages/workspace.jsx +++ b/frontend/src/pages/workspace.jsx @@ -2,6 +2,7 @@ import { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import { chapterPathLabel } from "./chapters.js"; import { NavIcon } from "./icons.jsx"; +import { MiniIcon } from "../library/MiniIcon.jsx"; export function useWorkspaceLayout() { const [width, setWidth] = useState(() => (typeof window === "undefined" ? 1280 : window.innerWidth)); @@ -52,12 +53,13 @@ export function Workspace({ width, structureOpen, setStructureOpen, hasEntry, na ); } +// The same colored symbols as in the library tree: folder for cases, document stack for matters. function structureIcon(kind) { - if (kind === "Akte" || kind === "Unterakte") return "folder"; + if (kind === "Akte" || kind === "Unterakte" || kind === "Weitere Akte") return "case"; if (kind === "Kapitel" || kind === "Unterkapitel") return "chapter"; if (kind === "Inhalte") return "contents"; - if (kind === "Querverweis" || kind === "Weitere Akte") return "link"; - return "layers"; + if (kind === "Querverweis") return "link"; + return "matter"; } function branchHasCurrent(node) { @@ -67,7 +69,7 @@ function branchHasCurrent(node) { function TreeRow({ node, onNavigate, ancestor = false, toggle = null }) { const className = node.current ? "nav-tree__link is-current" : ancestor ? "nav-tree__link is-ancestor" : "nav-tree__link"; - const icon = ; + const icon = ; const name = node.path ? `${node.kind}: ${node.path}` : `${node.kind}: ${node.title}`; const label = ( diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 80d2db3..68c7ba7 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -12,6 +12,7 @@ --kind-case: #1d9e75; --kind-matter: #3f78ad; --kind-room: #8a64b4; + --kind-chapter: #b97a1e; --accent: #1d9e75; --accent-2: #5dcaa5; --accent-3: #9fe1cb; @@ -42,6 +43,7 @@ --kind-case: #2fb48a; --kind-matter: #5b94cb; --kind-room: #a583cf; + --kind-chapter: #e0a247; } } @@ -1727,10 +1729,29 @@ button.pick-tree__twist { @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); } } + +/* ---- Structure column of cases and matters: same look as the library tree ---- */ +.workspace-nav { background: var(--surface2); } +.structure__bar h2 { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text2); font-weight: 700; } +.structure { padding: 14px 10px 24px; } +.nav-tree__link, .chapter-link, button.nav-tree__link { min-height: 34px; padding: 5px 8px; border-radius: 8px; font-size: 13px; align-items: center; color: var(--text1); } +.nav-tree__link:hover:not(.is-current), .chapter-link:hover:not(.is-current) { background: color-mix(in srgb, var(--accent) 10%, transparent); } +.nav-tree__link.is-current, .chapter-link.is-current { background: var(--accent-light); color: var(--accent-dark); } +.nav-tree__link.is-ancestor .nav-tree__title { font-weight: 700; } +.nav-tree__icon { flex: none; display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; margin-top: 0; } +.nav-tree__icon .mini-icon { width: 17px; height: 17px; vertical-align: 0; } +.nav-tree__toggle { width: 24px; min-width: 24px; height: 30px; min-height: 30px; font-size: 14px; color: var(--text2); } +.nav-tree__toggle:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); } +.nav-tree ul { padding-left: 12px; margin-left: 11px; border-left: 1px solid var(--border); } +.nav-tree__kind { color: var(--text2); font-weight: 600; } +.mini-icon--chapter { color: var(--kind-chapter, #c9892b); } +.mini-icon--contents { color: var(--text2); } +.mini-icon--link { color: var(--kind-room); } +.structure__links { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border); } +.structure__links h3 { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text2); margin: 0 8px 4px; }