ux polish: dismissable welcome + clearer locate error
- ui/file_list.rs: added a small Dismiss link at the bottom of the
first-launch welcome (calls existing state.dismiss_first_launch_hint
which already persists the pref). Previously only disappeared after a
successful import or via the Settings "Show welcome" toggle.
- state/library.rs: locate_sample failure copy from "Locate failed: {e}"
to "Could not locate sample on disk — {e}".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 files changed,
+9 insertions,
-1 deletion
| 97 |
97 |
|
self.refresh_contents();
|
| 98 |
98 |
|
}
|
| 99 |
99 |
|
Err(e) => {
|
| 100 |
|
- |
self.status = format!("Locate failed: {e}");
|
|
100 |
+ |
self.status = format!("Could not locate sample on disk \u{2014} {e}");
|
| 101 |
101 |
|
}
|
| 102 |
102 |
|
}
|
| 103 |
103 |
|
}
|
| 93 |
93 |
|
.small()
|
| 94 |
94 |
|
.color(theme::text_muted()),
|
| 95 |
95 |
|
);
|
|
96 |
+ |
ui.add_space(theme::space::SM);
|
|
97 |
+ |
if ui
|
|
98 |
+ |
.link(egui::RichText::new("Dismiss").small().color(theme::text_muted()))
|
|
99 |
+ |
.on_hover_text("Hide this welcome. Re-enable from Settings.")
|
|
100 |
+ |
.clicked()
|
|
101 |
+ |
{
|
|
102 |
+ |
state.dismiss_first_launch_hint();
|
|
103 |
+ |
}
|
| 96 |
104 |
|
});
|
| 97 |
105 |
|
} else {
|
| 98 |
106 |
|
let clicked = widgets::empty_state(
|