diff --git a/app/api/api_v2/playlists.rb b/app/api/api_v2/playlists.rb index 6199fe02..eb484a02 100644 --- a/app/api/api_v2/playlists.rb +++ b/app/api/api_v2/playlists.rb @@ -158,7 +158,9 @@ class ApiV2::Playlists < ApiV2::Base helpers do def page_of_playlists - Rails.cache.fetch("api/v2/playlists?#{params.to_query}") do + cache_key = "api/v2/playlists?#{params.to_query}" + cache_key += "/#{current_user.id}" if params[:filter] == "liked" && current_user + Rails.cache.fetch(cache_key) do playlists = Playlist.includes(:user) .then { |p| apply_filter(p) } .then { |p| apply_sort(p, :name, :asc) } diff --git a/app/api/api_v2/shows.rb b/app/api/api_v2/shows.rb index b68922c3..b2da4fae 100644 --- a/app/api/api_v2/shows.rb +++ b/app/api/api_v2/shows.rb @@ -144,7 +144,9 @@ class ApiV2::Shows < ApiV2::Base helpers do def page_of_shows - Rails.cache.fetch("api/v2/shows?#{params.to_query}") do + cache_key = "api/v2/shows?#{params.to_query}" + cache_key += "/#{current_user.id}" if params[:liked_by_user] && current_user + Rails.cache.fetch(cache_key) do shows = Show.published .includes( :venue, @@ -186,7 +188,9 @@ def fetch_liked_track_ids(show) end def show_by_date - Rails.cache.fetch("api/v2/shows/#{params[:date]}") do + cache_key = "api/v2/shows/#{params[:date]}" + cache_key += "/#{current_user.id}" if params[:liked_by_user] && current_user + Rails.cache.fetch(cache_key) do Show.published .includes( :venue, diff --git a/app/api/api_v2/tracks.rb b/app/api/api_v2/tracks.rb index b77968bb..cb4fd9f8 100644 --- a/app/api/api_v2/tracks.rb +++ b/app/api/api_v2/tracks.rb @@ -66,7 +66,7 @@ class ApiV2::Tracks < ApiV2::Base helpers do def page_of_tracks - Rails.cache.fetch("api/v2/tracks?#{params.to_query}") do + Rails.cache.fetch("api/v2/tracks?#{params.to_query}/#{current_user&.id}") do tracks = Track.includes( :mp3_audio_attachment, :png_waveform_attachment, @@ -98,7 +98,9 @@ def page_of_tracks end def track_by_id - Rails.cache.fetch("api/v2/tracks/#{params[:id]}") do + cache_key = "api/v2/tracks/#{params[:id]}" + cache_key += "/#{current_user.id}" if params[:liked_by_user] && current_user + Rails.cache.fetch(cache_key) do Track.includes( :show, :songs, diff --git a/app/javascript/stylesheets/content.css.scss b/app/javascript/stylesheets/content.css.scss index 93ae5395..8a271096 100644 --- a/app/javascript/stylesheets/content.css.scss +++ b/app/javascript/stylesheets/content.css.scss @@ -199,10 +199,9 @@ main { .date-link { font-size: 0.9rem; - position: relative; - top: -3px; - margin-right: 0.1rem; - display: inline-block; + margin-right: 0.5rem; + display: inline-flex; + align-items: center; width: 3.8rem; &:hover { @@ -270,6 +269,8 @@ main { min-width: 1rem; max-width: 60%; padding-right: 1rem; + display: flex; + align-items: center; .cover-art { background-color: transparent; diff --git a/app/javascript/stylesheets/map.css.scss b/app/javascript/stylesheets/map.css.scss index a6fc77cf..6ca8809f 100644 --- a/app/javascript/stylesheets/map.css.scss +++ b/app/javascript/stylesheets/map.css.scss @@ -15,9 +15,9 @@ font-family: 'Open Sans Condensed', sans-serif; font-size: 1.2rem; background-color: $text-gray; - margin-right: 0.5rem; - margin-bottom: 0.5rem; - border-radius: $radius; + margin-right: 0.3rem; + margin-bottom: 0.3rem; + border-radius: 3px; padding: 0.1rem 0.3rem; color: white; display: inline-block; @@ -26,13 +26,6 @@ &:hover { background-color: $control-gray; color: $text-gray; - - .date-link { - color: $text-gray; - } - } - .date-link { - color: white; } }