mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
Add some artwork-related attributes
This commit is contained in:
@@ -103,6 +103,8 @@ type Illust struct {
|
||||
SanityLevel int `json:"sl"`
|
||||
XRestrict xRestrict `json:"xRestrict"`
|
||||
AiType aiType `json:"aiType"`
|
||||
Bookmarked any `json:"bookmarkData"`
|
||||
Liked any `json:"json:"likeData"`
|
||||
User UserBrief
|
||||
RecentWorks []ArtworkBrief
|
||||
RelatedWorks []ArtworkBrief
|
||||
|
||||
@@ -19,6 +19,7 @@ type ArtworkBrief struct {
|
||||
Pages int `json:"pageCount"`
|
||||
XRestrict int `json:"xRestrict"`
|
||||
AiType int `json:"aiType"`
|
||||
Bookmarked any `json:"bookmarkData"`
|
||||
}
|
||||
|
||||
func ProxyImages(s, proxy string) string {
|
||||
|
||||
@@ -141,9 +141,9 @@ func main() {
|
||||
self.Get("/", pages.LoginUserPage)
|
||||
self.Get("/followingWorks", pages.FollowingWorksPage)
|
||||
self.Get("/bookmarks", pages.LoginBookmarkPage)
|
||||
self.Get("/addBookmark/:id", pages.AddBookmarkRoute)
|
||||
self.Get("/deleteBookmark/:id", pages.DeleteBookmarkRoute)
|
||||
self.Get("/like/:id", pages.LikeRoute)
|
||||
self.Post("/addBookmark/:id", pages.AddBookmarkRoute)
|
||||
self.Post("/deleteBookmark/:id", pages.DeleteBookmarkRoute)
|
||||
self.Post("/like/:id", pages.LikeRoute)
|
||||
|
||||
server.Get("tags/:name", pages.TagPage)
|
||||
server.Post("tags",
|
||||
|
||||
@@ -54,6 +54,20 @@
|
||||
<br />
|
||||
</div>
|
||||
<div class="illust-tags">
|
||||
<!--
|
||||
To know if this artwork is bookmarked:
|
||||
```
|
||||
{{ if Illust.Bookmarked }}
|
||||
<button>Unbookmark</button>
|
||||
//...
|
||||
{{ else }}
|
||||
<button>Bookmarked</button>
|
||||
//...
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
Same with Illust.Liked
|
||||
-->
|
||||
<span class="illust-tag-attr">
|
||||
<img src="/assets/eye.png" alt="Views" />
|
||||
{{ Illust.Views }}
|
||||
|
||||
Reference in New Issue
Block a user