2019-12-13 20:08:26 +02:00
|
|
|
package renderer
|
|
|
|
|
|
|
|
import (
|
|
|
|
"mastodon"
|
2019-12-21 10:36:44 +02:00
|
|
|
"web/model"
|
2019-12-13 20:08:26 +02:00
|
|
|
)
|
|
|
|
|
2019-12-25 18:38:47 +02:00
|
|
|
type HeaderData struct {
|
|
|
|
Title string
|
|
|
|
NotificationCount int
|
|
|
|
CustomCSS string
|
|
|
|
}
|
|
|
|
|
2019-12-25 16:13:59 +02:00
|
|
|
type NavbarData struct {
|
2019-12-24 16:55:05 +02:00
|
|
|
User *mastodon.Account
|
2019-12-15 19:37:58 +02:00
|
|
|
NotificationCount int
|
|
|
|
}
|
|
|
|
|
2019-12-25 18:38:47 +02:00
|
|
|
type CommonData struct {
|
|
|
|
HeaderData *HeaderData
|
|
|
|
NavbarData *NavbarData
|
|
|
|
}
|
|
|
|
|
2019-12-26 11:11:24 +02:00
|
|
|
type ErrorData struct {
|
|
|
|
*CommonData
|
|
|
|
Error string
|
|
|
|
}
|
|
|
|
|
|
|
|
type HomePageData struct {
|
|
|
|
*CommonData
|
|
|
|
}
|
|
|
|
|
|
|
|
type SigninData struct {
|
|
|
|
*CommonData
|
|
|
|
}
|
|
|
|
|
2019-12-25 16:13:59 +02:00
|
|
|
type TimelineData struct {
|
2019-12-25 18:38:47 +02:00
|
|
|
*CommonData
|
2019-12-25 06:30:21 +02:00
|
|
|
Title string
|
2019-12-21 15:26:31 +02:00
|
|
|
Statuses []*mastodon.Status
|
|
|
|
HasNext bool
|
|
|
|
NextLink string
|
|
|
|
HasPrev bool
|
|
|
|
PrevLink string
|
|
|
|
PostContext model.PostContext
|
2019-12-13 20:08:26 +02:00
|
|
|
}
|
|
|
|
|
2019-12-25 16:13:59 +02:00
|
|
|
type ThreadData struct {
|
2019-12-25 18:38:47 +02:00
|
|
|
*CommonData
|
2019-12-21 15:26:31 +02:00
|
|
|
Statuses []*mastodon.Status
|
|
|
|
PostContext model.PostContext
|
|
|
|
ReplyMap map[string][]mastodon.ReplyInfo
|
2019-12-13 20:08:26 +02:00
|
|
|
}
|
|
|
|
|
2019-12-25 16:13:59 +02:00
|
|
|
type NotificationData struct {
|
2019-12-25 18:38:47 +02:00
|
|
|
*CommonData
|
2019-12-15 19:37:58 +02:00
|
|
|
Notifications []*mastodon.Notification
|
|
|
|
HasNext bool
|
|
|
|
NextLink string
|
2019-12-13 20:08:26 +02:00
|
|
|
}
|
2019-12-20 20:30:20 +02:00
|
|
|
|
2019-12-25 16:13:59 +02:00
|
|
|
type UserData struct {
|
2019-12-25 18:38:47 +02:00
|
|
|
*CommonData
|
2019-12-26 21:18:09 +02:00
|
|
|
User *mastodon.Account
|
|
|
|
Statuses []*mastodon.Status
|
|
|
|
HasNext bool
|
|
|
|
NextLink string
|
2019-12-20 20:30:20 +02:00
|
|
|
}
|
2019-12-21 07:48:48 +02:00
|
|
|
|
2019-12-25 16:13:59 +02:00
|
|
|
type AboutData struct {
|
2019-12-25 18:38:47 +02:00
|
|
|
*CommonData
|
2019-12-21 07:48:48 +02:00
|
|
|
}
|
|
|
|
|
2019-12-25 16:13:59 +02:00
|
|
|
type EmojiData struct {
|
2019-12-26 11:11:24 +02:00
|
|
|
*CommonData
|
2019-12-26 21:18:09 +02:00
|
|
|
Emojis []*mastodon.Emoji
|
2019-12-26 11:11:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type LikedByData struct {
|
|
|
|
*CommonData
|
2019-12-26 21:18:09 +02:00
|
|
|
Users []*mastodon.Account
|
|
|
|
HasNext bool
|
|
|
|
NextLink string
|
2019-12-26 11:11:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type RetweetedByData struct {
|
|
|
|
*CommonData
|
2019-12-26 21:18:09 +02:00
|
|
|
Users []*mastodon.Account
|
|
|
|
HasNext bool
|
|
|
|
NextLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
type SearchData struct {
|
|
|
|
*CommonData
|
|
|
|
Q string
|
|
|
|
Type string
|
|
|
|
Users []*mastodon.Account
|
|
|
|
Statuses []*mastodon.Status
|
|
|
|
HasNext bool
|
|
|
|
NextLink string
|
2019-12-22 20:10:42 +02:00
|
|
|
}
|