Zeige Eingang und Ausgang als gefuellte Dreiecke vor dem Typ und tausche die Notiz gegen die gelieferte Sprechblase.
Deploy Development / deploy (push) Successful in 29s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-17 19:34:28 +02:00
1 parent f6f8d5980c
commit f0c8981e22
10 files changed
+64 -35

No files matched your search

+22 -17
View File
@@ -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 (
<span className="direction-mark">
<img className="direction-mark__icon direction-mark__icon--light" src={`/ui/content-symbols-v1/light/${name}.svg`} width="16" height="16" alt="" />
<img className="direction-mark__icon direction-mark__icon--dark" src={`/ui/content-symbols-v1/dark/${name}.svg`} width="16" height="16" alt="" />
<span>{label}</span>
<span className="direction-column" role={known ? "img" : undefined} aria-label={known ? label : undefined} aria-hidden={known ? undefined : true}>
{known ? (
<>
<img className="direction-column__icon direction-column__icon--light" src={symbolUrl("light", name)} width="28" height="28" alt="" />
<img className="direction-column__icon direction-column__icon--dark" src={symbolUrl("dark", name)} width="28" height="28" alt="" />
</>
) : null}
</span>
);
}
@@ -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 = (
<>
<DirectionColumn direction={item.direction} />
<span>{label}</span>
<strong>{formatDate(item.document_on)} · {item.title}</strong>
<DirectionMark direction={item.direction} />
{directionWord(item.direction) ? <span>{directionWord(item.direction)}</span> : null}
</>
);
if (found && onOpen) {
@@ -369,7 +373,7 @@ 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`}
src={symbolUrl(tone, name)}
width={size}
height={size}
alt=""
@@ -973,6 +977,7 @@ export function ContentBoard({
return (
<li key={binding.id} data-binding={binding.id} className={`preview-row${linked ? " preview-row--linked" : ""}${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}
<DirectionColumn direction={binding.communication?.direction} />
{canSort && custom ? (
<button
type="button"
@@ -1012,7 +1017,7 @@ export function ContentBoard({
</span>
) : null}
{formatDate(fachDate(element))} · {sourceLabel(element)}
<DirectionMark direction={binding.communication?.direction} />
{directionWord(binding.communication?.direction) ? <span>{directionWord(binding.communication?.direction)}</span> : null}
{mailFacts(element) ? <span>{mailFacts(element)}</span> : null}
{dateCaption(element, binding.communication?.direction) ? <span>{dateCaption(element, binding.communication?.direction)}</span> : null}
</span>