Übertrage den Stil des Ordnerbaums auf die Struktur in Akte und Vorgang.
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
64dce6c20c
commit
322ad491c1
3 files changed
+50
-5
No files matched your search
@@ -9,6 +9,28 @@ export function MiniIcon({ kind }) {
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
if (kind === "chapter") {
|
||||
return (
|
||||
<svg {...common}>
|
||||
<path d="M6 3h11a1 1 0 0 1 1 1v17l-6.5-4L5 21V4a1 1 0 0 1 1-1z" fill="currentColor" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
if (kind === "contents") {
|
||||
return (
|
||||
<svg {...common}>
|
||||
<rect x="3" y="3" width="18" height="18" rx="3" fill="currentColor" />
|
||||
<path d="M7 9h10M7 12.5h10M7 16h6" stroke="var(--surface)" strokeWidth="1.7" strokeLinecap="round" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
if (kind === "link") {
|
||||
return (
|
||||
<svg {...common}>
|
||||
<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
if (kind === "room") {
|
||||
return (
|
||||
<svg {...common}>
|
||||
|
||||
@@ -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 = <NavIcon name={structureIcon(node.kind)} />;
|
||||
const icon = <span className="nav-tree__icon"><MiniIcon kind={structureIcon(node.kind)} /></span>;
|
||||
const name = node.path ? `${node.kind}: ${node.path}` : `${node.kind}: ${node.title}`;
|
||||
const label = (
|
||||
<span className="nav-tree__title">
|
||||
|
||||
+22
-1
@@ -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; }
|
||||
Reference in new issue
Block a user