Merge branch 'worktree-agent-aff0079eda57116a0' into claude/practical-noether-1hb2s1
This commit is contained in:
41 files changed
+886
-551
No files matched your search
@@ -67,7 +67,8 @@ export const CATEGORY_ADD_KEY: Record<DrawingLevelKind, string> = {
|
||||
export function DrawingLevelsPanel() {
|
||||
const host = usePanelHost();
|
||||
const { activeLevelId, displayMode } = host;
|
||||
const project = useStore((s) => s.project);
|
||||
// Nur die Zeichnungsebenen abonnieren ([121]).
|
||||
const drawingLevels = useStore((s) => s.project.drawingLevels);
|
||||
|
||||
// Auf-/Zu-Zustand je Kategorie, lokal — Default: alle aufgeklappt.
|
||||
const [collapsed, setCollapsed] = useState<Record<DrawingLevelKind, boolean>>(
|
||||
@@ -86,7 +87,7 @@ export function DrawingLevelsPanel() {
|
||||
|
||||
// Oberstes Geschoss zuoberst (wie DOSSIER): Anzeige umkehren.
|
||||
// Blatt-Ebenen (Layout-Zeichnung) gehören zum Blatt, nicht in den Navigator.
|
||||
const levelsTopDown = project.drawingLevels.filter((z) => !z.layoutId).reverse();
|
||||
const levelsTopDown = drawingLevels.filter((z) => !z.layoutId).reverse();
|
||||
|
||||
// Klick aufs Auge in „Alle anzeigen"/„Nur aktive" schaltet automatisch auf
|
||||
// „Ausgewählte" (DOSSIER-Regel), damit das Sichtbarkeits-Flag sofort greift.
|
||||
|
||||
@@ -35,7 +35,8 @@ import { t } from "../i18n";
|
||||
export function LayersPanel() {
|
||||
const host = usePanelHost();
|
||||
const { displayMode } = host;
|
||||
const project = useStore((s) => s.project);
|
||||
// Nur den Ebenen-Baum abonnieren ([121]).
|
||||
const layers = useStore((s) => s.project.layers);
|
||||
|
||||
// Klick aufs Auge in „Alle anzeigen"/„Nur aktive" schaltet automatisch auf
|
||||
// „Ausgewählte" (DOSSIER-Regel), damit das Sichtbarkeits-Flag sofort greift.
|
||||
@@ -61,7 +62,7 @@ export function LayersPanel() {
|
||||
<DisplayModeSelect value={displayMode.mode} onChange={displayMode.setMode} />
|
||||
</div>
|
||||
<div className="nav-list">
|
||||
{project.layers.map((cat) => (
|
||||
{layers.map((cat) => (
|
||||
<CategoryRow
|
||||
key={cat.code}
|
||||
category={cat}
|
||||
|
||||
@@ -356,10 +356,10 @@ function MasterRow({
|
||||
|
||||
export function LayoutsPanel() {
|
||||
const host = usePanelHost();
|
||||
const project = useStore((s) => s.project);
|
||||
const layouts = project.layouts ?? [];
|
||||
const masters = project.masterLayouts ?? [];
|
||||
const folders = project.layoutFolders ?? [];
|
||||
// Schmale Abos ([121]): Layouts, Master, Ordner.
|
||||
const layouts = useStore((s) => s.project.layouts) ?? [];
|
||||
const masters = useStore((s) => s.project.masterLayouts) ?? [];
|
||||
const folders = useStore((s) => s.project.layoutFolders) ?? [];
|
||||
// Getrennte Bäume je `kind` — Layout- und Master-Ordner werden NIE vermischt.
|
||||
const layoutFolders = folders.filter((f) => f.kind !== "master");
|
||||
const masterFolders = folders.filter((f) => f.kind === "master");
|
||||
|
||||
@@ -16,9 +16,11 @@ const PRESETS: { key: "sun.equinox" | "sun.summer" | "sun.winter"; md: string }[
|
||||
];
|
||||
|
||||
export function SunStudySection() {
|
||||
const project = useStore((s) => s.project);
|
||||
// Schmale Abos ([121]): Sonnenstudie und Standort-Bezug.
|
||||
const sunStudy = useStore((s) => s.project.sunStudy);
|
||||
const geoAnchor = useStore((s) => s.project.geoAnchor);
|
||||
const applyChange = useStore((s) => s.applyChange);
|
||||
const study: SunStudy = project.sunStudy ?? { when: defaultStudyIso(), show: false };
|
||||
const study: SunStudy = sunStudy ?? { when: defaultStudyIso(), show: false };
|
||||
const local = isoToLocal(study.when) ?? isoToLocal(defaultStudyIso())!;
|
||||
|
||||
const write = (next: SunStudy, key?: string) => applyChange([setField("sunStudy", next)], key);
|
||||
@@ -27,7 +29,7 @@ export function SunStudySection() {
|
||||
if (iso) write({ ...study, when: iso }, key);
|
||||
};
|
||||
|
||||
const { lat, lon } = projectLatLon(project);
|
||||
const { lat, lon } = projectLatLon({ geoAnchor });
|
||||
const sun = sunPosition(lat, lon, new Date(study.when));
|
||||
const year = local.date.slice(0, 4);
|
||||
|
||||
@@ -90,7 +92,7 @@ export function SunStudySection() {
|
||||
{sun.elevation > 0
|
||||
? t("sun.position", { az: sun.azimuth.toFixed(0), el: sun.elevation.toFixed(1) })
|
||||
: t("sun.belowHorizon")}
|
||||
{!project.geoAnchor && <span title={t("sun.noAnchor.hint")}> · {t("sun.noAnchor")}</span>}
|
||||
{!geoAnchor && <span title={t("sun.noAnchor.hint")}> · {t("sun.noAnchor")}</span>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -149,9 +149,11 @@ interface Renaming {
|
||||
|
||||
export function ViewSnapshotsPanel() {
|
||||
const host = usePanelHost();
|
||||
const project = useStore((s) => s.project);
|
||||
const snaps = project.viewSnapshots ?? [];
|
||||
const folders = project.viewSnapshotFolders ?? [];
|
||||
// Schmale Abos ([121]): Ausschnitte, Ordner, Override-Regeln, Ansichtsvorlagen.
|
||||
const snaps = useStore((s) => s.project.viewSnapshots) ?? [];
|
||||
const folders = useStore((s) => s.project.viewSnapshotFolders) ?? [];
|
||||
const overrideRules = useStore((s) => s.project.overrideRules);
|
||||
const viewTemplates = useStore((s) => s.project.viewTemplates);
|
||||
|
||||
const tree = useMemo(
|
||||
() => buildViewSnapshotTree(folders, snaps),
|
||||
@@ -204,11 +206,11 @@ export function ViewSnapshotsPanel() {
|
||||
selectedSnap.drawingVisibility,
|
||||
);
|
||||
const ids = new Set(selectedSnap.enabledOverrideRuleIds ?? []);
|
||||
const overrideNames = (project.overrideRules ?? [])
|
||||
const overrideNames = (overrideRules ?? [])
|
||||
.filter((r) => ids.has(r.id))
|
||||
.map((r) => r.name);
|
||||
return { layerCombo, drawingCombo, overrideNames };
|
||||
}, [selectedSnap, host, project.overrideRules]);
|
||||
}, [selectedSnap, host, overrideRules]);
|
||||
|
||||
// ── Auf-/Zuklappen ────────────────────────────────────────────────────────
|
||||
const isExpanded = (id: string) => !collapsed.has(id);
|
||||
@@ -675,7 +677,7 @@ export function ViewSnapshotsPanel() {
|
||||
}}
|
||||
>
|
||||
<option value="">{t("viewsnap.footer.none")}</option>
|
||||
{(project.viewTemplates ?? []).map((tpl) => (
|
||||
{(viewTemplates ?? []).map((tpl) => (
|
||||
<option key={tpl.id} value={tpl.id}>
|
||||
{tpl.name}
|
||||
</option>
|
||||
|
||||
Reference in new issue
Block a user