feat(slint): browser-like back/forward navigation history
Add a navigation history so pages can be walked back and forward. - nav.rs: a back/forward stack of NavEntry (home, album, artist, settings); record() on fresh navigation, go_back/go_forward to walk it - NavButtons: a [<] [>] pair styled like the Discover tab group; inline beside the Discover tabs and in place of the per-page Back button on album, artist and settings views - All navigation routes through Rust (open-album/-artist record entries; the gear and header menu use NavState.request-settings) so the history stays accurate; back/forward re-apply entries, re-loading entity pages - AppShell listens for the mouse back/forward buttons - can-back / can-forward drive the buttons' enabled state Also in this round: - Album header description: render a pre-truncated short string so it wraps to a couple of lines instead of overflowing the header; the full text stays in the Read-more modal - Header queue button uses an ordered-list icon (the previous one read as a playlist) cc
This commit is contained in:
12 files changed
+461
-154
No files matched your search
@@ -64,6 +64,8 @@ export global AlbumState {
|
||||
in property <string> quality-detail;
|
||||
// Editorial description / review (HTML stripped). May be empty.
|
||||
in property <string> description;
|
||||
// Truncated description for the header; full text lives in the modal.
|
||||
in property <string> description-short;
|
||||
in property <image> artwork;
|
||||
// Artwork-derived tint for the header gradient.
|
||||
in property <color> header-color: #181820;
|
||||
@@ -117,6 +119,13 @@ export global SettingsState {
|
||||
|
||||
export global NavState {
|
||||
in-out property <ContentView> view: ContentView.home;
|
||||
// Browser-like history flags, driven by the Rust nav module.
|
||||
in property <bool> can-back: false;
|
||||
in property <bool> can-forward: false;
|
||||
// Navigation requests routed to Rust so history is recorded.
|
||||
callback request-back();
|
||||
callback request-forward();
|
||||
callback request-settings();
|
||||
}
|
||||
|
||||
// Artist detail screen state.
|
||||
|
||||
Reference in new issue
Block a user