Minor updates

This commit is contained in:
Eduard Urbach 2017-10-09 16:23:18 +02:00
parent 6e4897f435
commit 6d8700e166
4 changed files with 8 additions and 4 deletions

View File

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

View File

@ -23,7 +23,7 @@ func Edit(ctx *aero.Context) string {
ctx.Data = &arn.OpenGraph{
Tags: map[string]string{
"og:title": track.Media[0].Title,
"og:title": track.Title,
"og:image": track.MainAnime().Image.Large,
"og:url": "https://" + ctx.App.Config.Domain + track.Link(),
"og:site_name": "notify.moe",
@ -63,6 +63,10 @@ func EditForm(obj interface{}, title string) string {
b.WriteString(components.InputText(field.Name, fieldValue.String(), field.Name, ""))
case "[]string":
b.WriteString(components.InputTags(field.Name, fieldValue.Interface().([]string), field.Name))
case "[]*arn.ExternalMedia":
for sliceIndex := 0; sliceIndex < fieldValue.Len(); sliceIndex++ {
b.WriteString(EditForm(fieldValue.Index(sliceIndex).Interface(), "External Media"))
}
default:
panic("No edit form implementation for " + field.Name + " with type " + field.Type.String())
}

View File

@ -19,7 +19,7 @@ func Get(ctx *aero.Context) string {
ctx.Data = &arn.OpenGraph{
Tags: map[string]string{
"og:title": track.Media[0].Title,
"og:title": track.Title,
"og:image": track.MainAnime().Image.Large,
"og:url": "https://" + ctx.App.Config.Domain + track.Link(),
"og:site_name": "notify.moe",

View File

@ -1,6 +1,6 @@
// pack:ignore
const CACHE = "v-1"
const CACHE = "v-2"
const RELOADS = new Map<string, Promise<Response>>()
const ETAGS = new Map<string, string>()
const CACHEREFRESH = new Map<string, Promise<void>>()