From f0c8981e22f5cc80b42671fff22374ec7b27896b Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 17 Oct 2026 19:34:28 +0200 Subject: [PATCH] Zeige Eingang und Ausgang als gefuellte Dreiecke vor dem Typ und tausche die Notiz gegen die gelieferte Sprechblase. Co-authored-by: Cursor --- .../dark/communication-in.svg | 2 +- .../dark/communication-out.svg | 2 +- .../ui/content-symbols-v1/dark/note.svg | 2 +- .../light/communication-in.svg | 2 +- .../light/communication-out.svg | 2 +- .../ui/content-symbols-v1/light/note.svg | 2 +- frontend/src/content-symbol.mjs | 15 +++++++ frontend/src/pages/ReadingPane.jsx | 14 ++++--- frontend/src/pages/content.jsx | 39 +++++++++++-------- frontend/src/styles.css | 19 +++++---- 10 files changed, 64 insertions(+), 35 deletions(-) diff --git a/frontend/public/ui/content-symbols-v1/dark/communication-in.svg b/frontend/public/ui/content-symbols-v1/dark/communication-in.svg index e27d404..d717507 100644 --- a/frontend/public/ui/content-symbols-v1/dark/communication-in.svg +++ b/frontend/public/ui/content-symbols-v1/dark/communication-in.svg @@ -1 +1 @@ -Kommunikation: Eingang +Kommunikation: Eingang diff --git a/frontend/public/ui/content-symbols-v1/dark/communication-out.svg b/frontend/public/ui/content-symbols-v1/dark/communication-out.svg index ba23dd0..324efad 100644 --- a/frontend/public/ui/content-symbols-v1/dark/communication-out.svg +++ b/frontend/public/ui/content-symbols-v1/dark/communication-out.svg @@ -1 +1 @@ -Kommunikation: Ausgang +Kommunikation: Ausgang diff --git a/frontend/public/ui/content-symbols-v1/dark/note.svg b/frontend/public/ui/content-symbols-v1/dark/note.svg index d12abab..93fa9b6 100644 --- a/frontend/public/ui/content-symbols-v1/dark/note.svg +++ b/frontend/public/ui/content-symbols-v1/dark/note.svg @@ -1 +1 @@ -Notiz +Gesprächs- / Gedankennotiz diff --git a/frontend/public/ui/content-symbols-v1/light/communication-in.svg b/frontend/public/ui/content-symbols-v1/light/communication-in.svg index ee8f2c1..e78181f 100644 --- a/frontend/public/ui/content-symbols-v1/light/communication-in.svg +++ b/frontend/public/ui/content-symbols-v1/light/communication-in.svg @@ -1 +1 @@ -Kommunikation: Eingang +Kommunikation: Eingang diff --git a/frontend/public/ui/content-symbols-v1/light/communication-out.svg b/frontend/public/ui/content-symbols-v1/light/communication-out.svg index 7be84cd..c749b25 100644 --- a/frontend/public/ui/content-symbols-v1/light/communication-out.svg +++ b/frontend/public/ui/content-symbols-v1/light/communication-out.svg @@ -1 +1 @@ -Kommunikation: Ausgang +Kommunikation: Ausgang diff --git a/frontend/public/ui/content-symbols-v1/light/note.svg b/frontend/public/ui/content-symbols-v1/light/note.svg index 0d78459..17f2ac9 100644 --- a/frontend/public/ui/content-symbols-v1/light/note.svg +++ b/frontend/public/ui/content-symbols-v1/light/note.svg @@ -1 +1 @@ -Notiz +Gesprächs- / Gedankennotiz diff --git a/frontend/src/content-symbol.mjs b/frontend/src/content-symbol.mjs index 067d06a..8b5dd1f 100644 --- a/frontend/src/content-symbol.mjs +++ b/frontend/src/content-symbol.mjs @@ -1,3 +1,18 @@ +/** Short content hashes so a replaced symbol is loaded without clearing the browser cache. */ +const SYMBOL_REV = { + "light/note": "5A420BDCA465", + "dark/note": "A4CB08EFE0CE", + "light/communication-in": "E0EA4BDC8906", + "dark/communication-in": "96DD8CF1D6B0", + "light/communication-out": "700E710A12CB", + "dark/communication-out": "761536F9818E", +}; + +export function symbolUrl(tone, name) { + const rev = SYMBOL_REV[`${tone}/${name}`] || "symbols-1-3"; + return `/ui/content-symbols-v1/${tone}/${name}.svg?v=${rev}`; +} + /** UI classification only. The server's element kind and access rules are unchanged. */ export function contentSymbol(element = {}) { if (element.kind === "note") return "note"; diff --git a/frontend/src/pages/ReadingPane.jsx b/frontend/src/pages/ReadingPane.jsx index b95ff83..4018c61 100644 --- a/frontend/src/pages/ReadingPane.jsx +++ b/frontend/src/pages/ReadingPane.jsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from "react"; import { documentToText, downloadMailPart, fetchFile, fetchPaperless, markDirty, textToDocument, api } from "../api.js"; import { ErrorNote } from "./widgets.jsx"; -import { dateCaption, DirectionChoice, DirectionMark, formatDate, mailFacts, MarkdownEditor, sourceLabel } from "./content.jsx"; +import { dateCaption, DirectionChoice, DirectionColumn, directionWord, formatDate, mailFacts, MarkdownEditor, sourceLabel } from "./content.jsx"; import { NavIcon } from "./icons.jsx"; import workerSrc from "pdfjs-dist/build/pdf.worker.min.mjs?url"; @@ -53,9 +53,10 @@ function Correspondence({ element, onOpenRelated }) { disabled={item.current || !onOpenRelated} onClick={() => onOpenRelated?.(item.id)} > + {formatDate(item.document_on)} {item.current ? `${item.title} · diese Unterlage` : item.title} - + {directionWord(item.direction) ? {directionWord(item.direction)} : } ))} @@ -367,10 +368,13 @@ export function ReadingPane({ binding, context, backLabel, onClose, onReload, ca {backLabel || "Inhalte"}
-

{element.title}

+
+ +

{element.title}

+

{formatDate(element.dates?.document_on)} · {sourceLabel(element)} - + {directionWord(shownDirection) ? {directionWord(shownDirection)} : null} {mailFacts(element) ? {mailFacts(element)} : null} {dateCaption(element, shownDirection) ? {dateCaption(element, shownDirection)} : null}

@@ -391,7 +395,7 @@ export function ReadingPane({ binding, context, backLabel, onClose, onReload, ca {isMail ? (
-

+

{directionWord(shownDirection) ? {directionWord(shownDirection)} : null}

Von {mailDetail.message_from || "Ohne Absender"}

An {mailDetail.message_to || "Ohne Empfänger"}

{mailDetail.message_cc ?

Kopie {mailDetail.message_cc}

: null} diff --git a/frontend/src/pages/content.jsx b/frontend/src/pages/content.jsx index b8a5812..1172499 100644 --- a/frontend/src/pages/content.jsx +++ b/frontend/src/pages/content.jsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from "react"; import { Link } from "react-router-dom"; import { api, fetchFile, fetchPaperless } from "../api.js"; -import { contentSourceSymbol, contentSymbol } from "../content-symbol.mjs"; +import { contentSourceSymbol, contentSymbol, symbolUrl } from "../content-symbol.mjs"; import { MarkdownView } from "../markdown.jsx"; import { IconButton, NavIcon } from "./icons.jsx"; import { Modal } from "./Modal.jsx"; @@ -276,15 +276,24 @@ export function elementFacts(element, communication) { return [sourceLabel(element), way, mailFacts(element), dateCaption(element, direction)].filter(Boolean).join(" · "); } -export function DirectionMark({ direction }) { - if (direction !== "in" && direction !== "out") return null; +export function directionWord(direction) { + if (direction === "out") return "Ausgang"; + if (direction === "in") return "Eingang"; + return ""; +} + +export function DirectionColumn({ direction }) { + const known = direction === "in" || direction === "out"; const name = direction === "out" ? "communication-out" : "communication-in"; - const label = direction === "out" ? "Ausgang" : "Eingang"; + const label = directionWord(direction); return ( - - - - {label} + + {known ? ( + <> + + + + ) : null} ); } @@ -316,12 +325,6 @@ export function MarkdownEditor({ value, onChange, disabled, rows = 12 }) { ); } -function directionMark(direction) { - if (direction === "out") return "Ausgang"; - if (direction === "in") return "Eingang"; - return ""; -} - function blurb(element) { const raw = element.summary || element.excerpt || ""; return raw.replace(/^#{1,3}\s+/gm, "").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/[*`]/g, "").replace(/\s+/g, " ").trim(); @@ -349,9 +352,10 @@ function BezugLink({ item, label, source, onOpen, itemHref, reply = false }) { const className = reply ? "bezug__link bezug__link--reply" : "bezug__link"; const body = ( <> + {label} {formatDate(item.document_on)} · {item.title} - + {directionWord(item.direction) ? {directionWord(item.direction)} : null} ); if (found && onOpen) { @@ -369,7 +373,7 @@ function TypeGlyph({ name, tone, size = 28 }) { return ( {indicator?.sectionId === section.id && indicator?.kind !== "chapter" && indicator.index === index ?
: null} + {canSort && custom ? (