forked from avvazana/Spoofify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update state slices, add playlist show,and differentiate between /bro…
…wse and /collection
- Loading branch information
Showing
36 changed files
with
1,021 additions
and
74 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.playlist-show-item { | ||
display: flex; | ||
flex-direction: column; | ||
padding-left: 50px; | ||
padding-top: 30px; | ||
} | ||
|
||
.playlist-show-item-image { | ||
min-width: 180px; | ||
min-height: 180px; | ||
max-height: 260px; | ||
max-width: 260px; | ||
} | ||
.playlist-show-subtext { | ||
padding-top: 10px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
.playlist-show-subtext p { | ||
color: white; | ||
padding-bottom: 5px; | ||
font-size: 14px; | ||
font-family: Circular,Helvetica,Arial,sans-serif; | ||
} | ||
.playlist-show-subtext span { | ||
color: lightgray; | ||
font-weight: 100; | ||
font-size: 14px; | ||
font-family: Circular,Helvetica,Arial,sans-serif; | ||
} | ||
|
||
.loading { | ||
width: 60px; | ||
margin: auto; | ||
margin-top: 160px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,22 @@ | ||
json.array! @playlists do |playlist| | ||
json.extract! playlist, :id, :title | ||
json.photoUrl url_for(playlist.photo) | ||
json.trackUrl url_for(playlist.track) | ||
@playlists.each do |playlist| | ||
json.set! playlist.id do | ||
json.extract! playlist, :id, :title, :author_id | ||
json.author playlist.author.username | ||
|
||
json.song_ids playlist.songs.pluck(:id) | ||
|
||
if playlist.songs[0] | ||
json.photoUrl url_for(playlist.songs[0].album.photo); | ||
else | ||
json.photoUrl image_path("face.jpg") | ||
end | ||
end | ||
end | ||
|
||
# json.photoUrl url_for(playlist.photo) | ||
# json.trackUrl url_for(playlist.track) | ||
|
||
|
||
# json.songs playlist.songs.each do |song| | ||
# json.set! song.id | ||
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
json.songs do | ||
@playlist.songs.each do |song| | ||
json.set! song.id do | ||
json.extract! song, :id, :title | ||
json.trackUrl url_for(song.track) | ||
end | ||
end | ||
end | ||
|
||
json.playlist do | ||
json.extract! @playlist, :id, :title, :song_ids, :author_id | ||
if @playlist.songs[0] | ||
json.photoUrl url_for(@playlist.songs[0].album.photo); | ||
else | ||
json.photoUrl image_path("face.jpg") | ||
end | ||
json.author @playlist.author.username | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
json.array! @songs do |song| | ||
json.extract! song, :id, :title, :album_id | ||
json.trackUrl url_for(song.track) | ||
@songs.each do |song| | ||
json.set! song.id do | ||
json.extract! song, :id, :title | ||
json.trackUrl url_for(song.track) | ||
end | ||
end | ||
|
||
# json.array! @songs do |song| | ||
# json.extract! song, :id, :title, :album_id | ||
# json.trackUrl url_for(song.track) | ||
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class ChangeSongs < ActiveRecord::Migration[5.2] | ||
def change | ||
remove_index :songs, :album_id | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.