Improved importer
This commit is contained in:
parent
1f445feee4
commit
9fa9ccbe89
5
mixins/ImportButton.pixy
Normal file
5
mixins/ImportButton.pixy
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
component ImportButton(url string)
|
||||||
|
.buttons.import-buttons
|
||||||
|
a.button.mountable(href=url)
|
||||||
|
Icon("refresh")
|
||||||
|
span Import
|
@ -1,4 +1,7 @@
|
|||||||
component ImportLists(user *arn.User)
|
component ImportLists(user *arn.User)
|
||||||
|
if user.Accounts.AniList.Nick == "" && user.Accounts.Kitsu.Nick == "" && user.Accounts.MyAnimeList.Nick == ""
|
||||||
|
p Import your list once you enter your username!
|
||||||
|
|
||||||
if user.Accounts.AniList.Nick != ""
|
if user.Accounts.AniList.Nick != ""
|
||||||
label AniList:
|
label AniList:
|
||||||
|
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
.buttons-vertical
|
.buttons-vertical
|
||||||
width 100%
|
width 100%
|
||||||
|
|
||||||
|
.import-buttons
|
||||||
|
margin-bottom content-padding
|
@ -1,5 +1,7 @@
|
|||||||
component ImportAnilist(user *arn.User, matches []*arn.AniListMatch)
|
component ImportAnilist(user *arn.User, matches []*arn.AniListMatch)
|
||||||
h1= "anilist.co Import (" + user.Accounts.AniList.Nick + ", " + toString(len(matches)) + " anime)"
|
h1= "Preview: anilist.co (" + user.Accounts.AniList.Nick + ", " + toString(len(matches)) + " anime)"
|
||||||
|
|
||||||
|
ImportButton("/import/anilist/animelist/finish")
|
||||||
|
|
||||||
table.import-list
|
table.import-list
|
||||||
thead
|
thead
|
||||||
@ -17,7 +19,4 @@ component ImportAnilist(user *arn.User, matches []*arn.AniListMatch)
|
|||||||
else
|
else
|
||||||
a(href=match.ARNAnime.Link(), target="_blank", rel="noopener")= match.ARNAnime.Title.Canonical
|
a(href=match.ARNAnime.Link(), target="_blank", rel="noopener")= match.ARNAnime.Title.Canonical
|
||||||
|
|
||||||
.buttons
|
ImportButton("/import/anilist/animelist/finish")
|
||||||
a.button.mountable(href="/import/anilist/animelist/finish")
|
|
||||||
Icon("refresh")
|
|
||||||
span Import
|
|
@ -1,5 +1,7 @@
|
|||||||
component ImportKitsu(user *arn.User, matches []*arn.KitsuMatch)
|
component ImportKitsu(user *arn.User, matches []*arn.KitsuMatch)
|
||||||
h1= "kitsu.io Import (" + user.Accounts.Kitsu.Nick + ", " + toString(len(matches)) + " anime)"
|
h1= "Preview: kitsu.io (" + user.Accounts.Kitsu.Nick + ", " + toString(len(matches)) + " anime)"
|
||||||
|
|
||||||
|
ImportButton("/import/kitsu/animelist/finish")
|
||||||
|
|
||||||
table.import-list
|
table.import-list
|
||||||
thead
|
thead
|
||||||
@ -17,7 +19,4 @@ component ImportKitsu(user *arn.User, matches []*arn.KitsuMatch)
|
|||||||
else
|
else
|
||||||
a(href=match.ARNAnime.Link(), target="_blank", rel="noopener")= match.ARNAnime.Title.Canonical
|
a(href=match.ARNAnime.Link(), target="_blank", rel="noopener")= match.ARNAnime.Title.Canonical
|
||||||
|
|
||||||
.buttons
|
ImportButton("/import/kitsu/animelist/finish")
|
||||||
a.button.mountable(href="/import/kitsu/animelist/finish")
|
|
||||||
Icon("refresh")
|
|
||||||
span Import
|
|
@ -1,5 +1,7 @@
|
|||||||
component ImportMyAnimeList(user *arn.User, matches []*arn.MyAnimeListMatch)
|
component ImportMyAnimeList(user *arn.User, matches []*arn.MyAnimeListMatch)
|
||||||
h1= "myanimelist.net Import (" + user.Accounts.MyAnimeList.Nick + ", " + toString(len(matches)) + " anime)"
|
h1= "Preview: myanimelist.net (" + user.Accounts.MyAnimeList.Nick + ", " + toString(len(matches)) + " anime)"
|
||||||
|
|
||||||
|
ImportButton("/import/myanimelist/animelist/finish")
|
||||||
|
|
||||||
table.import-list
|
table.import-list
|
||||||
thead
|
thead
|
||||||
@ -17,7 +19,4 @@ component ImportMyAnimeList(user *arn.User, matches []*arn.MyAnimeListMatch)
|
|||||||
else
|
else
|
||||||
a(href=match.ARNAnime.Link(), target="_blank", rel="noopener")= match.ARNAnime.Title.Canonical
|
a(href=match.ARNAnime.Link(), target="_blank", rel="noopener")= match.ARNAnime.Title.Canonical
|
||||||
|
|
||||||
.buttons
|
ImportButton("/import/myanimelist/animelist/finish")
|
||||||
a.button.mountable(href="/import/myanimelist/animelist/finish")
|
|
||||||
Icon("refresh")
|
|
||||||
span Import
|
|
Loading…
Reference in New Issue
Block a user