This commit is contained in:
Eduard Urbach 2017-07-05 21:23:59 +02:00
parent ca1c5838bf
commit 50c0e543d5
3 changed files with 23 additions and 3 deletions

View File

@ -25,7 +25,7 @@ component AnimeListItem(viewUser *arn.User, item *arn.AnimeListItem, anime *arn.
InputTextArea("Notes", item.Notes, "Notes", "Your notes") InputTextArea("Notes", item.Notes, "Notes", "Your notes")
.buttons.mountable .buttons.mountable
a.ajax.button(href="/+" + viewUser.Nick + "/animelist") a.ajax.button(href="/+" + viewUser.Nick + "/animelist/watching")
Icon("list") Icon("list")
span View collection span View collection
a.ajax.button(href=anime.Link()) a.ajax.button(href=anime.Link())

View File

@ -257,7 +257,7 @@ export function removeAnimeFromCollection(arn: AnimeNotifier, button: HTMLElemen
throw body throw body
} }
return arn.app.load("/+" + userNick + "/animelist") return arn.app.load("/+" + userNick + "/animelist/watching")
}) })
.catch(console.error) .catch(console.error)
.then(() => arn.loading(false)) .then(() => arn.loading(false))

View File

@ -30,10 +30,30 @@ var routeTests = map[string][]string{
"/+Akyoto/animelist", "/+Akyoto/animelist",
}, },
"/user/:nick/animelist/:id": []string{ "/user/:nick/animelist/anime/:id": []string{
"/+Akyoto/animelist/7929", "/+Akyoto/animelist/7929",
}, },
"/user/:nick/animelist/watching": []string{
"/+Akyoto/animelist/watching",
},
"/user/:nick/animelist/completed": []string{
"/+Akyoto/animelist/completed",
},
"/user/:nick/animelist/planned": []string{
"/+Akyoto/animelist/planned",
},
"/user/:nick/animelist/hold": []string{
"/+Akyoto/animelist/hold",
},
"/user/:nick/animelist/dropped": []string{
"/+Akyoto/animelist/dropped",
},
// Pages // Pages
"/anime/:id": []string{ "/anime/:id": []string{
"/anime/1", "/anime/1",