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; }