Give the keyword sheet's field focus, and the empty trash its own words

Without focus the keys typed into the keywords sheet went to the grid
behind the scrim, and the Return meant for the keyword opened a
photograph. The naming sheet already takes focus on open; do the same.

An empty trash said "No images found — check the library folder and which
formats are ticked", which sends someone off to fix a library that is
fine.
This commit is contained in:
2026-09-20 00:21:14 +02:00
parent 86410def88
commit 14ac41bee0
+13 -2
View File
@@ -2581,13 +2581,19 @@ export component LibraryGrid inherits Rectangle {
// Now it is a worker, so it needs a sentence: a grid saying // Now it is a worker, so it needs a sentence: a grid saying
// "Scanning…" while nothing is on the network is the same kind of // "Scanning…" while nothing is on the network is the same kind of
// lie the two answers below were separated to avoid. // lie the two answers below were separated to avoid.
// An empty trash is the ordinary state of a trash, and telling
// someone who opened it to check their folder and formats sends
// them off to fix a library that is fine.
if root.total == 0: EmptyState { if root.total == 0: EmptyState {
headline: root.opening headline: root.opening
? "Opening the library…" ? "Opening the library…"
: (root.scanning ? "Scanning…" : "No images found"); : (root.scanning ? "Scanning…"
: (root.viewing-trash ? "The trash is empty" : "No images found"));
detail: (root.opening || root.scanning) detail: (root.opening || root.scanning)
? root.scan-status ? root.scan-status
: "Check the library folder and which formats are ticked."; : (root.viewing-trash
? "Photographs you delete wait here until the trash is emptied."
: "Check the library folder and which formats are ticked.");
} }
// --- keyboard judgement (FR-CULL-4) ------------------------------- // --- keyboard judgement (FR-CULL-4) -------------------------------
@@ -3897,6 +3903,11 @@ export component LibraryGrid inherits Rectangle {
// typed straight after — keywording a shoot is a run of them. // typed straight after — keywording a shoot is a run of them.
new-keyword := Field { new-keyword := Field {
placeholder: "Type a keyword and press return"; placeholder: "Type a keyword and press return";
// As the naming sheet below does, and for the same
// reason: the field is the only thing to do here. Without
// it the keys went to the grid behind the scrim, and the
// Return meant for the keyword opened a photograph.
init => { self.take-focus(); }
accepted(text) => { accepted(text) => {
root.assign-keyword(text); root.assign-keyword(text);
self.text = ""; self.text = "";