2019-12-13 19:08:26 +01:00
|
|
|
package renderer
|
|
|
|
|
|
|
|
import (
|
2020-02-01 12:31:44 +01:00
|
|
|
"bloat/mastodon"
|
2020-01-01 16:58:27 +01:00
|
|
|
"bloat/model"
|
2019-12-13 19:08:26 +01:00
|
|
|
)
|
|
|
|
|
2020-01-14 17:57:16 +01:00
|
|
|
type Context struct {
|
2020-09-03 08:26:32 +02:00
|
|
|
HideAttachments bool
|
|
|
|
MaskNSFW bool
|
|
|
|
FluorideMode bool
|
|
|
|
ThreadInNewTab bool
|
|
|
|
DarkMode bool
|
|
|
|
CSRFToken string
|
|
|
|
UserID string
|
2020-09-02 19:50:48 +02:00
|
|
|
AntiDopamineMode bool
|
2021-01-17 06:44:07 +01:00
|
|
|
Referrer string
|
2020-01-14 17:57:16 +01:00
|
|
|
}
|
|
|
|
|
2019-12-25 17:38:47 +01:00
|
|
|
type CommonData struct {
|
2020-11-14 15:08:16 +01:00
|
|
|
Title string
|
|
|
|
CustomCSS string
|
|
|
|
CSRFToken string
|
|
|
|
Count int
|
|
|
|
RefreshInterval int
|
|
|
|
Target string
|
2020-02-08 12:50:14 +01:00
|
|
|
}
|
|
|
|
|
2021-03-20 06:12:48 +01:00
|
|
|
type NavData struct {
|
|
|
|
CommonData *CommonData
|
|
|
|
User *mastodon.Account
|
|
|
|
PostContext model.PostContext
|
|
|
|
}
|
|
|
|
|
2019-12-26 10:11:24 +01:00
|
|
|
type ErrorData struct {
|
|
|
|
*CommonData
|
|
|
|
Error string
|
|
|
|
}
|
|
|
|
|
|
|
|
type HomePageData struct {
|
|
|
|
*CommonData
|
|
|
|
}
|
|
|
|
|
|
|
|
type SigninData struct {
|
|
|
|
*CommonData
|
|
|
|
}
|
|
|
|
|
2020-02-18 23:15:37 +01:00
|
|
|
type RootData struct {
|
|
|
|
Title string
|
|
|
|
}
|
|
|
|
|
2019-12-25 15:13:59 +01:00
|
|
|
type TimelineData struct {
|
2019-12-25 17:38:47 +01:00
|
|
|
*CommonData
|
2020-02-18 23:15:37 +01:00
|
|
|
Title string
|
2021-01-23 09:44:05 +01:00
|
|
|
Type string
|
|
|
|
Instance string
|
2020-02-18 23:15:37 +01:00
|
|
|
Statuses []*mastodon.Status
|
|
|
|
NextLink string
|
|
|
|
PrevLink string
|
2019-12-13 19:08:26 +01:00
|
|
|
}
|
|
|
|
|
2019-12-25 15:13:59 +01:00
|
|
|
type ThreadData struct {
|
2019-12-25 17:38:47 +01:00
|
|
|
*CommonData
|
2019-12-21 14:26:31 +01:00
|
|
|
Statuses []*mastodon.Status
|
|
|
|
PostContext model.PostContext
|
|
|
|
ReplyMap map[string][]mastodon.ReplyInfo
|
2019-12-13 19:08:26 +01:00
|
|
|
}
|
|
|
|
|
2019-12-25 15:13:59 +01:00
|
|
|
type NotificationData struct {
|
2019-12-25 17:38:47 +01:00
|
|
|
*CommonData
|
2019-12-15 18:37:58 +01:00
|
|
|
Notifications []*mastodon.Notification
|
2020-02-18 23:15:37 +01:00
|
|
|
UnreadCount int
|
|
|
|
ReadID string
|
2019-12-15 18:37:58 +01:00
|
|
|
NextLink string
|
2019-12-13 19:08:26 +01:00
|
|
|
}
|
2019-12-20 19:30:20 +01:00
|
|
|
|
2019-12-25 15:13:59 +01:00
|
|
|
type UserData struct {
|
2019-12-25 17:38:47 +01:00
|
|
|
*CommonData
|
2020-02-08 12:50:14 +01:00
|
|
|
User *mastodon.Account
|
|
|
|
IsCurrent bool
|
|
|
|
Type string
|
|
|
|
Users []*mastodon.Account
|
|
|
|
Statuses []*mastodon.Status
|
|
|
|
NextLink string
|
2019-12-20 19:30:20 +01:00
|
|
|
}
|
2019-12-21 06:48:48 +01:00
|
|
|
|
2020-01-30 16:32:37 +01:00
|
|
|
type UserSearchData struct {
|
|
|
|
*CommonData
|
|
|
|
User *mastodon.Account
|
|
|
|
Q string
|
|
|
|
Statuses []*mastodon.Status
|
|
|
|
NextLink string
|
|
|
|
}
|
|
|
|
|
2019-12-25 15:13:59 +01:00
|
|
|
type AboutData struct {
|
2019-12-25 17:38:47 +01:00
|
|
|
*CommonData
|
2019-12-21 06:48:48 +01:00
|
|
|
}
|
|
|
|
|
2019-12-25 15:13:59 +01:00
|
|
|
type EmojiData struct {
|
2019-12-26 10:11:24 +01:00
|
|
|
*CommonData
|
2019-12-26 20:18:09 +01:00
|
|
|
Emojis []*mastodon.Emoji
|
2019-12-26 10:11:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type LikedByData struct {
|
|
|
|
*CommonData
|
2019-12-26 20:18:09 +01:00
|
|
|
Users []*mastodon.Account
|
|
|
|
NextLink string
|
2019-12-26 10:11:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type RetweetedByData struct {
|
|
|
|
*CommonData
|
2019-12-26 20:18:09 +01:00
|
|
|
Users []*mastodon.Account
|
|
|
|
NextLink string
|
|
|
|
}
|
|
|
|
|
|
|
|
type SearchData struct {
|
|
|
|
*CommonData
|
2019-12-27 09:06:43 +01:00
|
|
|
Q string
|
|
|
|
Type string
|
|
|
|
Users []*mastodon.Account
|
|
|
|
Statuses []*mastodon.Status
|
2019-12-26 20:18:09 +01:00
|
|
|
NextLink string
|
2019-12-22 19:10:42 +01:00
|
|
|
}
|
2019-12-27 09:06:43 +01:00
|
|
|
|
|
|
|
type SettingsData struct {
|
|
|
|
*CommonData
|
2020-10-19 08:51:23 +02:00
|
|
|
Settings *model.Settings
|
|
|
|
PostFormats []model.PostFormat
|
2019-12-27 09:06:43 +01:00
|
|
|
}
|
2021-01-30 17:51:09 +01:00
|
|
|
|
|
|
|
type FiltersData struct {
|
|
|
|
*CommonData
|
|
|
|
Filters []*mastodon.Filter
|
|
|
|
}
|