Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

.nornir/widgets/facett-file.md

facett-file — design note

Status: builds (egui 0.33) + 3 tests green. In ordning/crates/widgets/facett-file; destined for facett.

What it is

A file-attachment surface: a drop zone (OS drag-and-drop) + an attachment list (icon, name, human size) with remove buttons. In the ärende profile an attachment is a handling — this widget is the upload/list UI; the legal metadata (direction, diarienummer, sekretess) lives on the case.

API

let mut files = Files::new();
files.set_files(vec![FileRef::new("ansökan.pdf", 240_000, "application/pdf"), …]);
files.ui(ui);                     // drop zone + list
for added in files.take_added() { /* host persists, then set_files(authoritative) */ }
for name in files.take_removed() { /* host deletes */ }

Design decisions

TODO on move