Zeige den Vorgang in seiner Akte, ordne mehrere Aufgaben einer Frist zu und verwende Logo sowie Favicon aus der Lieferung.
Co-authored-by: Cursor <cursoragent@cursor.com>
No files matched your search
@@ -67,6 +67,8 @@ from app.api.schemas import (
|
||||
RoomIn,
|
||||
ScopeIn,
|
||||
TaskDeadlineIn,
|
||||
TaskDependencyIn,
|
||||
TaskElementsIn,
|
||||
SummaryPatch,
|
||||
TaskIn,
|
||||
TaskPatch,
|
||||
@@ -104,6 +106,9 @@ from app.ops import (
|
||||
grant_access,
|
||||
link_matter_to_case,
|
||||
link_task_deadline,
|
||||
link_task_dependency,
|
||||
set_task_elements,
|
||||
unlink_task_dependency,
|
||||
patch_case,
|
||||
patch_deadline,
|
||||
patch_matter,
|
||||
@@ -1054,6 +1059,47 @@ def post_task_deadline(
|
||||
return Response(status_code=204)
|
||||
|
||||
|
||||
@router.put("/api/v1/tasks/{task_id}/elements", status_code=204)
|
||||
def put_task_elements(
|
||||
task_id: UUID,
|
||||
body: TaskElementsIn,
|
||||
principal: Principal = Depends(get_principal),
|
||||
conn: Connection = Depends(get_conn),
|
||||
):
|
||||
set_task_elements(conn, principal.account_id, task_id, body.element_ids, _ctx_model(body.context))
|
||||
return Response(status_code=204)
|
||||
|
||||
|
||||
@router.post("/api/v1/tasks/{task_id}/dependencies", status_code=204)
|
||||
def post_task_dependency(
|
||||
task_id: UUID,
|
||||
body: TaskDependencyIn,
|
||||
principal: Principal = Depends(get_principal),
|
||||
conn: Connection = Depends(get_conn),
|
||||
):
|
||||
link_task_dependency(conn, principal.account_id, task_id, body.depends_on_task_id, _ctx_model(body.context))
|
||||
return Response(status_code=204)
|
||||
|
||||
|
||||
@router.delete("/api/v1/tasks/{task_id}/dependencies/{depends_on_task_id}", status_code=204)
|
||||
def delete_task_dependency(
|
||||
task_id: UUID,
|
||||
depends_on_task_id: UUID,
|
||||
context_kind: str | None = None,
|
||||
context_id: str | None = None,
|
||||
principal: Principal = Depends(get_principal),
|
||||
conn: Connection = Depends(get_conn),
|
||||
):
|
||||
unlink_task_dependency(
|
||||
conn,
|
||||
principal.account_id,
|
||||
task_id,
|
||||
depends_on_task_id,
|
||||
parse_query_context(context_kind, context_id),
|
||||
)
|
||||
return Response(status_code=204)
|
||||
|
||||
|
||||
@router.post("/api/v1/deadlines")
|
||||
def post_deadline(body: DeadlineIn, principal: Principal = Depends(get_principal), conn: Connection = Depends(get_conn)):
|
||||
deadline = create_deadline(
|
||||
|
||||
@@ -282,3 +282,13 @@ class FulfillIn(APIModel):
|
||||
class TaskDeadlineIn(APIModel):
|
||||
deadline_id: UUID
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class TaskElementsIn(APIModel):
|
||||
element_ids: list[UUID] = Field(default_factory=list, max_length=40)
|
||||
context: ContextIn | None = None
|
||||
|
||||
|
||||
class TaskDependencyIn(APIModel):
|
||||
depends_on_task_id: UUID
|
||||
context: ContextIn | None = None
|
||||
@@ -52,6 +52,18 @@ _PURGE = (
|
||||
WHERE owner_subject_id IN (SELECT id FROM fixture_accounts)
|
||||
""",
|
||||
"""
|
||||
DELETE FROM task_element_links
|
||||
WHERE task_id IN (SELECT id FROM tasks WHERE owner_subject_id IN (SELECT id FROM fixture_accounts))
|
||||
OR element_id IN (SELECT id FROM elements WHERE owner_subject_id IN (SELECT id FROM fixture_accounts))
|
||||
OR created_by IN (SELECT id FROM fixture_accounts)
|
||||
""",
|
||||
"""
|
||||
DELETE FROM task_dependencies
|
||||
WHERE task_id IN (SELECT id FROM tasks WHERE owner_subject_id IN (SELECT id FROM fixture_accounts))
|
||||
OR depends_on_task_id IN (SELECT id FROM tasks WHERE owner_subject_id IN (SELECT id FROM fixture_accounts))
|
||||
OR created_by IN (SELECT id FROM fixture_accounts)
|
||||
""",
|
||||
"""
|
||||
DELETE FROM task_deadline_links
|
||||
WHERE task_id IN (SELECT id FROM tasks WHERE owner_subject_id IN (SELECT id FROM fixture_accounts))
|
||||
OR deadline_id IN (SELECT id FROM deadlines WHERE owner_subject_id IN (SELECT id FROM fixture_accounts))
|
||||
|
||||
@@ -875,6 +875,93 @@ def link_task_deadline(conn, actor: UUID, task_id: UUID, deadline_id: UUID, cont
|
||||
)
|
||||
|
||||
|
||||
def set_task_elements(conn, actor: UUID, task_id: UUID, element_ids: list[UUID], context: Ctx | None) -> None:
|
||||
task = get_task(conn, task_id)
|
||||
if task is None:
|
||||
raise not_found()
|
||||
rights = task_rights(conn, actor, task, context)
|
||||
if not rights.read:
|
||||
raise not_found()
|
||||
if not rights.edit:
|
||||
raise forbidden()
|
||||
unique: list[UUID] = []
|
||||
for element_id in element_ids:
|
||||
if element_id in unique:
|
||||
continue
|
||||
element = get_element(conn, element_id)
|
||||
if element is None:
|
||||
raise not_found()
|
||||
visible = element_rights(conn, actor, element, context)
|
||||
if not visible.read:
|
||||
raise not_found()
|
||||
unique.append(element_id)
|
||||
conn.execute("DELETE FROM task_element_links WHERE task_id = %s", (task_id,))
|
||||
for element_id in unique:
|
||||
conn.execute(
|
||||
"""
|
||||
INSERT INTO task_element_links (task_id, element_id, created_by)
|
||||
VALUES (%s, %s, %s)
|
||||
""",
|
||||
(task_id, element_id, actor),
|
||||
)
|
||||
|
||||
|
||||
def _dependency_chain(conn, start: UUID) -> set[UUID]:
|
||||
seen: set[UUID] = set()
|
||||
stack = [start]
|
||||
while stack:
|
||||
current = stack.pop()
|
||||
if current in seen:
|
||||
continue
|
||||
seen.add(current)
|
||||
rows = conn.execute(
|
||||
"SELECT depends_on_task_id FROM task_dependencies WHERE task_id = %s",
|
||||
(current,),
|
||||
).fetchall()
|
||||
stack.extend(row["depends_on_task_id"] for row in rows)
|
||||
return seen
|
||||
|
||||
|
||||
def link_task_dependency(conn, actor: UUID, task_id: UUID, depends_on_task_id: UUID, context: Ctx | None) -> None:
|
||||
if task_id == depends_on_task_id:
|
||||
raise unprocessable("Eine Aufgabe kann nicht von sich selbst abhängen.")
|
||||
task = get_task(conn, task_id)
|
||||
earlier = get_task(conn, depends_on_task_id)
|
||||
if task is None or earlier is None:
|
||||
raise not_found()
|
||||
rights = task_rights(conn, actor, task, context)
|
||||
earlier_rights = task_rights(conn, actor, earlier, context)
|
||||
if not rights.read or not earlier_rights.read:
|
||||
raise not_found()
|
||||
if not rights.edit:
|
||||
raise forbidden()
|
||||
if task_id in _dependency_chain(conn, depends_on_task_id):
|
||||
raise unprocessable("Diese Abhängigkeit würde einen Kreis bilden.")
|
||||
conn.execute(
|
||||
"""
|
||||
INSERT INTO task_dependencies (task_id, depends_on_task_id, created_by)
|
||||
VALUES (%s, %s, %s)
|
||||
ON CONFLICT DO NOTHING
|
||||
""",
|
||||
(task_id, depends_on_task_id, actor),
|
||||
)
|
||||
|
||||
|
||||
def unlink_task_dependency(conn, actor: UUID, task_id: UUID, depends_on_task_id: UUID, context: Ctx | None) -> None:
|
||||
task = get_task(conn, task_id)
|
||||
if task is None:
|
||||
raise not_found()
|
||||
rights = task_rights(conn, actor, task, context)
|
||||
if not rights.read:
|
||||
raise not_found()
|
||||
if not rights.edit:
|
||||
raise forbidden()
|
||||
conn.execute(
|
||||
"DELETE FROM task_dependencies WHERE task_id = %s AND depends_on_task_id = %s",
|
||||
(task_id, depends_on_task_id),
|
||||
)
|
||||
|
||||
|
||||
def set_content_order(
|
||||
conn,
|
||||
actor: UUID,
|
||||
|
||||
@@ -13,6 +13,7 @@ from app.access.policy import (
|
||||
get_case,
|
||||
get_element,
|
||||
get_matter,
|
||||
get_task,
|
||||
matter_rights,
|
||||
matter_title_if_readable,
|
||||
readable_matter_contexts,
|
||||
@@ -756,6 +757,30 @@ def task_payload(conn, actor: UUID, task: dict, rights=None) -> dict:
|
||||
action = _task_action_context(conn, actor, task)
|
||||
if action is not None:
|
||||
payload["action_context"] = action
|
||||
elements = []
|
||||
for link in conn.execute(
|
||||
"SELECT element_id FROM task_element_links WHERE task_id = %s ORDER BY created_at, element_id",
|
||||
(task["id"],),
|
||||
).fetchall():
|
||||
element = get_element(conn, link["element_id"])
|
||||
if element is None or element["deleted_at"] is not None:
|
||||
continue
|
||||
if not element_rights(conn, actor, element, None).read:
|
||||
continue
|
||||
elements.append({"id": str(element["id"]), "title": element["title"]})
|
||||
if elements:
|
||||
payload["elements"] = elements
|
||||
depends_on = []
|
||||
for link in conn.execute(
|
||||
"SELECT depends_on_task_id FROM task_dependencies WHERE task_id = %s ORDER BY created_at, depends_on_task_id",
|
||||
(task["id"],),
|
||||
).fetchall():
|
||||
earlier = get_task(conn, link["depends_on_task_id"])
|
||||
if earlier is None or not task_rights(conn, actor, earlier, None).read:
|
||||
continue
|
||||
depends_on.append({"id": str(earlier["id"]), "title": earlier["title"], "status": earlier["task_status"]})
|
||||
if depends_on:
|
||||
payload["depends_on"] = depends_on
|
||||
return payload
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE task_element_links (
|
||||
task_id uuid NOT NULL REFERENCES tasks (id),
|
||||
element_id uuid NOT NULL REFERENCES elements (id),
|
||||
created_by uuid NOT NULL REFERENCES auth_accounts (id),
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
PRIMARY KEY (task_id, element_id)
|
||||
);
|
||||
|
||||
CREATE TABLE task_dependencies (
|
||||
task_id uuid NOT NULL REFERENCES tasks (id),
|
||||
depends_on_task_id uuid NOT NULL REFERENCES tasks (id),
|
||||
created_by uuid NOT NULL REFERENCES auth_accounts (id),
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
PRIMARY KEY (task_id, depends_on_task_id),
|
||||
CONSTRAINT task_dependencies_not_self CHECK (task_id <> depends_on_task_id)
|
||||
);
|
||||
@@ -42,6 +42,36 @@ def test_t_dl_completed_task_leaves_the_deadline_open(client, db):
|
||||
kept = next(item for item in open_deadlines["items"] if item["id"] == deadline["id"])
|
||||
assert kept["status"] == "open"
|
||||
assert kept["fulfilled_at"] is None
|
||||
second = ada.request(
|
||||
"POST",
|
||||
"/api/v1/tasks",
|
||||
json={"title": "Schreiben entwerfen", "due_on": "2026-11-20", "matter_id": matter["id"]},
|
||||
status=201,
|
||||
)
|
||||
ada.request(
|
||||
"POST",
|
||||
f"/api/v1/tasks/{second['id']}/deadline-links",
|
||||
json={"deadline_id": deadline["id"]},
|
||||
status=204,
|
||||
)
|
||||
ada.request(
|
||||
"POST",
|
||||
f"/api/v1/tasks/{second['id']}/dependencies",
|
||||
json={"depends_on_task_id": task["id"]},
|
||||
status=204,
|
||||
)
|
||||
ada.request(
|
||||
"POST",
|
||||
f"/api/v1/tasks/{task['id']}/dependencies",
|
||||
json={"depends_on_task_id": second["id"]},
|
||||
status=422,
|
||||
)
|
||||
detail = ada.request("GET", f"/api/v1/matters/{matter['id']}")
|
||||
milestone = next(item for item in detail["deadlines"] if item["id"] == deadline["id"])
|
||||
linked = [item for item in detail["task_deadline_links"] if item["deadline_id"] == milestone["id"]]
|
||||
assert len(linked) == 2
|
||||
shown = next(item for item in detail["tasks"] if item["id"] == second["id"])
|
||||
assert shown["depends_on"][0]["id"] == task["id"]
|
||||
|
||||
|
||||
def test_t_anchor_assignee_sees_the_task_but_not_the_hidden_matter(client, db):
|
||||
|
||||
@@ -12,7 +12,7 @@ Der Leser hängt an `eintrag` und `kapitel` in der Adresse. Schließen nimmt den
|
||||
|
||||
## Logo
|
||||
|
||||
Tsumugu nutzt den offenen Pinsel-Ensō mit Aktenmappe: Vektormaster unter `frontend/brand/`, Symbol hell und dunkel, Favicon 16/32, Apple-Touch-Icon, PWA-Icons einschließlich maskable. Ein Service Worker ist bewusst nicht enthalten; Offline-Schreiben gehört nicht zu dieser Lieferung. Die übrigen Familienlogos liegen im Designpaket unter `C:\Dev\jinkendo-app-design-2026-10-17\assets\`. Andere App-Repositories sind nicht geändert.
|
||||
Tsumugu bindet das große Logo unverändert aus `approved-logos-v1/tsumugu` ein: `frontend/public/brand/logo-original.png` (280×298). Die Browser-Favicons sind die Kleinform ohne Ensō aus `favicons-v2/tsumugu` unter `frontend/public/brand/favicons-v2/`. Apple-Touch-Icon und PWA-Icons bleiben die bisherigen Rasterdateien. `frontend/brand/render.mjs` zeichnet nichts und überschreibt diese Dateien nicht. Ein Service Worker ist bewusst nicht enthalten; Offline-Schreiben gehört nicht zu dieser Lieferung. Andere App-Repositories sind nicht geändert.
|
||||
|
||||
## Bewusste Abweichungen
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<path fill="#085041" d="M 49.21 17.51 L 50.41 18.25 L 51.45 19.16 L 52.41 20.17 L 53.29 21.26 L 54.10 22.43 L 54.80 23.66 L 55.42 24.96 L 55.92 26.30 L 56.32 27.68 L 56.60 29.10 L 56.78 30.53 L 56.84 31.98 L 56.79 33.42 L 56.64 34.86 L 56.39 36.28 L 56.04 37.68 L 55.61 39.05 L 55.10 40.39 L 54.52 41.70 L 53.87 42.97 L 53.16 44.21 L 52.39 45.40 L 51.57 46.56 L 50.69 47.68 L 49.76 48.75 L 48.78 49.78 L 47.75 50.77 L 46.66 51.70 L 45.52 52.57 L 44.34 53.38 L 43.10 54.12 L 41.82 54.79 L 40.49 55.36 L 39.12 55.85 L 37.73 56.23 L 36.30 56.51 L 34.86 56.69 L 33.42 56.75 L 31.98 56.70 L 30.55 56.54 L 29.14 56.27 L 27.76 55.90 L 26.41 55.44 L 25.12 54.88 L 23.87 54.25 L 22.67 53.54 L 21.53 52.78 L 20.44 51.96 L 19.40 51.09 L 18.41 50.19 L 17.47 49.25 L 16.57 48.29 L 15.71 47.31 L 14.89 46.29 L 14.11 45.26 L 13.36 44.20 L 12.65 43.12 L 11.97 42.00 L 11.33 40.86 L 10.74 39.68 L 10.20 38.46 L 9.72 37.22 L 9.31 35.94 L 8.96 34.63 L 8.70 33.29 L 8.53 31.93 L 8.45 30.56 L 8.47 29.18 L 8.60 27.80 L 8.82 26.43 L 9.15 25.08 L 9.59 23.76 L 10.12 22.47 L 10.74 21.23 L 11.45 20.04 L 12.23 18.90 L 13.09 17.81 L 14.01 16.79 L 14.99 15.83 L 16.02 14.93 L 17.09 14.08 L 18.20 13.30 L 19.34 12.57 L 20.51 11.90 L 21.71 11.29 L 22.94 10.74 L 24.19 10.24 L 25.46 9.80 L 26.76 9.43 L 28.08 9.14 L 29.41 8.92 L 30.76 8.78 L 32.11 8.75 L 33.47 8.82 L 34.80 9.02 L 36.09 9.50 L 36.09 9.50 L 34.74 9.55 L 33.42 9.62 L 32.11 9.75 L 30.82 9.96 L 29.56 10.22 L 28.32 10.54 L 27.10 10.91 L 25.91 11.33 L 24.74 11.78 L 23.60 12.28 L 22.47 12.82 L 21.36 13.39 L 20.27 14.01 L 19.20 14.66 L 18.16 15.37 L 17.13 16.12 L 16.14 16.92 L 15.18 17.78 L 14.27 18.70 L 13.41 19.67 L 12.60 20.71 L 11.87 21.80 L 11.21 22.95 L 10.63 24.14 L 10.15 25.38 L 9.76 26.65 L 9.47 27.95 L 9.29 29.27 L 9.20 30.60 L 9.22 31.93 L 9.34 33.26 L 9.54 34.56 L 9.84 35.85 L 10.22 37.10 L 10.66 38.33 L 11.18 39.52 L 11.76 40.67 L 12.38 41.79 L 13.06 42.88 L 13.78 43.93 L 14.54 44.94 L 15.33 45.93 L 16.17 46.88 L 17.04 47.79 L 17.96 48.67 L 18.91 49.51 L 19.91 50.31 L 20.95 51.06 L 22.04 51.76 L 23.17 52.40 L 24.34 52.97 L 25.54 53.46 L 26.79 53.87 L 28.06 54.19 L 29.35 54.41 L 30.66 54.54 L 31.98 54.57 L 33.29 54.49 L 34.59 54.31 L 35.87 54.04 L 37.12 53.67 L 38.34 53.21 L 39.51 52.67 L 40.64 52.07 L 41.73 51.39 L 42.77 50.66 L 43.76 49.89 L 44.70 49.07 L 45.60 48.22 L 46.46 47.33 L 47.28 46.42 L 48.07 45.48 L 48.82 44.52 L 49.54 43.53 L 50.22 42.51 L 50.87 41.47 L 51.48 40.39 L 52.05 39.29 L 52.57 38.14 L 53.04 36.97 L 53.44 35.76 L 53.78 34.53 L 54.04 33.26 L 54.22 31.98 L 54.30 30.68 L 54.30 29.37 L 54.19 28.06 L 53.99 26.76 L 53.69 25.48 L 53.29 24.22 L 52.79 22.99 L 52.21 21.81 L 51.55 20.67 L 50.82 19.58 L 50.02 18.53 L 49.21 17.51 Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -1,163 +1,5 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import sharp from "sharp";
|
||||
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
const publicDir = path.resolve(here, "../public");
|
||||
const designDir = "C:/Dev/jinkendo-app-design-2026-10-17/assets";
|
||||
|
||||
function brushRing(cx, cy, r) {
|
||||
const start = -0.7;
|
||||
const end = start + Math.PI * 1.78;
|
||||
const steps = 96;
|
||||
const outer = [];
|
||||
const inner = [];
|
||||
for (let i = 0; i <= steps; i += 1) {
|
||||
const u = i / steps;
|
||||
const angle = start + (end - start) * u;
|
||||
const taper = Math.sin(Math.PI * u) ** 0.62;
|
||||
const wave = 0.55 + 0.45 * Math.sin(u * Math.PI * 2.15 + 0.6);
|
||||
const width = r * 0.2 * taper * wave;
|
||||
const wobble = 1 + 0.028 * Math.sin(u * Math.PI * 6.2);
|
||||
const radius = r * wobble;
|
||||
const x = cx + radius * Math.cos(angle);
|
||||
const y = cy + radius * Math.sin(angle);
|
||||
const nx = Math.cos(angle);
|
||||
const ny = Math.sin(angle);
|
||||
outer.push([x + nx * width * 0.78, y + ny * width * 0.78]);
|
||||
inner.push([x - nx * width * 0.28, y - ny * width * 0.28]);
|
||||
}
|
||||
const point = (pair) => pair.map((value) => value.toFixed(2)).join(" ");
|
||||
let d = `M ${point(outer[0])}`;
|
||||
for (const pair of outer.slice(1)) d += ` L ${point(pair)}`;
|
||||
for (const pair of inner.reverse()) d += ` L ${point(pair)}`;
|
||||
return `${d} Z`;
|
||||
}
|
||||
|
||||
const enso = brushRing(32, 32, 22.5);
|
||||
const ensoSmall = brushRing(32, 32, 23.5);
|
||||
|
||||
const glyphs = {
|
||||
tsumugu: `
|
||||
<path fill="currentColor" opacity=".72" d="M37.2 25.2h11.2v13.2h-1.8V27.4H38.6z"/>
|
||||
<path fill="currentColor" d="M22.8 29.2h8.8l1.7 2.2h10.2V44H22.8z"/>
|
||||
<path fill="currentColor" opacity=".45" d="M26.2 34.2h6.4v1.3h-6.4zm0 2.8h4.5v1.3h-4.5z"/>`,
|
||||
tsumuguSmall: `
|
||||
<path fill="currentColor" d="M20 28.5h10l2 2.4h12V46H20z"/>
|
||||
<path fill="currentColor" opacity=".7" d="M34 24h12v12h-2.2V27.2H35.6z"/>`,
|
||||
mitai: `
|
||||
<g fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="32" cy="22.5" r="2.3" fill="currentColor" stroke="none"/>
|
||||
<path d="M32 25v6.5M27.2 28.2 32 30.2l4.8-2M32 31.5 28.6 39M32 31.5l3.4 7.5"/>
|
||||
<path d="M18.5 41.5h5.2l1.7-3.6 1.8 5.2 2-6.2 1.7 4.6h8.2"/>
|
||||
</g>`,
|
||||
shinkan: `
|
||||
<g fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="25.5" cy="24" r="2.2" fill="currentColor" stroke="none"/>
|
||||
<path d="M25.5 26.4 29 31.2l4.2-2.2M29 31.2 24.2 37.2M29 31.2l4.6 2.2 1.8 5.2"/>
|
||||
<rect x="37.5" y="26.5" width="9.5" height="12" rx="1.2"/>
|
||||
<path d="M39.6 30h5.4M39.6 33h5.4M39.6 36h3.6"/>
|
||||
</g>`,
|
||||
kairo: `
|
||||
<g fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path fill="none" d="M19.5 42.5 27.5 34.5 34.5 38.5 43 25"/>
|
||||
<circle cx="19.5" cy="42.5" r="2.1" stroke="none"/>
|
||||
<circle cx="27.5" cy="34.5" r="2.1" stroke="none"/>
|
||||
<circle cx="34.5" cy="38.5" r="2.1" stroke="none"/>
|
||||
<circle cx="43" cy="25" r="2.1" stroke="none"/>
|
||||
<path fill="currentColor" stroke="none" d="M43 23.2h8.2l-2.3 2.6 2.3 2.6H43z"/>
|
||||
</g>`,
|
||||
kansho: `
|
||||
<path fill="currentColor" fill-rule="evenodd" d="M25 34.5c.4-8.2 6.4-13.4 13.2-12.6 2.6.4 4.6 2 5.6 4.2 1.6-.6 3.4-.2 4.2 1.4-.8 1.4-2.2 2-3.6 1.8.4 2.2.2 4.2-.8 5.8-2.4 3.6-6.4 5.4-10.4 5-5.4-.4-8.6-4.2-8.2-10.6z M39.2 27.2l.9 1.8 2 .2-1.5 1.3.5 2-1.9-1.1-1.9 1.1.5-2-1.5-1.3 2-.2z"/>`,
|
||||
};
|
||||
|
||||
function symbolSvg({ glyph, small = false }) {
|
||||
const ring = small ? ensoSmall : enso;
|
||||
return `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
||||
<path fill="currentColor" d="${ring}"/>
|
||||
${glyph}
|
||||
</svg>
|
||||
`;
|
||||
}
|
||||
|
||||
function iconSvg(glyph, { maskable = false } = {}) {
|
||||
const scale = maskable ? 0.62 : 0.74;
|
||||
const offset = (64 - 64 * scale) / 2;
|
||||
return `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<rect width="64" height="64" fill="#085041"/>
|
||||
<g transform="translate(${offset.toFixed(2)} ${offset.toFixed(2)}) scale(${scale})" color="#9FE1CB">
|
||||
<path fill="currentColor" d="${enso}"/>
|
||||
${glyph}
|
||||
</g>
|
||||
</svg>
|
||||
`;
|
||||
}
|
||||
|
||||
function write(file, contents) {
|
||||
fs.mkdirSync(path.dirname(file), { recursive: true });
|
||||
fs.writeFileSync(file, contents);
|
||||
}
|
||||
|
||||
const products = [
|
||||
["mitai", "Mitai", "Körper und Gesundheit"],
|
||||
["shinkan", "Shinkan", "Training planen"],
|
||||
["kairo", "Kairo", "Vorhaben steuern"],
|
||||
["kansho", "Kanshō", "Reflektieren und verstehen"],
|
||||
["tsumugu", "Tsumugu", "Unterlagen ordnen"],
|
||||
];
|
||||
|
||||
write(path.join(here, "enso-master.svg"), `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<path fill="#085041" d="${enso}"/>
|
||||
</svg>
|
||||
`);
|
||||
write(path.join(publicDir, "brand/tsumugu-symbol.svg"), symbolSvg({ glyph: glyphs.tsumugu }).replaceAll("currentColor", "#085041"));
|
||||
write(path.join(publicDir, "brand/tsumugu-symbol-on-dark.svg"), symbolSvg({ glyph: glyphs.tsumugu }).replaceAll("currentColor", "#9FE1CB"));
|
||||
write(path.join(publicDir, "brand/tsumugu-small.svg"), symbolSvg({ glyph: glyphs.tsumuguSmall, small: true }).replaceAll("currentColor", "#9FE1CB"));
|
||||
write(path.join(publicDir, "favicon.svg"), iconSvg(glyphs.tsumuguSmall));
|
||||
|
||||
write(path.join(here, "../src/enso-path.js"), `export const ENSO_PATH = ${JSON.stringify(enso)};\n`);
|
||||
|
||||
for (const [id, title, subtitle] of products) {
|
||||
const glyph = glyphs[id];
|
||||
const master = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 220">
|
||||
<rect width="360" height="220" rx="28" fill="#085041"/>
|
||||
<g transform="translate(118 28) scale(1.9)" color="#9FE1CB">
|
||||
<path fill="currentColor" d="${enso}"/>
|
||||
${glyph}
|
||||
</g>
|
||||
<text x="180" y="176" text-anchor="middle" font-family="Segoe UI, sans-serif" font-size="28" font-weight="700" fill="#f7fbf8">${title}</text>
|
||||
<text x="180" y="200" text-anchor="middle" font-family="Segoe UI, sans-serif" font-size="14" fill="#9FE1CB">${subtitle}</text>
|
||||
</svg>
|
||||
`;
|
||||
write(path.join(designDir, `${id}-master.svg`), master);
|
||||
write(path.join(designDir, `${id}-symbol-on-dark.svg`), symbolSvg({ glyph }).replaceAll("currentColor", "#9FE1CB"));
|
||||
write(path.join(designDir, `${id}-symbol-on-light.svg`), symbolSvg({ glyph }).replaceAll("currentColor", "#085041"));
|
||||
write(path.join(designDir, `${id}-icon.svg`), iconSvg(glyph));
|
||||
write(path.join(designDir, `${id}-maskable.svg`), iconSvg(glyph, { maskable: true }));
|
||||
}
|
||||
|
||||
async function png(svg, file, size) {
|
||||
await sharp(Buffer.from(svg)).resize(size, size).png().toFile(file);
|
||||
}
|
||||
|
||||
const tsumuguIcon = iconSvg(glyphs.tsumugu);
|
||||
const tsumuguMask = iconSvg(glyphs.tsumugu, { maskable: true });
|
||||
const tsumuguSmallIcon = iconSvg(glyphs.tsumuguSmall);
|
||||
await png(tsumuguSmallIcon, path.join(publicDir, "favicon-16.png"), 16);
|
||||
await png(tsumuguSmallIcon, path.join(publicDir, "favicon-32.png"), 32);
|
||||
await png(tsumuguIcon, path.join(publicDir, "apple-touch-icon.png"), 180);
|
||||
await png(tsumuguIcon, path.join(publicDir, "icons/icon-192.png"), 192);
|
||||
await png(tsumuguIcon, path.join(publicDir, "icons/icon-512.png"), 512);
|
||||
await png(tsumuguMask, path.join(publicDir, "icons/icon-maskable-512.png"), 512);
|
||||
|
||||
for (const [id] of products) {
|
||||
const svg = fs.readFileSync(path.join(designDir, `${id}-icon.svg`));
|
||||
await png(svg, path.join(designDir, `${id}-32.png`), 32);
|
||||
await png(svg, path.join(designDir, `${id}-192.png`), 192);
|
||||
}
|
||||
console.log("icons written");
|
||||
// Stillgelegt. Das große Logo bleibt frontend/public/brand/logo-original.png.
|
||||
// Die Browser-Favicons liegen unter frontend/public/brand/favicons-v2 und dürfen
|
||||
// von hier nicht erzeugt oder überschrieben werden. Dieses Skript schreibt nichts.
|
||||
console.error("Logo-Renderer ist stillgelegt. Verbindlich sind die Dateien in frontend/public/brand.");
|
||||
process.exit(0);
|
||||
@@ -7,10 +7,11 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-title" content="Tsumugu" />
|
||||
<title>Tsumugu</title>
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="icon" href="/favicon-32.png" sizes="32x32" type="image/png" />
|
||||
<link rel="icon" href="/favicon-16.png" sizes="16x16" type="image/png" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" href="/brand/favicons-v2/favicon.ico" sizes="any" />
|
||||
<link rel="icon" href="/brand/favicons-v2/favicon-48.png" sizes="48x48" type="image/png" />
|
||||
<link rel="icon" href="/brand/favicons-v2/favicon-32.png" sizes="32x32" type="image/png" />
|
||||
<link rel="icon" href="/brand/favicons-v2/favicon-16.png" sizes="16x16" type="image/png" />
|
||||
<link rel="apple-touch-icon" href="/brand/apple-touch-icon.png" />
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 274 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 633 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 118 KiB |
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
||||
<path fill="#9FE1CB" d="M 49.97 16.86 L 51.22 17.64 L 52.31 18.59 L 53.32 19.65 L 54.24 20.79 L 55.08 22.00 L 55.82 23.29 L 56.46 24.64 L 56.98 26.04 L 57.40 27.49 L 57.70 28.97 L 57.88 30.47 L 57.94 31.97 L 57.89 33.48 L 57.73 34.99 L 57.47 36.47 L 57.11 37.93 L 56.66 39.37 L 56.13 40.77 L 55.52 42.13 L 54.85 43.46 L 54.10 44.75 L 53.30 46.00 L 52.44 47.21 L 51.52 48.38 L 50.55 49.50 L 49.52 50.57 L 48.44 51.60 L 47.31 52.57 L 46.13 53.49 L 44.89 54.33 L 43.59 55.11 L 42.25 55.80 L 40.87 56.40 L 39.44 56.91 L 37.98 57.31 L 36.49 57.60 L 34.99 57.78 L 33.48 57.85 L 31.98 57.80 L 30.48 57.63 L 29.01 57.35 L 27.57 56.96 L 26.17 56.48 L 24.81 55.90 L 23.51 55.24 L 22.26 54.50 L 21.06 53.70 L 19.92 52.84 L 18.84 51.94 L 17.80 51.00 L 16.82 50.02 L 15.88 49.02 L 14.99 47.99 L 14.13 46.93 L 13.31 45.85 L 12.53 44.74 L 11.79 43.61 L 11.08 42.45 L 10.41 41.25 L 9.80 40.02 L 9.23 38.75 L 8.73 37.45 L 8.30 36.11 L 7.94 34.74 L 7.67 33.35 L 7.49 31.93 L 7.41 30.49 L 7.43 29.05 L 7.56 27.61 L 7.79 26.18 L 8.14 24.77 L 8.59 23.39 L 9.14 22.05 L 9.79 20.75 L 10.53 19.50 L 11.36 18.31 L 12.25 17.18 L 13.21 16.12 L 14.24 15.11 L 15.31 14.17 L 16.43 13.29 L 17.58 12.47 L 18.78 11.71 L 20.00 11.01 L 21.25 10.37 L 22.53 9.79 L 23.84 9.27 L 25.17 8.82 L 26.53 8.43 L 27.90 8.12 L 29.30 7.89 L 30.71 7.75 L 32.12 7.71 L 33.53 7.79 L 34.93 8.00 L 36.27 8.50 L 36.27 8.50 L 34.86 8.55 L 33.48 8.62 L 32.11 8.77 L 30.77 8.98 L 29.45 9.25 L 28.16 9.59 L 26.89 9.97 L 25.64 10.41 L 24.42 10.88 L 23.22 11.40 L 22.05 11.96 L 20.89 12.56 L 19.75 13.21 L 18.63 13.89 L 17.54 14.63 L 16.47 15.41 L 15.44 16.25 L 14.44 17.15 L 13.48 18.11 L 12.58 19.13 L 11.74 20.21 L 10.97 21.35 L 10.28 22.54 L 9.68 23.79 L 9.18 25.08 L 8.77 26.42 L 8.47 27.77 L 8.28 29.15 L 8.19 30.54 L 8.21 31.93 L 8.33 33.31 L 8.55 34.68 L 8.85 36.02 L 9.25 37.33 L 9.72 38.61 L 10.26 39.85 L 10.86 41.06 L 11.51 42.23 L 12.22 43.36 L 12.97 44.46 L 13.76 45.52 L 14.59 46.55 L 15.47 47.54 L 16.38 48.49 L 17.33 49.41 L 18.33 50.29 L 19.37 51.13 L 20.46 51.91 L 21.59 52.64 L 22.77 53.30 L 24.00 53.90 L 25.26 54.41 L 26.56 54.84 L 27.89 55.17 L 29.24 55.41 L 30.60 55.54 L 31.98 55.57 L 33.35 55.49 L 34.70 55.30 L 36.04 55.02 L 37.35 54.63 L 38.62 54.15 L 39.85 53.59 L 41.03 52.96 L 42.16 52.25 L 43.25 51.49 L 44.28 50.68 L 45.27 49.83 L 46.21 48.94 L 47.11 48.01 L 47.96 47.06 L 48.78 46.08 L 49.57 45.07 L 50.32 44.04 L 51.03 42.98 L 51.71 41.89 L 52.35 40.77 L 52.94 39.61 L 53.49 38.42 L 53.97 37.19 L 54.40 35.93 L 54.75 34.64 L 55.02 33.32 L 55.20 31.98 L 55.30 30.62 L 55.29 29.25 L 55.18 27.88 L 54.97 26.53 L 54.65 25.19 L 54.23 23.87 L 53.72 22.59 L 53.11 21.36 L 52.42 20.16 L 51.66 19.02 L 50.83 17.93 L 49.97 16.86 Z"/>
|
||||
|
||||
<path fill="#9FE1CB" d="M20 28.5h10l2 2.4h12V46H20z"/>
|
||||
<path fill="#9FE1CB" opacity=".7" d="M34 24h12v12h-2.2V27.2H35.6z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.9 KiB |
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
||||
<path fill="#9FE1CB" d="M 49.21 17.51 L 50.41 18.25 L 51.45 19.16 L 52.41 20.17 L 53.29 21.26 L 54.10 22.43 L 54.80 23.66 L 55.42 24.96 L 55.92 26.30 L 56.32 27.68 L 56.60 29.10 L 56.78 30.53 L 56.84 31.98 L 56.79 33.42 L 56.64 34.86 L 56.39 36.28 L 56.04 37.68 L 55.61 39.05 L 55.10 40.39 L 54.52 41.70 L 53.87 42.97 L 53.16 44.21 L 52.39 45.40 L 51.57 46.56 L 50.69 47.68 L 49.76 48.75 L 48.78 49.78 L 47.75 50.77 L 46.66 51.70 L 45.52 52.57 L 44.34 53.38 L 43.10 54.12 L 41.82 54.79 L 40.49 55.36 L 39.12 55.85 L 37.73 56.23 L 36.30 56.51 L 34.86 56.69 L 33.42 56.75 L 31.98 56.70 L 30.55 56.54 L 29.14 56.27 L 27.76 55.90 L 26.41 55.44 L 25.12 54.88 L 23.87 54.25 L 22.67 53.54 L 21.53 52.78 L 20.44 51.96 L 19.40 51.09 L 18.41 50.19 L 17.47 49.25 L 16.57 48.29 L 15.71 47.31 L 14.89 46.29 L 14.11 45.26 L 13.36 44.20 L 12.65 43.12 L 11.97 42.00 L 11.33 40.86 L 10.74 39.68 L 10.20 38.46 L 9.72 37.22 L 9.31 35.94 L 8.96 34.63 L 8.70 33.29 L 8.53 31.93 L 8.45 30.56 L 8.47 29.18 L 8.60 27.80 L 8.82 26.43 L 9.15 25.08 L 9.59 23.76 L 10.12 22.47 L 10.74 21.23 L 11.45 20.04 L 12.23 18.90 L 13.09 17.81 L 14.01 16.79 L 14.99 15.83 L 16.02 14.93 L 17.09 14.08 L 18.20 13.30 L 19.34 12.57 L 20.51 11.90 L 21.71 11.29 L 22.94 10.74 L 24.19 10.24 L 25.46 9.80 L 26.76 9.43 L 28.08 9.14 L 29.41 8.92 L 30.76 8.78 L 32.11 8.75 L 33.47 8.82 L 34.80 9.02 L 36.09 9.50 L 36.09 9.50 L 34.74 9.55 L 33.42 9.62 L 32.11 9.75 L 30.82 9.96 L 29.56 10.22 L 28.32 10.54 L 27.10 10.91 L 25.91 11.33 L 24.74 11.78 L 23.60 12.28 L 22.47 12.82 L 21.36 13.39 L 20.27 14.01 L 19.20 14.66 L 18.16 15.37 L 17.13 16.12 L 16.14 16.92 L 15.18 17.78 L 14.27 18.70 L 13.41 19.67 L 12.60 20.71 L 11.87 21.80 L 11.21 22.95 L 10.63 24.14 L 10.15 25.38 L 9.76 26.65 L 9.47 27.95 L 9.29 29.27 L 9.20 30.60 L 9.22 31.93 L 9.34 33.26 L 9.54 34.56 L 9.84 35.85 L 10.22 37.10 L 10.66 38.33 L 11.18 39.52 L 11.76 40.67 L 12.38 41.79 L 13.06 42.88 L 13.78 43.93 L 14.54 44.94 L 15.33 45.93 L 16.17 46.88 L 17.04 47.79 L 17.96 48.67 L 18.91 49.51 L 19.91 50.31 L 20.95 51.06 L 22.04 51.76 L 23.17 52.40 L 24.34 52.97 L 25.54 53.46 L 26.79 53.87 L 28.06 54.19 L 29.35 54.41 L 30.66 54.54 L 31.98 54.57 L 33.29 54.49 L 34.59 54.31 L 35.87 54.04 L 37.12 53.67 L 38.34 53.21 L 39.51 52.67 L 40.64 52.07 L 41.73 51.39 L 42.77 50.66 L 43.76 49.89 L 44.70 49.07 L 45.60 48.22 L 46.46 47.33 L 47.28 46.42 L 48.07 45.48 L 48.82 44.52 L 49.54 43.53 L 50.22 42.51 L 50.87 41.47 L 51.48 40.39 L 52.05 39.29 L 52.57 38.14 L 53.04 36.97 L 53.44 35.76 L 53.78 34.53 L 54.04 33.26 L 54.22 31.98 L 54.30 30.68 L 54.30 29.37 L 54.19 28.06 L 53.99 26.76 L 53.69 25.48 L 53.29 24.22 L 52.79 22.99 L 52.21 21.81 L 51.55 20.67 L 50.82 19.58 L 50.02 18.53 L 49.21 17.51 Z"/>
|
||||
|
||||
<path fill="#9FE1CB" opacity=".72" d="M37.2 25.2h11.2v13.2h-1.8V27.4H38.6z"/>
|
||||
<path fill="#9FE1CB" d="M22.8 29.2h8.8l1.7 2.2h10.2V44H22.8z"/>
|
||||
<path fill="#9FE1CB" opacity=".45" d="M26.2 34.2h6.4v1.3h-6.4zm0 2.8h4.5v1.3h-4.5z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
||||
<path fill="#085041" d="M 49.21 17.51 L 50.41 18.25 L 51.45 19.16 L 52.41 20.17 L 53.29 21.26 L 54.10 22.43 L 54.80 23.66 L 55.42 24.96 L 55.92 26.30 L 56.32 27.68 L 56.60 29.10 L 56.78 30.53 L 56.84 31.98 L 56.79 33.42 L 56.64 34.86 L 56.39 36.28 L 56.04 37.68 L 55.61 39.05 L 55.10 40.39 L 54.52 41.70 L 53.87 42.97 L 53.16 44.21 L 52.39 45.40 L 51.57 46.56 L 50.69 47.68 L 49.76 48.75 L 48.78 49.78 L 47.75 50.77 L 46.66 51.70 L 45.52 52.57 L 44.34 53.38 L 43.10 54.12 L 41.82 54.79 L 40.49 55.36 L 39.12 55.85 L 37.73 56.23 L 36.30 56.51 L 34.86 56.69 L 33.42 56.75 L 31.98 56.70 L 30.55 56.54 L 29.14 56.27 L 27.76 55.90 L 26.41 55.44 L 25.12 54.88 L 23.87 54.25 L 22.67 53.54 L 21.53 52.78 L 20.44 51.96 L 19.40 51.09 L 18.41 50.19 L 17.47 49.25 L 16.57 48.29 L 15.71 47.31 L 14.89 46.29 L 14.11 45.26 L 13.36 44.20 L 12.65 43.12 L 11.97 42.00 L 11.33 40.86 L 10.74 39.68 L 10.20 38.46 L 9.72 37.22 L 9.31 35.94 L 8.96 34.63 L 8.70 33.29 L 8.53 31.93 L 8.45 30.56 L 8.47 29.18 L 8.60 27.80 L 8.82 26.43 L 9.15 25.08 L 9.59 23.76 L 10.12 22.47 L 10.74 21.23 L 11.45 20.04 L 12.23 18.90 L 13.09 17.81 L 14.01 16.79 L 14.99 15.83 L 16.02 14.93 L 17.09 14.08 L 18.20 13.30 L 19.34 12.57 L 20.51 11.90 L 21.71 11.29 L 22.94 10.74 L 24.19 10.24 L 25.46 9.80 L 26.76 9.43 L 28.08 9.14 L 29.41 8.92 L 30.76 8.78 L 32.11 8.75 L 33.47 8.82 L 34.80 9.02 L 36.09 9.50 L 36.09 9.50 L 34.74 9.55 L 33.42 9.62 L 32.11 9.75 L 30.82 9.96 L 29.56 10.22 L 28.32 10.54 L 27.10 10.91 L 25.91 11.33 L 24.74 11.78 L 23.60 12.28 L 22.47 12.82 L 21.36 13.39 L 20.27 14.01 L 19.20 14.66 L 18.16 15.37 L 17.13 16.12 L 16.14 16.92 L 15.18 17.78 L 14.27 18.70 L 13.41 19.67 L 12.60 20.71 L 11.87 21.80 L 11.21 22.95 L 10.63 24.14 L 10.15 25.38 L 9.76 26.65 L 9.47 27.95 L 9.29 29.27 L 9.20 30.60 L 9.22 31.93 L 9.34 33.26 L 9.54 34.56 L 9.84 35.85 L 10.22 37.10 L 10.66 38.33 L 11.18 39.52 L 11.76 40.67 L 12.38 41.79 L 13.06 42.88 L 13.78 43.93 L 14.54 44.94 L 15.33 45.93 L 16.17 46.88 L 17.04 47.79 L 17.96 48.67 L 18.91 49.51 L 19.91 50.31 L 20.95 51.06 L 22.04 51.76 L 23.17 52.40 L 24.34 52.97 L 25.54 53.46 L 26.79 53.87 L 28.06 54.19 L 29.35 54.41 L 30.66 54.54 L 31.98 54.57 L 33.29 54.49 L 34.59 54.31 L 35.87 54.04 L 37.12 53.67 L 38.34 53.21 L 39.51 52.67 L 40.64 52.07 L 41.73 51.39 L 42.77 50.66 L 43.76 49.89 L 44.70 49.07 L 45.60 48.22 L 46.46 47.33 L 47.28 46.42 L 48.07 45.48 L 48.82 44.52 L 49.54 43.53 L 50.22 42.51 L 50.87 41.47 L 51.48 40.39 L 52.05 39.29 L 52.57 38.14 L 53.04 36.97 L 53.44 35.76 L 53.78 34.53 L 54.04 33.26 L 54.22 31.98 L 54.30 30.68 L 54.30 29.37 L 54.19 28.06 L 53.99 26.76 L 53.69 25.48 L 53.29 24.22 L 52.79 22.99 L 52.21 21.81 L 51.55 20.67 L 50.82 19.58 L 50.02 18.53 L 49.21 17.51 Z"/>
|
||||
|
||||
<path fill="#085041" opacity=".72" d="M37.2 25.2h11.2v13.2h-1.8V27.4H38.6z"/>
|
||||
<path fill="#085041" d="M22.8 29.2h8.8l1.7 2.2h10.2V44H22.8z"/>
|
||||
<path fill="#085041" opacity=".45" d="M26.2 34.2h6.4v1.3h-6.4zm0 2.8h4.5v1.3h-4.5z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 617 B |
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<rect width="64" height="64" fill="#085041"/>
|
||||
<g transform="translate(8.32 8.32) scale(0.74)" color="#9FE1CB">
|
||||
<path fill="currentColor" d="M 49.21 17.51 L 50.41 18.25 L 51.45 19.16 L 52.41 20.17 L 53.29 21.26 L 54.10 22.43 L 54.80 23.66 L 55.42 24.96 L 55.92 26.30 L 56.32 27.68 L 56.60 29.10 L 56.78 30.53 L 56.84 31.98 L 56.79 33.42 L 56.64 34.86 L 56.39 36.28 L 56.04 37.68 L 55.61 39.05 L 55.10 40.39 L 54.52 41.70 L 53.87 42.97 L 53.16 44.21 L 52.39 45.40 L 51.57 46.56 L 50.69 47.68 L 49.76 48.75 L 48.78 49.78 L 47.75 50.77 L 46.66 51.70 L 45.52 52.57 L 44.34 53.38 L 43.10 54.12 L 41.82 54.79 L 40.49 55.36 L 39.12 55.85 L 37.73 56.23 L 36.30 56.51 L 34.86 56.69 L 33.42 56.75 L 31.98 56.70 L 30.55 56.54 L 29.14 56.27 L 27.76 55.90 L 26.41 55.44 L 25.12 54.88 L 23.87 54.25 L 22.67 53.54 L 21.53 52.78 L 20.44 51.96 L 19.40 51.09 L 18.41 50.19 L 17.47 49.25 L 16.57 48.29 L 15.71 47.31 L 14.89 46.29 L 14.11 45.26 L 13.36 44.20 L 12.65 43.12 L 11.97 42.00 L 11.33 40.86 L 10.74 39.68 L 10.20 38.46 L 9.72 37.22 L 9.31 35.94 L 8.96 34.63 L 8.70 33.29 L 8.53 31.93 L 8.45 30.56 L 8.47 29.18 L 8.60 27.80 L 8.82 26.43 L 9.15 25.08 L 9.59 23.76 L 10.12 22.47 L 10.74 21.23 L 11.45 20.04 L 12.23 18.90 L 13.09 17.81 L 14.01 16.79 L 14.99 15.83 L 16.02 14.93 L 17.09 14.08 L 18.20 13.30 L 19.34 12.57 L 20.51 11.90 L 21.71 11.29 L 22.94 10.74 L 24.19 10.24 L 25.46 9.80 L 26.76 9.43 L 28.08 9.14 L 29.41 8.92 L 30.76 8.78 L 32.11 8.75 L 33.47 8.82 L 34.80 9.02 L 36.09 9.50 L 36.09 9.50 L 34.74 9.55 L 33.42 9.62 L 32.11 9.75 L 30.82 9.96 L 29.56 10.22 L 28.32 10.54 L 27.10 10.91 L 25.91 11.33 L 24.74 11.78 L 23.60 12.28 L 22.47 12.82 L 21.36 13.39 L 20.27 14.01 L 19.20 14.66 L 18.16 15.37 L 17.13 16.12 L 16.14 16.92 L 15.18 17.78 L 14.27 18.70 L 13.41 19.67 L 12.60 20.71 L 11.87 21.80 L 11.21 22.95 L 10.63 24.14 L 10.15 25.38 L 9.76 26.65 L 9.47 27.95 L 9.29 29.27 L 9.20 30.60 L 9.22 31.93 L 9.34 33.26 L 9.54 34.56 L 9.84 35.85 L 10.22 37.10 L 10.66 38.33 L 11.18 39.52 L 11.76 40.67 L 12.38 41.79 L 13.06 42.88 L 13.78 43.93 L 14.54 44.94 L 15.33 45.93 L 16.17 46.88 L 17.04 47.79 L 17.96 48.67 L 18.91 49.51 L 19.91 50.31 L 20.95 51.06 L 22.04 51.76 L 23.17 52.40 L 24.34 52.97 L 25.54 53.46 L 26.79 53.87 L 28.06 54.19 L 29.35 54.41 L 30.66 54.54 L 31.98 54.57 L 33.29 54.49 L 34.59 54.31 L 35.87 54.04 L 37.12 53.67 L 38.34 53.21 L 39.51 52.67 L 40.64 52.07 L 41.73 51.39 L 42.77 50.66 L 43.76 49.89 L 44.70 49.07 L 45.60 48.22 L 46.46 47.33 L 47.28 46.42 L 48.07 45.48 L 48.82 44.52 L 49.54 43.53 L 50.22 42.51 L 50.87 41.47 L 51.48 40.39 L 52.05 39.29 L 52.57 38.14 L 53.04 36.97 L 53.44 35.76 L 53.78 34.53 L 54.04 33.26 L 54.22 31.98 L 54.30 30.68 L 54.30 29.37 L 54.19 28.06 L 53.99 26.76 L 53.69 25.48 L 53.29 24.22 L 52.79 22.99 L 52.21 21.81 L 51.55 20.67 L 50.82 19.58 L 50.02 18.53 L 49.21 17.51 Z"/>
|
||||
|
||||
<path fill="currentColor" d="M20 28.5h10l2 2.4h12V46H20z"/>
|
||||
<path fill="currentColor" opacity=".7" d="M34 24h12v12h-2.2V27.2H35.6z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -9,8 +9,8 @@
|
||||
"theme_color": "#085041",
|
||||
"lang": "de",
|
||||
"icons": [
|
||||
{ "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
|
||||
{ "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
|
||||
{ "src": "/icons/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
|
||||
{ "src": "/brand/app-icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
|
||||
{ "src": "/brand/app-icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
|
||||
{ "src": "/brand/app-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
export const ENSO_PATH = "M 49.21 17.51 L 50.41 18.25 L 51.45 19.16 L 52.41 20.17 L 53.29 21.26 L 54.10 22.43 L 54.80 23.66 L 55.42 24.96 L 55.92 26.30 L 56.32 27.68 L 56.60 29.10 L 56.78 30.53 L 56.84 31.98 L 56.79 33.42 L 56.64 34.86 L 56.39 36.28 L 56.04 37.68 L 55.61 39.05 L 55.10 40.39 L 54.52 41.70 L 53.87 42.97 L 53.16 44.21 L 52.39 45.40 L 51.57 46.56 L 50.69 47.68 L 49.76 48.75 L 48.78 49.78 L 47.75 50.77 L 46.66 51.70 L 45.52 52.57 L 44.34 53.38 L 43.10 54.12 L 41.82 54.79 L 40.49 55.36 L 39.12 55.85 L 37.73 56.23 L 36.30 56.51 L 34.86 56.69 L 33.42 56.75 L 31.98 56.70 L 30.55 56.54 L 29.14 56.27 L 27.76 55.90 L 26.41 55.44 L 25.12 54.88 L 23.87 54.25 L 22.67 53.54 L 21.53 52.78 L 20.44 51.96 L 19.40 51.09 L 18.41 50.19 L 17.47 49.25 L 16.57 48.29 L 15.71 47.31 L 14.89 46.29 L 14.11 45.26 L 13.36 44.20 L 12.65 43.12 L 11.97 42.00 L 11.33 40.86 L 10.74 39.68 L 10.20 38.46 L 9.72 37.22 L 9.31 35.94 L 8.96 34.63 L 8.70 33.29 L 8.53 31.93 L 8.45 30.56 L 8.47 29.18 L 8.60 27.80 L 8.82 26.43 L 9.15 25.08 L 9.59 23.76 L 10.12 22.47 L 10.74 21.23 L 11.45 20.04 L 12.23 18.90 L 13.09 17.81 L 14.01 16.79 L 14.99 15.83 L 16.02 14.93 L 17.09 14.08 L 18.20 13.30 L 19.34 12.57 L 20.51 11.90 L 21.71 11.29 L 22.94 10.74 L 24.19 10.24 L 25.46 9.80 L 26.76 9.43 L 28.08 9.14 L 29.41 8.92 L 30.76 8.78 L 32.11 8.75 L 33.47 8.82 L 34.80 9.02 L 36.09 9.50 L 36.09 9.50 L 34.74 9.55 L 33.42 9.62 L 32.11 9.75 L 30.82 9.96 L 29.56 10.22 L 28.32 10.54 L 27.10 10.91 L 25.91 11.33 L 24.74 11.78 L 23.60 12.28 L 22.47 12.82 L 21.36 13.39 L 20.27 14.01 L 19.20 14.66 L 18.16 15.37 L 17.13 16.12 L 16.14 16.92 L 15.18 17.78 L 14.27 18.70 L 13.41 19.67 L 12.60 20.71 L 11.87 21.80 L 11.21 22.95 L 10.63 24.14 L 10.15 25.38 L 9.76 26.65 L 9.47 27.95 L 9.29 29.27 L 9.20 30.60 L 9.22 31.93 L 9.34 33.26 L 9.54 34.56 L 9.84 35.85 L 10.22 37.10 L 10.66 38.33 L 11.18 39.52 L 11.76 40.67 L 12.38 41.79 L 13.06 42.88 L 13.78 43.93 L 14.54 44.94 L 15.33 45.93 L 16.17 46.88 L 17.04 47.79 L 17.96 48.67 L 18.91 49.51 L 19.91 50.31 L 20.95 51.06 L 22.04 51.76 L 23.17 52.40 L 24.34 52.97 L 25.54 53.46 L 26.79 53.87 L 28.06 54.19 L 29.35 54.41 L 30.66 54.54 L 31.98 54.57 L 33.29 54.49 L 34.59 54.31 L 35.87 54.04 L 37.12 53.67 L 38.34 53.21 L 39.51 52.67 L 40.64 52.07 L 41.73 51.39 L 42.77 50.66 L 43.76 49.89 L 44.70 49.07 L 45.60 48.22 L 46.46 47.33 L 47.28 46.42 L 48.07 45.48 L 48.82 44.52 L 49.54 43.53 L 50.22 42.51 L 50.87 41.47 L 51.48 40.39 L 52.05 39.29 L 52.57 38.14 L 53.04 36.97 L 53.44 35.76 L 53.78 34.53 L 54.04 33.26 L 54.22 31.98 L 54.30 30.68 L 54.30 29.37 L 54.19 28.06 L 53.99 26.76 L 53.69 25.48 L 53.29 24.22 L 52.79 22.99 L 52.21 21.81 L 51.55 20.67 L 50.82 19.58 L 50.02 18.53 L 49.21 17.51 Z";
|
||||
@@ -454,6 +454,7 @@ export function CaseDetail() {
|
||||
contextValue={id}
|
||||
onContext={parentTree ? ((next) => { if (next !== id) navigate(`/cases/${next}`); }) : null}
|
||||
nodes={caseNodes(record, parentTree)}
|
||||
allLabel="Direkt in dieser Akte"
|
||||
chapters={chapters}
|
||||
chapterId={overview ? "" : chapterId}
|
||||
allCount={(record.bindings || []).length}
|
||||
@@ -473,7 +474,7 @@ export function CaseDetail() {
|
||||
<ReadingPane
|
||||
binding={entry}
|
||||
context={context}
|
||||
backLabel={activeChapter?.title || "Alle Inhalte"}
|
||||
backLabel={activeChapter?.title || "Direkt in dieser Akte"}
|
||||
onClose={closeEntry}
|
||||
onReload={load}
|
||||
canDetach={canEdit}
|
||||
@@ -530,7 +531,8 @@ export function CaseDetail() {
|
||||
containerId={id}
|
||||
onlyChapter={chapterId}
|
||||
selectedId={entryId}
|
||||
listTitle={activeChapter ? activeChapter.title : "Alle Inhalte"}
|
||||
listTitle={activeChapter ? activeChapter.title : "Direkt in dieser Akte"}
|
||||
context={context}
|
||||
onOpen={openEntry}
|
||||
onChange={load}
|
||||
itemHref={(binding) => {
|
||||
@@ -567,6 +569,7 @@ export function CaseDetail() {
|
||||
<AssignMatter caseId={id} onChange={() => { setModal(""); load(); }} />
|
||||
</Modal>
|
||||
<Modal open={modal === "add"} title={`Hinzufügen in ${targetLabel}`} onClose={() => setModal("")}>
|
||||
<p className="muted">Dieser Inhalt liegt direkt in der Akte. Er erscheint unter „Direkt in dieser Akte“ und im Überblick, nicht in einem Vorgang.</p>
|
||||
<TargetLine label={targetLabel} chapters={record.chapters} chapterId={activeChapter?.id || ""} />
|
||||
<div className="add-choices">
|
||||
<button type="button" onClick={() => setModal("chapter")}>Kapitel</button>
|
||||
@@ -585,7 +588,7 @@ export function CaseDetail() {
|
||||
<Modal open={modal === "paperless"} title="Aus Paperless" onClose={() => setModal("")}>
|
||||
<PaperlessPicker context={context} chapterId={activeChapter?.id || ""} chapterTitle={activeChapter?.title || ""} targetLabel={targetLabel} onDone={() => { setModal(""); load(); }} />
|
||||
</Modal>
|
||||
<Modal open={modal === "mail"} title="E-Mail verbinden" wide onClose={() => setModal("")}>
|
||||
<Modal open={modal === "mail"} title="E-Mail verbinden" wide split onClose={() => setModal("")}>
|
||||
<MailPicker context={context} chapterId={activeChapter?.id || ""} chapterTitle={activeChapter?.title || ""} targetLabel={targetLabel} onDone={() => { setModal(""); load(); }} />
|
||||
</Modal>
|
||||
<Modal open={modal === "subcase"} title="Unterakte anlegen" onClose={() => setModal("")}>
|
||||
|
||||
@@ -62,7 +62,7 @@ export function Login() {
|
||||
return (
|
||||
<main className="login">
|
||||
<section className="card login-card">
|
||||
<p className="login-mark" aria-hidden="true"><Mark size={72} /></p>
|
||||
<p className="login-mark"><Mark size={72} /></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>
|
||||
|
||||
@@ -139,8 +139,8 @@ function caseNodes(caseRecord, parentRecord, activeId, contextId) {
|
||||
}];
|
||||
}
|
||||
|
||||
function loneNodes(record, query) {
|
||||
const current = {
|
||||
function placementNodes(record) {
|
||||
const matter = {
|
||||
id: record.id,
|
||||
title: record.title,
|
||||
kind: record.kind_label || "Vorgang",
|
||||
@@ -150,22 +150,32 @@ function loneNodes(record, query) {
|
||||
id: item.id,
|
||||
title: item.title,
|
||||
kind: "Teilvorgang",
|
||||
href: `/matters/${item.id}${query}`,
|
||||
href: `/matters/${item.id}`,
|
||||
current: false,
|
||||
children: [],
|
||||
})),
|
||||
};
|
||||
if (record.parent_matter_id && record.parent_title) {
|
||||
return [{
|
||||
id: record.parent_matter_id,
|
||||
title: record.parent_title,
|
||||
kind: "Vorgang",
|
||||
href: `/matters/${record.parent_matter_id}${query}`,
|
||||
const rooted = record.parent_matter_id && record.parent_title ? [{
|
||||
id: record.parent_matter_id,
|
||||
title: record.parent_title,
|
||||
kind: "Vorgang",
|
||||
href: `/matters/${record.parent_matter_id}`,
|
||||
current: false,
|
||||
children: [matter],
|
||||
}] : [matter];
|
||||
const cases = record.placements || [];
|
||||
if (cases.length < 2) return rooted;
|
||||
return [
|
||||
...rooted,
|
||||
...cases.map((item) => ({
|
||||
id: item.case_id,
|
||||
title: item.label.replaceAll("Unterakte ", "").replaceAll("Akte ", "").replaceAll(" → ", " / "),
|
||||
kind: "Akte",
|
||||
href: `/matters/${record.id}?context_kind=case&context_id=${item.case_id}`,
|
||||
current: false,
|
||||
children: [current],
|
||||
}];
|
||||
}
|
||||
return [current];
|
||||
children: [],
|
||||
})),
|
||||
];
|
||||
}
|
||||
|
||||
function objectTrail(record, query) {
|
||||
@@ -233,6 +243,16 @@ export function MatterDetail() {
|
||||
}
|
||||
}, [record, id, chapterId, params, setParams]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!record || record.id !== id || inherited?.kind === "case") return;
|
||||
const placements = record.placements || [];
|
||||
if (placements.length !== 1) return;
|
||||
const next = new URLSearchParams(params);
|
||||
next.set("context_kind", "case");
|
||||
next.set("context_id", placements[0].case_id);
|
||||
setParams(next, { replace: true });
|
||||
}, [record, id, inherited?.kind]);
|
||||
|
||||
useEffect(() => {
|
||||
if (inherited?.kind !== "case") {
|
||||
setCaseTree(null);
|
||||
@@ -343,7 +363,7 @@ export function MatterDetail() {
|
||||
label: item.label.replaceAll("Unterakte ", "").replaceAll("Akte ", "").replaceAll(" → ", " / "),
|
||||
}));
|
||||
const contextValue = inherited?.kind === "case" ? inherited.id : (contexts.length === 1 ? contexts[0].id : "");
|
||||
const nodes = caseTree ? caseNodes(caseTree, parentTree, id, inherited.id) : loneNodes(record, query);
|
||||
const nodes = caseTree ? caseNodes(caseTree, parentTree, id, inherited.id) : placementNodes(record);
|
||||
const links = [
|
||||
...(record.cross_links || []).map((item) => ({
|
||||
id: `cross-${item.id}`,
|
||||
@@ -351,7 +371,7 @@ export function MatterDetail() {
|
||||
kind: "Querverweis",
|
||||
href: `/matters/${item.matter_id}${query}`,
|
||||
})),
|
||||
...(record.case_links || []).filter((item) => item.case_id !== inherited?.id).map((item) => ({
|
||||
...(record.case_links || []).filter((item) => inherited?.kind === "case" && item.case_id !== inherited.id).map((item) => ({
|
||||
id: `case-${item.id}`,
|
||||
title: item.title,
|
||||
kind: "Weitere Akte",
|
||||
@@ -403,7 +423,7 @@ export function MatterDetail() {
|
||||
>
|
||||
<header className="workspace-head">
|
||||
<div>
|
||||
<Trail items={objectTrail(record, query)} />
|
||||
<Trail items={record.trail?.length ? record.trail : objectTrail(record, query)} />
|
||||
<Placements items={record.placements} />
|
||||
<div className="title-row">
|
||||
<h1>{record.title}</h1>
|
||||
@@ -477,7 +497,7 @@ export function MatterDetail() {
|
||||
) : null}
|
||||
</Workspace>
|
||||
<Modal open={modal === "work"} title="Aufgabe oder Frist" onClose={() => setModal("")}>
|
||||
<WorkForms matterId={id} context={inherited} tasks={record.tasks} onChange={() => { setModal(""); load(); }} />
|
||||
<WorkForms matterId={id} context={inherited} deadlines={record.deadlines || []} onChange={() => { setModal(""); load(); }} />
|
||||
</Modal>
|
||||
<Modal open={modal === "add"} title={`Hinzufügen in ${targetLabel}`} onClose={() => setModal("")}>
|
||||
<TargetLine label={targetLabel} chapters={record.chapters} chapterId={activeChapter?.id || ""} />
|
||||
@@ -498,7 +518,7 @@ export function MatterDetail() {
|
||||
<Modal open={modal === "paperless"} title="Aus Paperless" onClose={() => setModal("")}>
|
||||
<PaperlessPicker context={rightsContext} placement={placement} chapterId={activeChapter?.id || ""} chapterTitle={activeChapter?.title || ""} targetLabel={targetLabel} onDone={() => { setModal(""); load(); }} />
|
||||
</Modal>
|
||||
<Modal open={modal === "mail"} title="E-Mail verbinden" wide onClose={() => setModal("")}>
|
||||
<Modal open={modal === "mail"} title="E-Mail verbinden" wide split onClose={() => setModal("")}>
|
||||
<MailPicker context={rightsContext} placement={placement} chapterId={activeChapter?.id || ""} chapterTitle={activeChapter?.title || ""} targetLabel={targetLabel} onDone={() => { setModal(""); load(); }} />
|
||||
</Modal>
|
||||
<Modal open={modal === "submatter"} title="Teilvorgang anlegen" onClose={() => setModal("")}>
|
||||
@@ -527,14 +547,35 @@ export function MatterDetail() {
|
||||
);
|
||||
}
|
||||
|
||||
function WorkForms({ matterId, context, tasks, onChange }) {
|
||||
function WorkForms({ matterId, context, deadlines, onChange }) {
|
||||
const [taskTitle, setTaskTitle] = useState("");
|
||||
const [taskDue, setTaskDue] = useState("");
|
||||
const [deadlineId, setDeadlineId] = useState("");
|
||||
const [deadlineTitle, setDeadlineTitle] = useState("");
|
||||
const [deadlineDue, setDeadlineDue] = useState("");
|
||||
const [linkTask, setLinkTask] = useState("");
|
||||
const [error, setError] = useState("");
|
||||
|
||||
async function addDeadline(event) {
|
||||
event.preventDefault();
|
||||
setError("");
|
||||
try {
|
||||
await api("/api/v1/deadlines", {
|
||||
method: "POST",
|
||||
body: {
|
||||
title: deadlineTitle,
|
||||
due_on: deadlineDue,
|
||||
matter_id: matterId,
|
||||
...(context ? { context } : {}),
|
||||
},
|
||||
});
|
||||
setDeadlineTitle("");
|
||||
setDeadlineDue("");
|
||||
onChange();
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
}
|
||||
}
|
||||
|
||||
async function addTask(event) {
|
||||
event.preventDefault();
|
||||
setError("");
|
||||
@@ -548,53 +589,15 @@ function WorkForms({ matterId, context, tasks, onChange }) {
|
||||
...(context ? { context } : {}),
|
||||
},
|
||||
});
|
||||
if (linkTask === "new-deadline" && deadlineTitle && deadlineDue) {
|
||||
const deadline = await api("/api/v1/deadlines", {
|
||||
method: "POST",
|
||||
body: {
|
||||
title: deadlineTitle,
|
||||
due_on: deadlineDue,
|
||||
matter_id: matterId,
|
||||
...(context ? { context } : {}),
|
||||
},
|
||||
});
|
||||
if (deadlineId) {
|
||||
await api(`/api/v1/tasks/${task.id}/deadline-links`, {
|
||||
method: "POST",
|
||||
body: { deadline_id: deadline.id, ...(context ? { context } : {}) },
|
||||
body: { deadline_id: deadlineId, ...(context ? { context } : {}) },
|
||||
});
|
||||
setDeadlineTitle("");
|
||||
setDeadlineDue("");
|
||||
}
|
||||
setTaskTitle("");
|
||||
setTaskDue("");
|
||||
setLinkTask("");
|
||||
onChange();
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
}
|
||||
}
|
||||
|
||||
async function addDeadline(event) {
|
||||
event.preventDefault();
|
||||
setError("");
|
||||
try {
|
||||
const deadline = await api("/api/v1/deadlines", {
|
||||
method: "POST",
|
||||
body: {
|
||||
title: deadlineTitle,
|
||||
due_on: deadlineDue,
|
||||
matter_id: matterId,
|
||||
...(context ? { context } : {}),
|
||||
},
|
||||
});
|
||||
if (linkTask && linkTask !== "new-deadline") {
|
||||
await api(`/api/v1/tasks/${linkTask}/deadline-links`, {
|
||||
method: "POST",
|
||||
body: { deadline_id: deadline.id, ...(context ? { context } : {}) },
|
||||
});
|
||||
}
|
||||
setDeadlineTitle("");
|
||||
setDeadlineDue("");
|
||||
setDeadlineId("");
|
||||
onChange();
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
@@ -603,23 +606,26 @@ function WorkForms({ matterId, context, tasks, onChange }) {
|
||||
|
||||
return (
|
||||
<div className="forms">
|
||||
<form onSubmit={addDeadline} className="stack compact">
|
||||
<h3>Frist</h3>
|
||||
<input value={deadlineTitle} onChange={(event) => setDeadlineTitle(event.target.value)} placeholder="Maßgeblicher Termin" required />
|
||||
<label>Frist <input type="date" value={deadlineDue} onChange={(event) => setDeadlineDue(event.target.value)} required /></label>
|
||||
<button type="submit">Frist erfassen</button>
|
||||
</form>
|
||||
<form onSubmit={addTask} className="stack compact">
|
||||
<h3>Aufgabe</h3>
|
||||
<input value={taskTitle} onChange={(event) => setTaskTitle(event.target.value)} placeholder="Was ist zu tun?" required />
|
||||
<input value={taskTitle} onChange={(event) => setTaskTitle(event.target.value)} placeholder="Was ist vor der Frist zu tun?" required />
|
||||
<label>Arbeitstermin <input type="date" value={taskDue} onChange={(event) => setTaskDue(event.target.value)} /></label>
|
||||
<label>
|
||||
Gehört zur Frist
|
||||
<select value={deadlineId} onChange={(event) => setDeadlineId(event.target.value)}>
|
||||
<option value="">Ohne Frist</option>
|
||||
{deadlines.map((deadline) => (
|
||||
<option key={deadline.id} value={deadline.id}>{deadline.title}</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
<button type="submit">Aufgabe anlegen</button>
|
||||
</form>
|
||||
<form onSubmit={addDeadline} className="stack compact">
|
||||
<h3>Unabhängige Frist</h3>
|
||||
<input value={deadlineTitle} onChange={(event) => setDeadlineTitle(event.target.value)} placeholder="Maßgebliche Frist" required />
|
||||
<label>Frist <input type="date" value={deadlineDue} onChange={(event) => setDeadlineDue(event.target.value)} required /></label>
|
||||
<select value={linkTask} onChange={(event) => setLinkTask(event.target.value)}>
|
||||
<option value="">Nicht mit einer Aufgabe verknüpfen</option>
|
||||
{tasks.map((task) => (
|
||||
<option key={task.id} value={task.id}>{task.title}</option>
|
||||
))}
|
||||
</select>
|
||||
<button type="submit">Frist erfassen</button>
|
||||
<ErrorNote error={error} />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useRef } from "react";
|
||||
import { isDirty, markDirty } from "../api.js";
|
||||
|
||||
export function Modal({ open, title, onClose, wide = false, children }) {
|
||||
export function Modal({ open, title, onClose, wide = false, split = false, children }) {
|
||||
const dialogRef = useRef(null);
|
||||
const restoreRef = useRef(null);
|
||||
|
||||
@@ -33,7 +33,7 @@ export function Modal({ open, title, onClose, wide = false, children }) {
|
||||
if (!open) return null;
|
||||
return (
|
||||
<div className="modal-overlay" onClick={(event) => { if (event.target === event.currentTarget) requestClose(); }}>
|
||||
<div ref={dialogRef} className={wide ? "modal modal--wide" : "modal"} role="dialog" aria-modal="true" aria-label={title} tabIndex={-1}>
|
||||
<div ref={dialogRef} className={`modal${wide ? " modal--wide" : ""}${split ? " modal--split" : ""}`} role="dialog" aria-modal="true" aria-label={title} tabIndex={-1}>
|
||||
<header className="modal__bar">
|
||||
<h2>{title}</h2>
|
||||
<button type="button" className="quiet" onClick={requestClose}>Schließen</button>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useEffect, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { api } from "../api.js";
|
||||
import { TargetLine, formatDate } from "./content.jsx";
|
||||
import { NavIcon } from "./icons.jsx";
|
||||
import { ErrorNote } from "./widgets.jsx";
|
||||
|
||||
export function Sources() {
|
||||
@@ -231,9 +232,12 @@ function FolderBranch({ node, mailbox, expanded, onToggle, onSelect }) {
|
||||
</button>
|
||||
) : <span className="folder-twist" aria-hidden="true" />}
|
||||
{node.selectable ? (
|
||||
<button type="button" className="folder-name" aria-current={current ? "true" : undefined} onClick={() => onSelect(node.name)}>{node.label}</button>
|
||||
<button type="button" className="folder-name" aria-current={current ? "true" : undefined} onClick={() => onSelect(node.name)}>
|
||||
<NavIcon name="folder" />
|
||||
<span>{node.label}</span>
|
||||
</button>
|
||||
) : (
|
||||
<span className="folder-name">{node.label}</span>
|
||||
<span className="folder-name"><NavIcon name="folder" /><span>{node.label}</span></span>
|
||||
)}
|
||||
</div>
|
||||
{node.children.length && open ? (
|
||||
|
||||
@@ -165,11 +165,9 @@ function sectionsOf(chapters, bindings) {
|
||||
}
|
||||
|
||||
export function matterOpenHref(item) {
|
||||
const contexts = item?.contexts || [];
|
||||
if (contexts.some((entry) => entry.kind === "direct")) return `/matters/${item.id}`;
|
||||
const context = contexts.find((entry) => entry.kind === "case");
|
||||
if (!context) return `/matters/${item.id}`;
|
||||
return `/matters/${item.id}?context_kind=case&context_id=${context.id}`;
|
||||
const cases = (item?.contexts || []).filter((entry) => entry.kind === "case");
|
||||
if (cases.length === 1) return `/matters/${item.id}?context_kind=case&context_id=${cases[0].id}`;
|
||||
return `/matters/${item.id}`;
|
||||
}
|
||||
|
||||
export function Placements({ items }) {
|
||||
@@ -346,7 +344,25 @@ export function ContentBoard({
|
||||
const visibleSections = onlyChapter ? sections.filter((section) => section.id === onlyChapter) : sections;
|
||||
const shownCount = onlyChapter ? (visibleSections[0]?.items.length || 0) : source.length;
|
||||
const canSort = sortable && record?.rights?.edit;
|
||||
const canEdit = Boolean(record?.rights?.edit);
|
||||
const canDestroy = Boolean(record?.is_owner);
|
||||
const canMoveChapters = Boolean(canSort && chapters.length > 1);
|
||||
|
||||
async function removeBinding(binding, everywhere) {
|
||||
const element = binding.element;
|
||||
if (everywhere) {
|
||||
if (!window.confirm("Überall löschen? Alle Einbindungen verschwinden. Eine Paperless-Quelle bleibt unangetastet.")) return;
|
||||
await api(`/api/v1/elements/${element.id}/delete`, { method: "POST", body: { expected_version: element.version } });
|
||||
} else {
|
||||
if (!window.confirm("Aus diesem Zusammenhang entfernen? Die Unterlage bleibt an anderen Stellen erhalten.")) return;
|
||||
const action = context || (containerKind === "case" ? { kind: "case", id: containerId } : { kind: "matter", id: containerId });
|
||||
const search = new URLSearchParams();
|
||||
search.set("context_kind", action.kind);
|
||||
search.set("context_id", action.id);
|
||||
await api(`/api/v1/bindings/${binding.id}?${search}`, { method: "DELETE" });
|
||||
}
|
||||
onChange();
|
||||
}
|
||||
const orderPath = `/api/v1/${containerKind === "case" ? "cases" : "matters"}/${containerId}`;
|
||||
const orderContext = context && containerKind === "matter" ? { context } : {};
|
||||
|
||||
@@ -794,8 +810,15 @@ export function ContentBoard({
|
||||
<span className="preview-row__origin">Kapitel {(chapters.find((chapter) => chapter.id === binding.chapter_id)?.title) || ""}</span>
|
||||
) : null}
|
||||
</Link>
|
||||
{(canSort && custom) || (canSort && chapters.length) ? (
|
||||
{(canEdit || (canSort && custom) || (canSort && chapters.length)) ? (
|
||||
<div className="preview-row__actions">
|
||||
{canEdit ? (
|
||||
<details className="row-menu">
|
||||
<summary>Entfernen</summary>
|
||||
<button type="button" onClick={() => removeBinding(binding, false)}>Aus diesem Zusammenhang entfernen</button>
|
||||
{canDestroy ? <button type="button" className="danger" onClick={() => removeBinding(binding, true)}>Überall löschen</button> : null}
|
||||
</details>
|
||||
) : null}
|
||||
{canSort && custom ? (
|
||||
<details className="row-menu">
|
||||
<summary>Reihenfolge</summary>
|
||||
@@ -940,8 +963,27 @@ export function AuditLog({ items, nextCursor, onMore }) {
|
||||
);
|
||||
}
|
||||
|
||||
function contentChoices(record) {
|
||||
const rows = [...(record?.bindings || [])];
|
||||
for (const group of record?.contained || []) rows.push(...(group.bindings || []));
|
||||
const seen = new Set();
|
||||
return rows.flatMap((binding) => {
|
||||
const element = binding.element;
|
||||
if (!element?.id || seen.has(element.id)) return [];
|
||||
seen.add(element.id);
|
||||
return [{ id: element.id, title: element.title }];
|
||||
});
|
||||
}
|
||||
|
||||
function taskContextBody(task, context) {
|
||||
const taskContext = task.action_context || context;
|
||||
return taskContext ? { context: taskContext } : {};
|
||||
}
|
||||
|
||||
export function WorkLists({ record, context, onChange }) {
|
||||
const linked = new Set((record.task_deadline_links || []).map((item) => item.task_id));
|
||||
const links = record.task_deadline_links || [];
|
||||
const tasks = record.tasks || [];
|
||||
const elements = contentChoices(record);
|
||||
|
||||
async function complete(task) {
|
||||
const body = { expected_version: task.version, status: "done" };
|
||||
@@ -958,42 +1000,135 @@ export function WorkLists({ record, context, onChange }) {
|
||||
onChange();
|
||||
}
|
||||
|
||||
const tasksFor = (deadlineId) => tasks.filter((task) => links.some((link) => link.deadline_id === deadlineId && link.task_id === task.id));
|
||||
const linkedIds = new Set(links.map((link) => link.task_id));
|
||||
const loose = tasks.filter((task) => !linkedIds.has(task.id));
|
||||
|
||||
async function assign(task, deadline) {
|
||||
await api(`/api/v1/tasks/${task.id}/deadline-links`, {
|
||||
method: "POST",
|
||||
body: { deadline_id: deadline.id, ...taskContextBody(task, context) },
|
||||
});
|
||||
onChange();
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="stack">
|
||||
<p className="muted">Erledigen und Erfüllen bleiben getrennte Aktionen.</p>
|
||||
<div>
|
||||
<h3>Aufgaben</h3>
|
||||
{record.tasks?.length ? (
|
||||
<ul className="work">
|
||||
{record.tasks.map((task) => (
|
||||
<li key={task.id}>
|
||||
<div>
|
||||
<strong>{task.title}</strong>
|
||||
<span>{task.status === "done" ? "Erledigt" : "Offen"}{task.due_on ? ` · ${formatDate(task.due_on)}` : ""}{task.matter_title ? ` · ${task.matter_title}` : ""}</span>
|
||||
{linked.has(task.id) ? <small>Mit einer Frist verknüpft, ohne sie zu erfüllen.</small> : null}
|
||||
</div>
|
||||
{task.status === "open" && task.rights?.edit !== false ? <button type="button" onClick={() => complete(task)}>Erledigen</button> : null}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : <p className="muted">Keine Aufgabe.</p>}
|
||||
</div>
|
||||
<p className="muted">Eine Frist ist der maßgebliche Termin. Mehrere Aufgaben können davor liegen. Erledigen einer Aufgabe erfüllt die Frist nicht.</p>
|
||||
<div>
|
||||
<h3>Fristen</h3>
|
||||
{record.deadlines?.length ? (
|
||||
<ul className="work">
|
||||
{record.deadlines.map((deadline) => (
|
||||
<li key={deadline.id}>
|
||||
<div>
|
||||
<strong>{deadline.title}</strong>
|
||||
<span>{deadline.status === "fulfilled" ? "Erfüllt" : "Offen"} · {formatDate(deadline.due_on)}{deadline.matter_title ? ` · ${deadline.matter_title}` : ""}</span>
|
||||
</div>
|
||||
{deadline.status === "open" ? <button type="button" onClick={() => fulfill(deadline)}>Frist erfüllen</button> : null}
|
||||
</li>
|
||||
))}
|
||||
{record.deadlines.map((deadline) => {
|
||||
const assigned = tasksFor(deadline.id);
|
||||
const available = tasks.filter((task) => !assigned.some((item) => item.id === task.id));
|
||||
return (
|
||||
<li key={deadline.id}>
|
||||
<div>
|
||||
<strong>{deadline.title}</strong>
|
||||
<span>{deadline.status === "fulfilled" ? "Erfüllt" : "Offen"} · {formatDate(deadline.due_on)}{deadline.matter_title ? ` · ${deadline.matter_title}` : ""}</span>
|
||||
{assigned.length ? (
|
||||
<ul className="task-under">
|
||||
{assigned.map((task) => (
|
||||
<TaskRow key={task.id} task={task} tasks={tasks} elements={elements} context={context} onComplete={complete} onChange={onChange} />
|
||||
))}
|
||||
</ul>
|
||||
) : <small>Noch keine Aufgabe vor dieser Frist.</small>}
|
||||
{available.length ? (
|
||||
<label className="task-assign">
|
||||
Aufgabe zuordnen
|
||||
<select value="" onChange={(event) => { const task = available.find((item) => item.id === event.target.value); if (task) assign(task, deadline); }}>
|
||||
<option value="">Auswählen</option>
|
||||
{available.map((task) => <option key={task.id} value={task.id}>{task.title}</option>)}
|
||||
</select>
|
||||
</label>
|
||||
) : null}
|
||||
</div>
|
||||
{deadline.status === "open" ? <button type="button" onClick={() => fulfill(deadline)}>Frist erfüllen</button> : null}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
) : <p className="muted">Keine Frist.</p>}
|
||||
</div>
|
||||
<div>
|
||||
<h3>Aufgaben ohne Frist</h3>
|
||||
{loose.length ? (
|
||||
<ul className="work">
|
||||
{loose.map((task) => (
|
||||
<li key={task.id}>
|
||||
<TaskRow task={task} tasks={tasks} elements={elements} context={context} onComplete={complete} onChange={onChange} />
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : <p className="muted">Keine Aufgabe ohne Frist.</p>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function TaskRow({ task, tasks, elements, context, onComplete, onChange }) {
|
||||
const [elementIds, setElementIds] = useState((task.elements || []).map((item) => item.id));
|
||||
const [dependsOn, setDependsOn] = useState("");
|
||||
const others = tasks.filter((item) => item.id !== task.id);
|
||||
|
||||
async function saveElements(next) {
|
||||
setElementIds(next);
|
||||
await api(`/api/v1/tasks/${task.id}/elements`, {
|
||||
method: "PUT",
|
||||
body: { element_ids: next, ...taskContextBody(task, context) },
|
||||
});
|
||||
onChange();
|
||||
}
|
||||
|
||||
async function addDependency(event) {
|
||||
const id = event.target.value;
|
||||
setDependsOn("");
|
||||
if (!id) return;
|
||||
await api(`/api/v1/tasks/${task.id}/dependencies`, {
|
||||
method: "POST",
|
||||
body: { depends_on_task_id: id, ...taskContextBody(task, context) },
|
||||
});
|
||||
onChange();
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="task-row">
|
||||
<div>
|
||||
<strong>{task.title}</strong>
|
||||
<span>{task.status === "done" ? "Erledigt" : "Offen"}{task.due_on ? ` · Arbeitstermin ${formatDate(task.due_on)}` : ""}</span>
|
||||
{(task.depends_on || []).length ? <small>Hängt ab von {task.depends_on.map((item) => item.title).join(", ")}.</small> : null}
|
||||
{(task.elements || []).length ? <small>Bezieht sich auf {task.elements.map((item) => item.title).join(", ")}.</small> : null}
|
||||
</div>
|
||||
{task.status === "open" && task.rights?.edit !== false ? <button type="button" onClick={() => onComplete(task)}>Erledigen</button> : null}
|
||||
{task.rights?.edit !== false ? (
|
||||
<details className="row-menu">
|
||||
<summary>Bezüge</summary>
|
||||
<label>
|
||||
Hängt ab von
|
||||
<select value={dependsOn} onChange={addDependency}>
|
||||
<option value="">Aufgabe wählen</option>
|
||||
{others.map((item) => <option key={item.id} value={item.id}>{item.title}</option>)}
|
||||
</select>
|
||||
</label>
|
||||
<fieldset className="task-elements">
|
||||
<legend>Inhalte</legend>
|
||||
{elements.length ? elements.map((element) => (
|
||||
<label key={element.id}>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={elementIds.includes(element.id)}
|
||||
onChange={(event) => {
|
||||
const next = event.target.checked ? [...elementIds, element.id] : elementIds.filter((id) => id !== element.id);
|
||||
saveElements(next);
|
||||
}}
|
||||
/>
|
||||
{element.title}
|
||||
</label>
|
||||
)) : <span>In diesem Objekt liegt noch kein Inhalt.</span>}
|
||||
</fieldset>
|
||||
</details>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,15 +26,15 @@ export function NavIcon({ name }) {
|
||||
return <svg {...common}><circle cx="12" cy="12" r="8" /></svg>;
|
||||
}
|
||||
|
||||
import { ENSO_PATH } from "../enso-path.js";
|
||||
|
||||
export function Mark({ size = 36 }) {
|
||||
export function Mark({ size = 40 }) {
|
||||
return (
|
||||
<svg className="mark" width={size} height={size} viewBox="0 0 64 64" aria-hidden="true">
|
||||
<path fill="currentColor" d={ENSO_PATH} />
|
||||
<path fill="currentColor" opacity="0.72" d="M37.2 25.2h11.2v13.2h-1.8V27.4H38.6z" />
|
||||
<path fill="currentColor" d="M22.8 29.2h8.8l1.7 2.2h10.2V44H22.8z" />
|
||||
<path fill="currentColor" opacity="0.45" d="M26.2 34.2h6.4v1.3h-6.4zm0 2.8h4.5v1.3h-4.5z" />
|
||||
</svg>
|
||||
<img
|
||||
className="mark"
|
||||
src="/brand/logo-original.png"
|
||||
alt="Tsumugu"
|
||||
width={280}
|
||||
height={298}
|
||||
style={{ height: size, width: "auto" }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -95,6 +95,7 @@ export function StructureNavigator({
|
||||
chapters = [],
|
||||
chapterId = "",
|
||||
allCount = 0,
|
||||
allLabel = "Alle Inhalte",
|
||||
overview = null,
|
||||
chapterHeading,
|
||||
onChapter,
|
||||
@@ -116,6 +117,7 @@ export function StructureNavigator({
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="structure__tree">
|
||||
<label className="context-select">
|
||||
Aktenkontext
|
||||
<select
|
||||
@@ -130,44 +132,6 @@ export function StructureNavigator({
|
||||
</select>
|
||||
</label>
|
||||
<TreeNodes nodes={nodes} onNavigate={onNavigate} />
|
||||
<div className="structure__chapters">
|
||||
<h3>{chapterHeading}</h3>
|
||||
{overview ? (
|
||||
<button type="button" className={overview.active ? "chapter-link is-current" : "chapter-link"} onClick={overview.onSelect}>
|
||||
<span>Überblick</span>
|
||||
<span className="count">{overview.count}</span>
|
||||
</button>
|
||||
) : null}
|
||||
<button type="button" className={!chapterId && !overview?.active ? "chapter-link is-current" : "chapter-link"} onClick={() => onChapter("")}>
|
||||
<span>Alle Inhalte</span>
|
||||
<span className="count">{allCount}</span>
|
||||
</button>
|
||||
<ul className="chapter-links">
|
||||
{chapters.map((chapter, index) => (
|
||||
<li key={chapter.id}>
|
||||
<button
|
||||
type="button"
|
||||
className={chapterId === chapter.id ? "chapter-link is-current" : "chapter-link"}
|
||||
onClick={() => onChapter(chapter.id)}
|
||||
>
|
||||
<span>{chapter.title}</span>
|
||||
<span className="count">{chapter.count}</span>
|
||||
</button>
|
||||
{canReorder && chapterId === chapter.id ? (
|
||||
<span className="chapter-link__move">
|
||||
<button type="button" aria-label={`${chapter.title} nach oben`} disabled={index === 0} onClick={() => onMoveChapter(chapter.id, -1)}>Nach oben</button>
|
||||
<button type="button" aria-label={`${chapter.title} nach unten`} disabled={index === chapters.length - 1} onClick={() => onMoveChapter(chapter.id, 1)}>Nach unten</button>
|
||||
</span>
|
||||
) : null}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{canAddChapter ? (
|
||||
<button type="button" className="quiet chapter-add" onClick={onAddChapter}>
|
||||
<NavIcon name="plus" /> Kapitel
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
{links.length ? (
|
||||
<div className="structure__links">
|
||||
<h3>Weitere Zuordnungen</h3>
|
||||
@@ -186,6 +150,45 @@ export function StructureNavigator({
|
||||
</ul>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="structure__chapters">
|
||||
<h3>{chapterHeading}</h3>
|
||||
{overview ? (
|
||||
<button type="button" className={overview.active ? "chapter-link is-current" : "chapter-link"} onClick={overview.onSelect}>
|
||||
<span>Überblick</span>
|
||||
<span className="count">{overview.count}</span>
|
||||
</button>
|
||||
) : null}
|
||||
<button type="button" className={!chapterId && !overview?.active ? "chapter-link is-current" : "chapter-link"} onClick={() => onChapter("")}>
|
||||
<span>{allLabel}</span>
|
||||
<span className="count">{allCount}</span>
|
||||
</button>
|
||||
<ul className="chapter-links">
|
||||
{chapters.map((chapter, index) => (
|
||||
<li key={chapter.id}>
|
||||
<button
|
||||
type="button"
|
||||
className={chapterId === chapter.id ? "chapter-link is-current" : "chapter-link"}
|
||||
onClick={() => onChapter(chapter.id)}
|
||||
>
|
||||
<span>{chapter.title}</span>
|
||||
<span className="count">{chapter.count}</span>
|
||||
</button>
|
||||
{canReorder ? (
|
||||
<span className="chapter-link__move">
|
||||
<button type="button" aria-label={`${chapter.title} nach oben`} disabled={index === 0} onClick={() => onMoveChapter(chapter.id, -1)}>↑</button>
|
||||
<button type="button" aria-label={`${chapter.title} nach unten`} disabled={index === chapters.length - 1} onClick={() => onMoveChapter(chapter.id, 1)}>↓</button>
|
||||
</span>
|
||||
) : null}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
{canAddChapter ? (
|
||||
<button type="button" className="quiet chapter-add" onClick={onAddChapter}>
|
||||
<NavIcon name="plus" /> Kapitel
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -461,12 +461,13 @@ label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(-
|
||||
.content-section.is-chapter-target { box-shadow: inset 0 3px 0 var(--accent); }
|
||||
.content-section.is-chapter-after { box-shadow: inset 0 -3px 0 var(--accent); }
|
||||
.folder-tree, .folder-tree ul { list-style: none; margin: 0; padding: 0; }
|
||||
.folder-tree ul { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border); }
|
||||
.folder-row { display: flex; align-items: center; gap: 2px; min-height: 32px; border-radius: 6px; }
|
||||
.folder-tree ul { margin-left: 11px; padding-left: 8px; border-left: 1px solid var(--border); }
|
||||
.folder-row { display: flex; align-items: center; gap: 0; min-height: 28px; border-radius: 4px; }
|
||||
.folder-row.is-current { background: var(--accent-light); }
|
||||
.folder-twist, .folder-name { background: transparent; border: 0; color: inherit; min-height: 32px; padding: 0; }
|
||||
.folder-twist { width: 28px; }
|
||||
.folder-name { flex: 1; text-align: left; padding: 4px 8px; font: inherit; font-weight: 600; cursor: pointer; }
|
||||
.folder-twist, .folder-name { background: transparent; border: 0; color: inherit; min-height: 28px; padding: 0; }
|
||||
.folder-twist { width: 22px; flex: none; }
|
||||
.folder-name { flex: 1; display: flex; align-items: center; gap: 6px; text-align: left; padding: 2px 6px; font: inherit; font-weight: 500; cursor: pointer; min-width: 0; }
|
||||
.folder-name svg { width: 16px; height: 16px; flex: none; }
|
||||
.order-choice { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; max-width: 36rem; font-size: 14px; }
|
||||
.order-choice select { width: auto; min-width: 16rem; flex: 1; }
|
||||
.target-line { margin: 0; color: var(--text2); overflow-wrap: break-word; }
|
||||
@@ -600,9 +601,18 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
.menu-list button { width: 100%; justify-content: flex-start; }
|
||||
.placements { margin: 4px 0 0; overflow-wrap: anywhere; }
|
||||
.reader-preview { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); }
|
||||
.mailbox { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 16px; align-items: stretch; min-height: 420px; }
|
||||
.mailbox__folders { border-right: 1px solid var(--border); padding-right: 8px; max-height: 60vh; overflow: auto; }
|
||||
.mailbox { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 12px; align-items: stretch; min-height: 0; }
|
||||
.mailbox__folders { border-right: 1px solid var(--border); padding-right: 8px; overflow: auto; min-height: 0; }
|
||||
.mailbox__folders { display: block; }
|
||||
.modal.modal--split {
|
||||
height: min(86vh, 760px);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.modal.modal--split > .stack { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.modal.modal--split .mailbox { flex: 1; overflow: hidden; }
|
||||
.mailbox__messages { min-height: 0; overflow: auto; align-content: start; }
|
||||
.mailbox__group { min-height: 32px; display: flex; align-items: center; color: var(--text3); font-size: 13px; font-weight: 650; }
|
||||
.mailbox__messages { display: grid; gap: 10px; min-width: 0; }
|
||||
.mail-list { display: grid; }
|
||||
@@ -643,8 +653,8 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
.outline__body { display: none; }
|
||||
.outline.is-open .outline__body { display: block; }
|
||||
.outline__toggle { display: inline-flex; margin-bottom: 8px; }
|
||||
.mailbox { grid-template-columns: 1fr; min-height: 0; }
|
||||
.mailbox__folders { display: block; max-height: 240px; overflow: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 8px; }
|
||||
.mailbox { grid-template-columns: 1fr; grid-template-rows: minmax(140px, 34%) minmax(0, 1fr); min-height: 0; }
|
||||
.mailbox__folders { display: block; max-height: none; overflow: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 8px; }
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@@ -735,7 +745,13 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
}
|
||||
.rail__user-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.rail__logout { margin-left: auto; color: #d7efe4; background: transparent; }
|
||||
.mark { display: block; }
|
||||
.mark {
|
||||
display: block;
|
||||
flex: none;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
aspect-ratio: 280 / 298;
|
||||
}
|
||||
|
||||
.app-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; }
|
||||
.app-main:has(.workspace) {
|
||||
@@ -758,6 +774,7 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
.workspace.is-structure,
|
||||
.workspace.is-reader-focus { grid-template-columns: minmax(0, 1fr); }
|
||||
.workspace-nav, .workspace-main, .workspace-reader { min-width: 0; min-height: 0; overflow: auto; }
|
||||
.workspace-nav { display: flex; flex-direction: column; overflow: hidden; }
|
||||
.workspace-nav { background: #f7f6f1; border-right: 1px solid var(--border); }
|
||||
.workspace-nav.is-overlay {
|
||||
position: absolute;
|
||||
@@ -801,7 +818,10 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
.surface-tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--accent); }
|
||||
.structure { display: grid; align-content: start; gap: 14px; padding: 16px 14px 24px; }
|
||||
.structure { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 10px 12px; overflow: hidden; }
|
||||
.structure__tree, .structure__chapters { min-height: 0; overflow: auto; }
|
||||
.structure__tree { flex: 1 1 46%; }
|
||||
.structure__chapters { flex: 1 1 54%; border-top: 1px solid var(--border); padding-top: 8px; }
|
||||
.structure__bar, .structure h2 { display: flex; align-items: center; justify-content: space-between; margin: 0; font-size: 20px; }
|
||||
.structure h3 { margin: 8px 0 4px; font-size: 13px; color: var(--text2); font-weight: 700; }
|
||||
.context-select select { background: #fff; }
|
||||
@@ -809,21 +829,29 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
.nav-tree ul { margin: 0; padding: 0 0 0 14px; }
|
||||
.nav-tree__link, .chapter-link {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
min-height: 44px;
|
||||
padding: 8px 10px;
|
||||
min-height: 32px;
|
||||
padding: 4px 8px;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
text-align: left;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
.nav-tree__link > span { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
|
||||
.nav-tree__link.is-current, .chapter-link.is-current { background: var(--accent-light); color: var(--brand); }
|
||||
.nav-tree__kind { display: block; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text3); font-weight: 700; }
|
||||
.nav-tree__kind { font-size: 11px; color: var(--text3); font-weight: 700; flex: none; }
|
||||
.chapter-links { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--border); }
|
||||
.chapter-links li { display: flex; align-items: center; gap: 2px; }
|
||||
.chapter-links li .chapter-link { flex: 1; }
|
||||
.task-under { margin: 6px 0 0; padding-left: 14px; border-left: 1px solid var(--border); display: grid; gap: 8px; }
|
||||
.task-row, .task-assign { display: grid; gap: 4px; }
|
||||
.task-elements { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
|
||||
.task-elements label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
|
||||
.nav-tree__title, .chapter-link span:first-child, .preview-row__main strong, h1 { overflow-wrap: anywhere; }
|
||||
.chapter-link { justify-content: space-between; align-items: center; }
|
||||
.count {
|
||||
@@ -833,8 +861,8 @@ button.hierarchy__row { width: 100%; min-height: 34px; padding: 6px 8px; border:
|
||||
font-size: 13px;
|
||||
font-weight: 650;
|
||||
}
|
||||
.chapter-link__move { display: flex; gap: 6px; padding: 0 8px 8px; }
|
||||
.chapter-link__move button { min-height: 36px; padding: 4px 8px; font-size: 13px; }
|
||||
.chapter-link__move { display: flex; gap: 2px; flex: none; }
|
||||
.chapter-link__move button { min-height: 28px; min-width: 28px; padding: 0 6px; font-size: 14px; }
|
||||
.chapter-add { justify-content: flex-start; }
|
||||
.content-toolbar { align-items: center; margin-bottom: 12px; }
|
||||
.content-toolbar h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text1); }
|
||||
|
||||