Skip to content

Commit

Permalink
only show the wanted artist or albumartist tab
Browse files Browse the repository at this point in the history
  • Loading branch information
alicebob committed Mar 13, 2018
1 parent 7b63351 commit 85c1fb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docroot/s/siren.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body {
nav {
background-color: #3F51B5;
display: grid;
grid-template-columns: max-content 1fr repeat(4, max-content) 1fr max-content;
grid-template-columns: max-content 1fr repeat(3, max-content) 1fr max-content;
grid-gap: 50px;
padding: 0 50px;
box-shadow: 0 3px 3px 0 #ccc;
Expand Down
12 changes: 7 additions & 5 deletions elm/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ viewHeader model =
count =
" (" ++ (toString <| List.length model.playlist) ++ ")"

tab what t =
tab what t title =
Html.a
[ Events.onClick <| Show what
, Attr.class <|
Expand All @@ -501,6 +501,7 @@ viewHeader model =
else
"inactive"
)
, Attr.title title
]
[ text t ]

Expand Down Expand Up @@ -531,10 +532,11 @@ viewHeader model =
]
[ text "Siren!" ]
, Html.span [] []
, tab Playlist <| "Playlist" ++ count
, tab FileBrowser "Files"
, tab (ArtistBrowser Artist) "Artists"
, tab (ArtistBrowser Albumartist) "Albumartists"
, tab Playlist ("Playlist" ++ count) "Show playlist"
, tab FileBrowser "Files" "Browse the filesystem"
, case artistMode model.config of
Artist -> tab (ArtistBrowser Artist) "Artists" "Browse artists"
Albumartist -> tab (ArtistBrowser Albumartist) "Artists" "Browse AlbumArtists"
, Html.span [] []
, Html.a
[ Attr.class <| "status " ++ cssClass
Expand Down

0 comments on commit 85c1fb8

Please sign in to comment.