Fixed dashboard

This commit is contained in:
Eduard Urbach 2017-10-15 20:26:50 +02:00
parent d1c26252ac
commit e635be5291
2 changed files with 7 additions and 2 deletions

View File

@ -60,7 +60,9 @@ func Get(ctx *aero.Context) string {
} }
}, func() { }, func() {
var err error var err error
soundTracks, err = arn.AllSoundTracks() soundTracks, err = arn.FilterSoundTracks(func(track *arn.SoundTrack) bool {
return !track.IsDraft && len(track.Media) > 0
})
if err != nil { if err != nil {
return return

View File

@ -46,7 +46,10 @@ component Dashboard(schedule []*arn.UpcomingEpisode, posts []arn.Postable, sound
a.widget-ui-element.ajax(href=soundTracks[i].Link()) a.widget-ui-element.ajax(href=soundTracks[i].Link())
.widget-ui-element-text .widget-ui-element-text
Icon("music") Icon("music")
span(title=soundTracks[i].Title)= soundTracks[i].MainAnime().Title.Canonical if soundTracks[i].Title == ""
span untitled
else
span= soundTracks[i].Title
else else
.widget-ui-element .widget-ui-element
.widget-ui-element-text .widget-ui-element-text