Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage revamp #520

Merged
merged 32 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
baca090
Add cover image to all tracks, if enabled
Aug 28, 2024
795da0a
fix
Aug 28, 2024
179fcbe
Merge branch 'jpochyla:master' into Improve-views
SO9010 Sep 3, 2024
8f9d6be
Homepage and artist init
Sep 5, 2024
9d04db2
Merge branch 'Improve-views' of https://github.com/SO9010/psst into I…
Sep 5, 2024
a17c6b8
VERY ROUGH start, currently only processing made for you in the custo…
Sep 11, 2024
a075bfb
Update to be more dynamic
Sep 12, 2024
47be312
Rearrange & Lint
Sep 12, 2024
e69a39c
Update hompage
Sep 12, 2024
3725ecf
Fix
Sep 12, 2024
8db4b7a
Sanitize html in descriptions, truncate to 65 chars, make playlist & …
jacksongoode Sep 12, 2024
09d8681
Grab the homepage things
Sep 13, 2024
d628e8d
Grab shows and show them, next to get is artist, album, new_episodes …
Sep 14, 2024
933b2b0
Start adding jump back in
Sep 14, 2024
01712ee
Implement the jump back in section, then I NEED to clean up the code!
Sep 14, 2024
ffcfd19
Neaten code for show and playlist, the rest will come soon!
Sep 16, 2024
c412161
Finish condensing views code, get the user data from a simple api call
Sep 17, 2024
d2e7241
Remove comments
Sep 17, 2024
d6db64d
Code neatness
Sep 17, 2024
41ef4bc
Make album widget small for library
Sep 18, 2024
ef49f93
Rearage Loaded resulst widget to make it look nicer!
Sep 19, 2024
6890856
Neaten code, match widgets with original ones!
Sep 21, 2024
8244562
Lint and remove hack to build on my machine
Sep 21, 2024
9149122
Cache user info
Sep 23, 2024
199c04e
Revert to spotube hash
Sep 23, 2024
34652d1
Unify widgets
Sep 23, 2024
08983dd
revert linebreak mode
Sep 23, 2024
cc3eacb
Home icon
Sep 23, 2024
409d432
Filled home with fixed sizing
jacksongoode Sep 23, 2024
15c888e
Filled house icon, vertical space in title separators, trim more char…
jacksongoode Sep 23, 2024
63fb9e0
Update name
jacksongoode Sep 23, 2024
7d5c5c7
Lift size by one to encounter scroll bar hight
Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ cache
.env
*.iml
rust-toolchain
*.ico
*.ico
192 changes: 192 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion psst-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ souvlaki = { version = "0.7.3", default-features = false, features = [
"use_zbus",
] }
webbrowser = { version = "1.0.1" }
sanitize_html = "0.8.1"
[target.'cfg(windows)'.build-dependencies]
winres = { version = "0.1.12" }
image = { version = "0.25.2" }
Expand All @@ -68,4 +69,4 @@ category = "Music"
short_description = "Fast Spotify client with native GUI"
long_description = """
Small and efficient graphical music player for Spotify network.
"""
"""
41 changes: 34 additions & 7 deletions psst-gui/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub use crate::data::{
show::{Episode, EpisodeId, EpisodeLink, Show, ShowDetail, ShowEpisodes, ShowLink},
slider_scroll_scale::SliderScrollScale,
track::{AudioAnalysis, Track, TrackId},
user::UserProfile,
user::{UserProfile, PublicUser},
utils::{Cached, Float64, Image, Page},
};

Expand All @@ -79,7 +79,7 @@ pub struct AppState {
pub show_detail: ShowDetail,
pub library: Arc<Library>,
pub common_ctx: Arc<CommonCtx>,
pub personalized: Personalized,
pub home_detail: HomeDetail,
pub alerts: Vector<Alert>,
pub finder: Finder,
pub added_queue: Vector<QueueEntry>,
Expand Down Expand Up @@ -131,6 +131,18 @@ impl AppState {
knobs: Default::default(),
results: Promise::Empty,
},
home_detail: HomeDetail {
made_for_you: Promise::Empty,
user_top_mixes: Promise::Empty,
best_of_artists: Promise::Empty,
recommended_stations: Promise::Empty,
your_shows: Promise::Empty,
shows_that_you_might_like: Promise::Empty,
uniquely_yours: Promise::Empty,
jump_back_in: Promise::Empty,
user_top_tracks: Promise::Empty,
user_top_artists: Promise::Empty,
},
album_detail: AlbumDetail {
album: Promise::Empty,
},
Expand All @@ -150,9 +162,6 @@ impl AppState {
},
library,
common_ctx,
personalized: Personalized {
made_for_you: Promise::Empty,
},
alerts: Vector::new(),
finder: Finder::new(),
}
Expand Down Expand Up @@ -512,8 +521,26 @@ impl CommonCtx {
pub type WithCtx<T> = Ctx<Arc<CommonCtx>, T>;

#[derive(Clone, Data, Lens)]
pub struct Personalized {
pub made_for_you: Promise<Vector<Playlist>>,
pub struct HomeDetail {
pub made_for_you: Promise<MixedView>,
pub user_top_mixes: Promise<MixedView>,
pub best_of_artists: Promise<MixedView>,
pub recommended_stations: Promise<MixedView>,
pub uniquely_yours: Promise<MixedView>,
pub your_shows: Promise<MixedView>,
pub shows_that_you_might_like: Promise<MixedView>,
pub jump_back_in: Promise<MixedView>,
pub user_top_tracks: Promise<Vector<Arc<Track>>>,
pub user_top_artists: Promise<Vector<Artist>>,
}

#[derive(Clone, Data, Lens)]
pub struct MixedView {
pub title: Arc<str>,
pub playlists: Vector<Playlist>,
pub artists: Vector<Artist>,
pub albums: Vector<Arc<Album>>,
pub shows: Vector<Arc<Show>>,
}

static ALERT_ID: AtomicUsize = AtomicUsize::new(0);
Expand Down
Loading