Halte die gewaehlte Inhaltsliste beim Oeffnen und mache Typ sowie das Logo auf dunkler Flaeche aus der Lieferung erkennbar.
Deploy Development / deploy (push) Successful in 25s
Test Suite / pytest-backend (push) Successful in 56s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 8s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-17 15:50:05 +02:00
1 parent dc8a9c2db6
commit 97bffc6175
71 files changed
+572 -142

No files matched your search

+96
View File
@@ -0,0 +1,96 @@
import { useEffect, useState } from "react";
import "./jinkendo-mark.css";
const LABELS = { mitai: "Mitai", shinkan: "Shinkan", kairo: "Kairo", kansho: "Kanshō", tsumugu: "Tsumugu" };
/**
* Existing raster brush and product motif on separate layers.
* motion: intro = one turn on mount; busy = only during a real pending operation;
* none = static. No business state or navigation depends on the animation.
*/
export function JinkendoMark({
product = "tsumugu",
size = 48,
motion = "intro",
assetBase = "/brand/enso-motion-v1",
label,
onIntroComplete,
className = "",
}) {
if (!Object.hasOwn(LABELS, product)) throw new Error(`Unknown Jinkendo product: ${product}`);
const [ringSource, setRingSource] = useState(null);
const [symbolSource, setSymbolSource] = useState(null);
const [failedSource, setFailedSource] = useState(null);
const [introDone, setIntroDone] = useState(false);
const [visible, setVisible] = useState(() => typeof document === "undefined" || !document.hidden);
const [reduced, setReduced] = useState(() => typeof window === "undefined" || window.matchMedia("(prefers-reduced-motion: reduce)").matches);
const source = `${assetBase.replace(/\/$/, "")}/${product}`;
useEffect(() => {
const query = window.matchMedia("(prefers-reduced-motion: reduce)");
const updateMotion = () => {
setReduced(query.matches);
if (query.matches) setIntroDone(true);
};
const updateVisibility = () => setVisible(!document.hidden);
updateMotion();
updateVisibility();
query.addEventListener("change", updateMotion);
document.addEventListener("visibilitychange", updateVisibility);
return () => {
query.removeEventListener("change", updateMotion);
document.removeEventListener("visibilitychange", updateVisibility);
};
}, []);
useEffect(() => {
setIntroDone(false);
}, [source]);
useEffect(() => {
if (motion !== "intro" || reduced) setIntroDone(true);
}, [motion, reduced]);
const ready = ringSource === source && symbolSource === source && failedSource !== source;
const active = !ready || reduced ? "none" : motion === "busy" ? "busy" : motion === "intro" && !introDone ? "intro" : "none";
return (
<span
role="img"
aria-label={label || LABELS[product]}
className={`jk-mark jk-mark--${active} ${className}`.trim()}
data-ready={ready ? "true" : "false"}
style={{ "--jk-mark-size": `${size}px`, "--jk-ring-play-state": visible ? "running" : "paused" }}
>
<img className="jk-mark__poster" src={`${source}/logo-rest.png`} alt="" aria-hidden="true" width="320" height="320" />
<img
key={`${source}/ring-layer.png`}
className="jk-mark__ring"
src={`${source}/ring-layer.png`}
alt=""
aria-hidden="true"
width="320"
height="320"
onLoad={() => setRingSource(source)}
onError={() => setFailedSource(source)}
onAnimationEnd={(event) => {
if (event.animationName === "jk-enso-intro") {
setIntroDone(true);
onIntroComplete?.();
}
}}
/>
<img
key={`${source}/symbol-layer.png`}
className="jk-mark__symbol"
src={`${source}/symbol-layer.png`}
alt=""
aria-hidden="true"
width="320"
height="320"
onLoad={() => setSymbolSource(source)}
onError={() => setFailedSource(source)}
/>
</span>
);
}
+50
View File
@@ -0,0 +1,50 @@
.jk-mark {
display: inline-block;
position: relative;
flex: 0 0 auto;
width: var(--jk-mark-size, 48px);
height: var(--jk-mark-size, 48px);
overflow: hidden;
border-radius: 18.125%;
background: #085041;
vertical-align: middle;
isolation: isolate;
}
.jk-mark > img {
display: block;
position: absolute;
inset: 0;
width: 100%;
height: 100%;
max-width: none;
margin: 0;
object-fit: contain;
pointer-events: none;
user-select: none;
}
.jk-mark__poster { z-index: 0; }
.jk-mark__ring { z-index: 1; transform-origin: 50% 50%; }
.jk-mark__symbol { z-index: 2; }
.jk-mark[data-ready="false"] .jk-mark__ring,
.jk-mark[data-ready="false"] .jk-mark__symbol { visibility: hidden; }
.jk-mark[data-ready="true"] .jk-mark__poster { visibility: hidden; }
.jk-mark--intro .jk-mark__ring {
animation: jk-enso-intro 2400ms ease-in-out 1 both;
animation-play-state: var(--jk-ring-play-state, running);
}
.jk-mark--busy .jk-mark__ring {
animation: jk-enso-busy 3200ms linear infinite;
animation-play-state: var(--jk-ring-play-state, running);
}
@keyframes jk-enso-intro { from { transform: rotate(-360deg); } to { transform: rotate(0deg); } }
@keyframes jk-enso-busy { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.jk-mark--intro .jk-mark__ring,
.jk-mark--busy .jk-mark__ring { animation: none; transform: none; }
}
+22
View File
@@ -0,0 +1,22 @@
/* For animated marks only. Static logo-on-dark PNGs already contain this frame. */
.jk-logo-frame {
--jk-frame-size: 48px;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
box-sizing: border-box;
width: var(--jk-frame-size);
height: var(--jk-frame-size);
padding: calc(var(--jk-frame-size) / 16);
border: calc(var(--jk-frame-size) / 48) solid #5dcaa5;
border-radius: calc(var(--jk-frame-size) * 5 / 24);
background: #146b57;
overflow: hidden;
vertical-align: middle;
}
.jk-logo-frame > .jk-mark {
--jk-mark-size: calc(var(--jk-frame-size) * 5 / 6);
width: calc(var(--jk-frame-size) * 5 / 6);
height: calc(var(--jk-frame-size) * 5 / 6);
}
+26
View File
@@ -0,0 +1,26 @@
/** UI classification only. The server's element kind and access rules are unchanged. */
export function contentSymbol(element = {}) {
if (element.kind === "note") return "note";
const detail = element.external?.detail || {};
const mime = String(element.file?.content_type || detail.content_type || detail.mime_type || "").split(";")[0].trim().toLowerCase();
const filename = String(element.file?.filename || detail.filename || "");
const ext = filename.toLowerCase().split(".").slice(1).pop() || "";
const media = element.preview?.media;
if (mime === "application/pdf" || media === "pdf" || ext === "pdf") return "pdf";
if (mime.startsWith("image/") || media === "image" || /^(png|jpe?g|webp|gif|heic|avif|svg|tiff?)$/.test(ext)) return "image";
if (mime.startsWith("audio/") || /^(mp3|wav|ogg|m4a|flac|aac)$/.test(ext)) return "audio";
if (mime.startsWith("video/") || /^(mp4|webm|mov|mkv|avi)$/.test(ext)) return "video";
if (mime === "message/rfc822" || mime === "application/vnd.ms-outlook" || /^(eml|msg)$/.test(ext)) return "email";
if (/spreadsheet|excel|csv|tab-separated/.test(mime) || /^(xlsx?|ods|csv|tsv)$/.test(ext)) return "spreadsheet";
if (/presentation|powerpoint/.test(mime) || /^(pptx?|odp)$/.test(ext)) return "presentation";
if (/zip|compressed|gzip|x-tar/.test(mime) || /^(zip|7z|rar|tar|gz|tgz)$/.test(ext)) return "archive";
if (/javascript|json|xml/.test(mime) || /^(js|jsx|ts|tsx|py|json|xml|html?|css|sql|ya?ml)$/.test(ext)) return "code";
if (mime.startsWith("text/") || /word|opendocument.text|rtf/.test(mime) || /^(docx?|odt|txt|rtf|md)$/.test(ext)) return "document";
// Paperless is an origin, not proof that a resource is a PDF. Do not infer format from a title.
if (element.kind === "external_ref") return element.external?.source === "paperless" ? "file" : "link";
return "file";
}
export function contentSourceSymbol(element = {}) {
return element.external?.source === "paperless" ? "source-archive" : null;
}
+4 -13
View File
@@ -356,14 +356,6 @@ export function CaseDetail() {
}
}, [record, id, rawScope, overview, chapterId, params, setParams, navigate]);
useEffect(() => {
if (!record || record.id !== id || !entryId || overview) return;
const binding = (record.bindings || []).find((item) => item.id === entryId);
if (!binding) return;
const nextChapter = binding.chapter_id || "";
if ((chapterId || "") !== nextChapter) writeSelection(params, setParams, "direct", nextChapter);
}, [record, id, entryId, overview, chapterId, params, setParams]);
useEffect(() => {
if (entryId) return;
restoreScroll(listRef.current, `tsumugu-scroll:case:${id}:${chapterId}:${overview ? "over" : "direct"}`);
@@ -395,8 +387,6 @@ export function CaseDetail() {
const updated = new URLSearchParams(params);
updated.delete("bereich");
updated.set("eintrag", binding.id);
if (binding.chapter_id) updated.set("kapitel", binding.chapter_id);
else updated.delete("kapitel");
setParams(updated);
setView("contents");
}
@@ -536,10 +526,11 @@ export function CaseDetail() {
onOpen={openEntry}
onChange={load}
itemHref={(binding) => {
const search = new URLSearchParams();
const search = new URLSearchParams(params);
search.delete("bereich");
search.set("eintrag", binding.id);
if (binding.chapter_id) search.set("kapitel", binding.chapter_id);
return `/cases/${id}?${search}`;
const text = search.toString();
return text ? `/cases/${id}?${text}` : `/cases/${id}`;
}}
/>
) : null}
+9 -5
View File
@@ -14,6 +14,8 @@ export function Login() {
const [bootstrap, setBootstrap] = useState(undefined);
const [displayName, setDisplayName] = useState("");
const [pending, setPending] = useState(false);
const [introSettled, setIntroSettled] = useState(false);
const markMotion = pending ? "busy" : introSettled ? "none" : "intro";
useEffect(() => {
api("/api/v1/auth/demo")
@@ -26,6 +28,7 @@ export function Login() {
async function submit(event) {
event.preventDefault();
setIntroSettled(true);
setPending(true);
setError("");
try {
@@ -42,6 +45,7 @@ export function Login() {
async function createOperator(event) {
event.preventDefault();
setIntroSettled(true);
setPending(true);
setError("");
try {
@@ -62,12 +66,12 @@ export function Login() {
return (
<main className="login">
<section className="card login-card">
<p className="login-mark"><Mark size={72} /></p>
<p className="login-mark"><Mark size={96} motion={markMotion} onIntroComplete={() => setIntroSettled(true)} /></p>
<p className="eyebrow">Jinkendo</p>
<h1>Tsumugu</h1>
<p className="lead">Akten, Vorgänge und Fristen an einem Ort. Die erste Lieferung organisiert und verfolgt.</p>
{bootstrap === undefined ? null : bootstrap?.available ? (
<form onSubmit={createOperator} className="stack">
<form onSubmit={createOperator} className="stack" aria-busy={pending}>
<h2>Betreiberkonto</h2>
<p className="muted">Das erste Konto wird Betreiber und kann danach weitere Nutzer anlegen.</p>
<label>
@@ -83,10 +87,10 @@ export function Login() {
<input type="password" autoComplete="new-password" value={password} onChange={(event) => setPassword(event.target.value)} required minLength={10} />
</label>
{error ? <p className="error">{error}</p> : null}
<button type="submit" className="btn-full" disabled={pending}>{pending ? "Wird angelegt …" : "Betreiberkonto anlegen"}</button>
<button type="submit" className="btn-full" disabled={pending} aria-busy={pending}>{pending ? "Wird angelegt …" : "Betreiberkonto anlegen"}</button>
</form>
) : (
<form onSubmit={submit} className="stack">
<form onSubmit={submit} className="stack" aria-busy={pending}>
<label>
E-Mail
<input type="email" autoComplete="username" value={email} onChange={(event) => setEmail(event.target.value)} required />
@@ -96,7 +100,7 @@ export function Login() {
<input type="password" autoComplete="current-password" value={password} onChange={(event) => setPassword(event.target.value)} required />
</label>
{error ? <p className="error">{error}</p> : null}
<button type="submit" className="btn-full" disabled={pending}>{pending ? "Anmeldung …" : "Anmelden"}</button>
<button type="submit" className="btn-full" disabled={pending} aria-busy={pending}>{pending ? "Anmeldung …" : "Anmelden"}</button>
</form>
)}
{demo ? (
+3 -13
View File
@@ -280,14 +280,6 @@ export function MatterDetail() {
};
}, [inherited?.kind, inherited?.id]);
useEffect(() => {
if (!record || record.id !== id || !entryId) return;
const binding = (record.bindings || []).find((item) => item.id === entryId);
if (!binding) return;
const nextChapter = binding.chapter_id || "";
if ((chapterId || "") !== nextChapter) writeChapter(params, setParams, nextChapter);
}, [record, id, entryId, chapterId, params, setParams]);
useEffect(() => {
if (entryId) return;
restoreScroll(listRef.current, `tsumugu-scroll:${id}:${chapterId}`);
@@ -308,8 +300,6 @@ export function MatterDetail() {
rememberScroll(listRef.current, `tsumugu-scroll:${id}:${chapterId}`);
const updated = new URLSearchParams(params);
updated.set("eintrag", binding.id);
if (binding.chapter_id) updated.set("kapitel", binding.chapter_id);
else updated.delete("kapitel");
setParams(updated);
setView("contents");
}
@@ -462,10 +452,10 @@ export function MatterDetail() {
}}
onChange={load}
itemHref={(binding) => {
const search = new URLSearchParams(query.replace(/^\?/, ""));
const search = new URLSearchParams(params);
search.set("eintrag", binding.id);
if (binding.chapter_id) search.set("kapitel", binding.chapter_id);
return `/matters/${id}?${search}`;
const text = search.toString();
return text ? `/matters/${id}?${text}` : `/matters/${id}`;
}}
/>
) : null}
+36 -2
View File
@@ -32,6 +32,8 @@ export function Shell() {
const [query, setQuery] = useState("");
const [more, setMore] = useState(false);
const [width, setWidth] = useState(() => window.innerWidth);
const [markIntroDone, setMarkIntroDone] = useState(false);
const markMotion = markIntroDone ? "none" : "intro";
useEffect(() => {
const onResize = () => setWidth(window.innerWidth);
@@ -39,6 +41,34 @@ export function Shell() {
return () => window.removeEventListener("resize", onResize);
}, []);
// Desktop- und Mobilkopf teilen sich den Intro-Verbrauch. Wird die bisher
// verdeckte Darstellung sichtbar, setzt sie dieselbe Umdrehung fort.
useEffect(() => {
if (markIntroDone || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return undefined;
let carried = 0;
let frames = 0;
let frame = 0;
const tick = () => {
frames += 1;
for (const ring of document.querySelectorAll(".app-shell .jk-mark__ring")) {
if (ring.offsetParent === null) continue;
const anim = [...ring.getAnimations()].find((item) => item.animationName === "jk-enso-intro");
if (!anim || typeof anim.currentTime !== "number") continue;
if (carried - anim.currentTime > 48) anim.currentTime = carried;
carried = Math.max(carried, anim.currentTime);
}
if (carried >= 2400) {
setMarkIntroDone(true);
return;
}
const playing = document.querySelector(".app-shell .jk-mark--intro");
const waiting = document.querySelector('.app-shell .jk-mark[data-ready="false"]');
if ((playing || waiting) && frames < 1800) frame = requestAnimationFrame(tick);
};
frame = requestAnimationFrame(tick);
return () => cancelAnimationFrame(frame);
}, [markIntroDone]);
useEffect(() => {
setMore(false);
}, [location.pathname]);
@@ -70,7 +100,9 @@ export function Shell() {
<div className={`app-shell${compact ? " is-compact" : ""}`}>
<aside className="rail" aria-label="Hauptnavigation">
<div className="rail__brand">
<Mark />
<span className="jk-logo-frame" style={{ "--jk-frame-size": compact ? "40px" : "48px" }}>
<Mark motion={markMotion} onIntroComplete={() => setMarkIntroDone(true)} />
</span>
<span className="rail__name">Tsumugu</span>
</div>
<button
@@ -118,7 +150,9 @@ export function Shell() {
<div className="app-shell__column">
<header className="app-header mobile-only">
<NavLink to="/" className="app-logo" aria-label="Tsumugu">
<Mark size={28} />
<span className="jk-logo-frame jk-logo-frame--plain" style={{ "--jk-frame-size": "36px" }}>
<Mark size={28} motion={markMotion} onIntroComplete={() => setMarkIntroDone(true)} />
</span>
<span>Tsumugu</span>
</NavLink>
<form className="search" onSubmit={onSearch}>
+90 -70
View File
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from "react";
import { Link } from "react-router-dom";
import workerSrc from "pdfjs-dist/build/pdf.worker.min.mjs?url";
import { api, fetchFile, fetchPaperless } from "../api.js";
import { contentSourceSymbol, contentSymbol } from "../content-symbol.mjs";
import { Modal } from "./Modal.jsx";
import { ErrorNote } from "./widgets.jsx";
@@ -220,82 +220,89 @@ export function WorkSwitch({ view, onView }) {
);
}
const SYMBOL_LABEL = {
pdf: "PDF",
document: "Textdokument",
note: "Notiz",
email: "E-Mail",
image: "Bild",
audio: "Audio",
video: "Video",
spreadsheet: "Tabelle",
presentation: "Präsentation",
archive: "Archiv",
link: "Verweis",
attachment: "Anhang",
file: "Datei",
code: "Code",
};
function elementSymbol(element) {
if (element?.external?.source === "imap") return "email";
return contentSymbol(element || {});
}
function sourceLabel(element) {
if (element.kind === "note") return "Notiz";
if (element.kind === "external_ref") return element.external?.source === "paperless" ? "Paperless" : "Referenz";
if (element.file?.content_type === "application/pdf") return "PDF";
if (element.file?.content_type?.startsWith("image/")) return "Bild";
if (element.kind === "file") return "Datei";
return kindLabel(element.kind);
const type = SYMBOL_LABEL[elementSymbol(element)] || "Datei";
if (element.external?.source === "paperless") return `${type} · Paperless`;
if (element.external?.source === "imap") return "E-Mail";
if (element.kind === "external_ref" && type === "Verweis") return "Referenz";
return type;
}
function blurb(element) {
return element.summary || element.excerpt || "";
}
function PdfThumb({ url, title }) {
const canvasRef = useRef(null);
const [failed, setFailed] = useState(false);
useEffect(() => {
let alive = true;
let doc;
(async () => {
try {
const pdfjs = await import("pdfjs-dist");
pdfjs.GlobalWorkerOptions.workerSrc = workerSrc;
const bytes = await fetch(url).then((response) => response.arrayBuffer());
doc = await pdfjs.getDocument({ data: bytes }).promise;
const pdfPage = await doc.getPage(1);
if (!alive || !canvasRef.current) return;
const base = pdfPage.getViewport({ scale: 1 });
const viewport = pdfPage.getViewport({ scale: 148 / base.width });
const canvas = canvasRef.current;
canvas.width = viewport.width;
canvas.height = viewport.height;
await pdfPage.render({ canvasContext: canvas.getContext("2d"), viewport }).promise;
} catch {
if (alive) setFailed(true);
}
})();
return () => {
alive = false;
doc?.destroy?.();
};
}, [url]);
if (failed) return <span className="thumb thumb--empty">Vorschau nicht verfügbar</span>;
return <canvas ref={canvasRef} className="thumb thumb--pdf" aria-label={`Vorschau ${title}`} />;
function TypeGlyph({ name, tone, size = 28 }) {
return (
<img
className={tone === "dark" ? "type-glyph type-glyph--dark" : "type-glyph type-glyph--light"}
src={`/ui/content-symbols-v1/${tone}/${name}.svg`}
width={size}
height={size}
alt=""
/>
);
}
function Thumb({ element, context }) {
function EntryMark({ element, context }) {
const symbol = elementSymbol(element);
const photo = symbol === "image" && Boolean(element.preview?.available);
const [url, setUrl] = useState("");
const [media, setMedia] = useState("");
const [failed, setFailed] = useState(false);
useEffect(() => {
if (!element.preview?.available) return undefined;
if (!photo) return undefined;
let alive = true;
let current = "";
const load = element.preview.source === "paperless" ? fetchPaperless(element.id, context) : fetchFile(element.id, context);
load.then((blob) => {
if (!alive) return;
if (!alive || !blob.type.startsWith("image/")) return;
current = URL.createObjectURL(blob);
setUrl(current);
if (blob.type.startsWith("image/")) setMedia("image");
else if (blob.type.includes("pdf")) setMedia("pdf");
else setMedia("other");
}).catch(() => {
if (alive) setFailed(true);
if (alive) setUrl("");
});
return () => {
alive = false;
if (current) URL.revokeObjectURL(current);
};
}, [element.id, element.preview?.available, element.preview?.source, context?.kind, context?.id]);
if (element.kind === "note") return <span className="thumb thumb--note">Notiz</span>;
if (url && media === "image") return <img className="thumb" alt="" src={url} />;
if (url && media === "pdf") return <PdfThumb url={url} title={element.title} />;
if (failed) return <span className="thumb thumb--empty">Vorschau nicht verfügbar</span>;
if (element.preview?.available) return <span className="thumb thumb--empty">Vorschau wird geladen</span>;
return <span className="thumb thumb--empty">Keine Vorschau</span>;
}, [photo, element.id, element.preview?.source, context?.kind, context?.id]);
return (
<span className={url ? "entry-mark entry-mark--photo" : "entry-mark"}>
{url ? <img className="entry-mark__photo" alt="" src={url} /> : (
<>
<TypeGlyph name={symbol} tone="light" />
<TypeGlyph name={symbol} tone="dark" />
</>
)}
{url ? (
<span className="entry-mark__badge">
<TypeGlyph name="image" tone="light" size={14} />
<TypeGlyph name="image" tone="dark" size={14} />
</span>
) : null}
</span>
);
}
export async function saveChapterOrder({ containerKind, containerId, record, context, ids }) {
@@ -703,6 +710,7 @@ export function ContentBoard({
const movable = canMoveChapters && section.id !== "loose";
const fromIndex = chapters.findIndex((chapter) => chapter.id === draggingId);
const classes = ["content-section"];
if (!onlyChapter && section.title) classes.push("content-section--group");
if (draggingId === section.id) classes.push("is-dragging");
if (!expanded) classes.push("is-collapsed");
const insertBefore = indicator?.kind === "chapter" && fromIndex > indicator.index && chapterIndex === indicator.index;
@@ -721,7 +729,7 @@ export function ContentBoard({
draggable={movable && !pending}
onPointerDownCapture={(event) => {
if (!movable) return;
if (event.target.closest("input, textarea, select, a, label, .chapter-move")) return;
if (event.target.closest("input, textarea, select, a, label, .chapter-move, .chapter-date")) return;
beginDrag(event, { kind: "chapter", chapterId: section.id });
}}
onDragStart={(event) => {
@@ -742,25 +750,28 @@ export function ContentBoard({
</span>
) : null}
<h3 className="chapter-title">{section.title}</h3>
{section.documentOn ? <span className="muted">{formatDate(section.documentOn)}</span> : null}
{section.id !== "loose" ? (
<span className="chapter-date">
<span className="chapter-date__label">Kapiteldatum</span>
{canSort ? (
<input
type="date"
aria-label={`Kapiteldatum für ${section.title}`}
value={section.documentOn || ""}
disabled={pending}
onChange={(event) => saveChapterDate(section.id, event.target.value)}
/>
) : (
<span className="chapter-date__value">{section.documentOn ? formatDate(section.documentOn) : "ohne Datum"}</span>
)}
</span>
) : null}
{movable ? (
<span className="chapter-move">
<button type="button" className="quiet" aria-label={`${section.title} nach oben`} disabled={pending || chapters[0]?.id === section.id} onClick={() => moveChapter(section.id, -1)}>Nach oben</button>
<button type="button" className="quiet" aria-label={`${section.title} nach unten`} disabled={pending || chapters[chapters.length - 1]?.id === section.id} onClick={() => moveChapter(section.id, 1)}>Nach unten</button>
</span>
) : null}
{canSort && section.id !== "loose" ? (
<label className="chapter-date">
Datum
<input
type="date"
aria-label={`Datum für ${section.title}`}
value={section.documentOn || ""}
disabled={pending}
onChange={(event) => saveChapterDate(section.id, event.target.value)}
/>
</label>
) : null}
</div>
) : null}
{expanded && section.title && !section.items.length ? <p className="muted">Noch nichts in diesem Kapitel.</p> : null}
@@ -769,6 +780,7 @@ export function ContentBoard({
const element = binding.element;
const href = itemHref(binding);
const text = blurb(element);
const sourceSymbol = contentSourceSymbol(element);
return (
<li key={binding.id} data-binding={binding.id} className={`preview-row${draggingId === binding.id ? " is-dragging" : ""}${selectedId === binding.id ? " is-selected" : ""}`}>
{indicator?.sectionId === section.id && indicator?.kind !== "chapter" && indicator.index === index ? <div className="insert-line" /> : null}
@@ -791,7 +803,7 @@ export function ContentBoard({
<span className="handle__grip" aria-hidden="true" />
</button>
) : null}
<Thumb element={element} context={context} />
<EntryMark element={element} context={context} />
<Link
className="preview-row__main"
to={href}
@@ -803,7 +815,15 @@ export function ContentBoard({
}}
>
<strong>{element.title}</strong>
<span className="preview-row__meta">{formatDate(fachDate(element))} · {sourceLabel(element)}</span>
<span className="preview-row__meta">
{sourceSymbol ? (
<span className="source-mark">
<TypeGlyph name={sourceSymbol} tone="light" size={16} />
<TypeGlyph name={sourceSymbol} tone="dark" size={16} />
</span>
) : null}
{formatDate(fachDate(element))} · {sourceLabel(element)}
</span>
{text ? <span className="preview-row__text">{text}</span> : null}
{binding.origin ? <span className="preview-row__origin">{binding.origin}{binding.shared ? " · weitere Einbindung" : ""}</span> : null}
{!onlyChapter && !binding.origin && binding.chapter_id ? (
+10 -8
View File
@@ -1,3 +1,6 @@
import { JinkendoMark } from "../brand/JinkendoMark.jsx";
import "../brand/logo-frame.css";
const common = {
width: 22,
height: 22,
@@ -26,15 +29,14 @@ export function NavIcon({ name }) {
return <svg {...common}><circle cx="12" cy="12" r="8" /></svg>;
}
export function Mark({ size = 40 }) {
export function Mark({ size = 40, motion = "none", onIntroComplete, className = "" }) {
return (
<img
className="mark"
src="/brand/logo-original.png"
alt="Tsumugu"
width={280}
height={298}
style={{ height: size, width: "auto" }}
<JinkendoMark
product="tsumugu"
size={size}
motion={motion}
onIntroComplete={onIntroComplete}
className={className}
/>
);
}
+64 -27
View File
@@ -150,7 +150,7 @@ label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(-
}
.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; }
.login-mark { color: var(--brand); display: grid; justify-content: center; pointer-events: none; }
.app-shell {
display: flex;
@@ -446,15 +446,19 @@ label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(-
.content-row__title { font-weight: 650; }
.content-row__kind { color: var(--text3); font-size: 13px; }
.content-row__move { display: flex; gap: 4px; }
.chapter-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 18px; }
.chapter-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.chapter-head.is-movable { cursor: grab; touch-action: none; user-select: none; }
.chapter-head.is-movable:active { cursor: grabbing; }
.chapter-head.is-movable .chapter-date,
.chapter-head.is-movable .chapter-move { cursor: auto; touch-action: auto; user-select: auto; }
.chapter-title { margin: 22px 0 4px; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text1); font-weight: 700; }
.chapter-head .chapter-title { margin: 0; flex: 1 1 8rem; }
.chapter-date { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text3); font-size: 13px; }
.chapter-date { display: flex; align-items: center; gap: 6px; margin: 0 0 0 auto; color: var(--text2); font-size: 13px; }
.chapter-date__label { font-weight: 700; color: var(--text3); }
.chapter-date__value { font-variant-numeric: tabular-nums; }
.chapter-date input { width: auto; }
.content-section--group { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border2); }
.contents > .content-section--group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.chapter-move { display: flex; gap: 4px; }
.chapter-move button { min-height: 32px; padding: 4px 8px; font-size: 13px; }
.content-section.is-dragging { opacity: 0.45; }
@@ -528,6 +532,8 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
.preview-row__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 18rem; color: inherit; text-decoration: none; }
.preview-row__main strong { font-size: 16px; line-height: 1.35; overflow-wrap: break-word; }
.preview-row__meta, .preview-row__origin { color: var(--text2); font-size: 13px; overflow-wrap: break-word; }
.preview-row__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.source-mark { display: inline-flex; width: 16px; height: 16px; flex: none; }
.preview-row__actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-left: auto; align-items: flex-start; }
.preview-row__text {
color: var(--text);
@@ -536,25 +542,32 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
-webkit-box-orient: vertical;
overflow: hidden;
}
.thumb {
width: 72px;
height: 96px;
flex: 0 0 72px;
object-fit: cover;
.entry-mark {
width: 40px;
height: 40px;
flex: 0 0 40px;
display: grid;
place-items: center;
position: relative;
border: 1px solid var(--border);
border-radius: 6px;
background: #fff;
border-radius: 10px;
background: var(--surface);
}
.thumb--note, .thumb--empty {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 6px;
font-size: 12px;
color: var(--text2);
.entry-mark--photo { width: 64px; height: 64px; flex-basis: 64px; overflow: hidden; }
.entry-mark__photo { width: 100%; height: 100%; object-fit: cover; }
.entry-mark__badge {
position: absolute;
right: 3px;
bottom: 3px;
width: 18px;
height: 18px;
display: grid;
place-items: center;
border-radius: 5px;
background: var(--surface);
}
.thumb--pdf { pointer-events: none; }
.type-glyph { display: block; }
.type-glyph--dark { display: none; }
.handle {
display: inline-flex;
align-items: center;
@@ -646,7 +659,8 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
.preview-row { gap: 10px 12px; }
.preview-row__main { flex-basis: 12rem; }
.preview-row__actions { flex-basis: 100%; margin-left: 0; }
.thumb { width: 56px; height: 74px; flex-basis: 56px; }
.entry-mark { width: 40px; height: 40px; flex-basis: 40px; }
.entry-mark--photo { width: 56px; height: 56px; flex-basis: 56px; }
}
@media (max-width: 899px) {
@@ -660,7 +674,8 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
@media (prefers-color-scheme: dark) {
button.danger { background: rgba(216, 90, 48, 0.16); }
.notice { color: var(--accent-2); }
.thumb { background: #1c1c1c; }
.type-glyph--light { display: none; }
.type-glyph--dark { display: block; }
.preview-row.is-selected { background: #14382c; }
.reader-pane { background: #1a2420; }
}
@@ -876,12 +891,34 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
}
.preview-row.is-selected { background: var(--accent-light); }
.preview-row__main strong { font-size: 17px; }
.thumb {
width: 74px;
height: 96px;
flex-basis: 74px;
border-radius: 8px;
box-shadow: 0 1px 2px rgba(28, 27, 24, 0.08);
.entry-mark { border-radius: 10px; }
.app-header .jk-logo-frame--plain {
width: auto;
height: auto;
padding: 0;
border: 0;
background: transparent;
border-radius: 0;
overflow: visible;
}
.app-header .jk-logo-frame--plain > .jk-mark {
width: var(--jk-mark-size, 28px);
height: var(--jk-mark-size, 28px);
}
@media (prefers-color-scheme: dark) {
.app-header .jk-logo-frame--plain {
width: var(--jk-frame-size);
height: var(--jk-frame-size);
padding: calc(var(--jk-frame-size) / 16);
border: calc(var(--jk-frame-size) / 48) solid #5dcaa5;
border-radius: calc(var(--jk-frame-size) * 5 / 24);
background: #146b57;
overflow: hidden;
}
.app-header .jk-logo-frame--plain > .jk-mark {
width: calc(var(--jk-frame-size) * 5 / 6);
height: calc(var(--jk-frame-size) * 5 / 6);
}
}
.icon-button {
width: 44px;