Setzt Issue #7 um und schliesst damit die Workspace-Map ab. Die files-bar zeigt nicht mehr zwei Platzhalter-Routen, sondern den rekursiv eingelesenen Inhalt des offenen Workspace. TreeNode ist ein verschachteltes Enum mit einer einzigen File-Variante fuer alle Dateitypen - wer wissen will, ob es eine Notiz ist, fragt path.extension(). Aufgebaut wird ueber std::fs::read_dir mit eigener Rekursion; walkdir liegt zwar im Graph, iteriert aber flach, woraus einen Baum zu bauen mehr Code waere. Eingesammelt wird alles ausser Namen mit fuehrendem Punkt - Dateien wie Ordner, womit .dionotes und .git ohne Ausnahmeliste wegfallen - und ausser Symlinks, deren Verfolgung einen Zyklusschutz erfordern wuerde. Leere Ordner werden angezeigt, sortiert wird Ordner-vor-Dateien und alphabetisch ohne Ruecksicht auf Gross-/Kleinschreibung. Der Aufklapp-Zustand liegt als HashSet<PathBuf> neben dem Baum, nicht darin: Es gibt keinen Filewatcher, der Nutzer liest bei Bedarf neu ein - steckte expanded im Knoten, klappte jeder Refresh saemtliche Ordner zu. Persistiert wird er nicht. Mit dem Baum entfaellt die Tab-Leiste im Editor und damit EDITOR_TABS, der letzte Rest des in #5 dokumentierten Pflegepunkts. strum wird dadurch nirgends mehr gebraucht und faellt samt strum_macros aus dem Graph. Ausserdem entfernt: der Dioxus-Vorlagentext Hero samt header.svg, der nach dem Oeffnen eines Workspace die rechte Haelfte mit ungestylten Werbelinks fuellte. Home ist jetzt ein Empty-State.
123 lines
3.0 KiB
CSS
123 lines
3.0 KiB
CSS
/* ==========================================================================
|
|
Layout — app shell and the two top-level screens. Structure only, no skin.
|
|
========================================================================== */
|
|
|
|
#main {
|
|
height: 100dvh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* --- Workspace selector ----------------------------------------------------
|
|
The pre-editor screen. One view, no tabs: the list of known workspaces
|
|
leads, adding one is the secondary action in the footer. Opening is the
|
|
everyday case; adding happens once per workspace.
|
|
-------------------------------------------------------------------------- */
|
|
|
|
.selector-shell {
|
|
flex: 1;
|
|
min-height: 0;
|
|
width: 100%;
|
|
max-width: 40rem;
|
|
margin: 0 auto;
|
|
padding: var(--dn-space-7) var(--dn-space-5);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--dn-space-5);
|
|
}
|
|
|
|
.selector-head {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: space-between;
|
|
gap: var(--dn-space-4);
|
|
}
|
|
|
|
.selector-title {
|
|
font-size: var(--dn-text-xl);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Nur die Liste scrollt — Kopf und Fuß bleiben stehen. */
|
|
.selector-list-wrap {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
overscroll-behavior: contain;
|
|
}
|
|
|
|
.selector-foot {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--dn-space-3);
|
|
padding-top: var(--dn-space-4);
|
|
border-top: 1px solid var(--dn-border);
|
|
}
|
|
|
|
/* --- Editor shell ----------------------------------------------------------
|
|
Fixed-width file rail + fluid editor. Both scroll independently.
|
|
-------------------------------------------------------------------------- */
|
|
|
|
.layout-container {
|
|
flex: 1;
|
|
min-height: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
}
|
|
|
|
.files-bar {
|
|
flex: 0 0 var(--dn-sidebar-width);
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1px;
|
|
padding: var(--dn-space-2);
|
|
background: var(--dn-bg-sunken);
|
|
border-right: 1px solid var(--dn-border);
|
|
overflow-y: auto;
|
|
overscroll-behavior: contain;
|
|
}
|
|
|
|
/* Kopfzeile der Datei-Leiste: Beschriftung und Neu-einlesen. Bleibt stehen,
|
|
während der Baum darunter scrollt. */
|
|
.files-bar-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--dn-space-2);
|
|
padding: var(--dn-space-1) var(--dn-space-1) var(--dn-space-1) var(--dn-space-2);
|
|
}
|
|
|
|
.files-bar-empty {
|
|
padding: var(--dn-space-3) var(--dn-space-2);
|
|
color: var(--dn-fg-faint);
|
|
font-size: var(--dn-text-xs);
|
|
}
|
|
|
|
.editor-container {
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: auto;
|
|
}
|
|
|
|
.editor-class {
|
|
height: 100%;
|
|
cursor: text;
|
|
}
|
|
|
|
/* Below tablet the rail collapses to a strip across the shell's full width. */
|
|
@media (max-width: 640px) {
|
|
.layout-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.files-bar {
|
|
flex: 0 0 auto;
|
|
max-height: 40dvh;
|
|
border-right: 0;
|
|
border-bottom: 1px solid var(--dn-border);
|
|
}
|
|
}
|