bloat/renderer/model.go

184 lines
3.0 KiB
Go
Raw Normal View History

2019-12-13 18:08:26 +00:00
package renderer
import (
2020-02-01 11:31:44 +00:00
"bloat/mastodon"
2020-01-01 15:58:27 +00:00
"bloat/model"
2019-12-13 18:08:26 +00:00
)
2020-01-14 16:57:16 +00:00
type Context struct {
HideAttachments bool
MaskNSFW bool
FluorideMode bool
ThreadInNewTab bool
DarkMode bool
CSRFToken string
UserID string
2020-09-02 17:50:48 +00:00
AntiDopamineMode bool
InstanceEmojiFilter string
AddReactionsFilter string
2021-04-03 09:22:43 +00:00
UserCSS string
Referrer string
2020-01-14 16:57:16 +00:00
}
type CommonData struct {
Title string
CustomCSS string
CSRFToken string
Count int
RefreshInterval int
Target string
}
2021-03-20 05:12:48 +00:00
type NavData struct {
CommonData *CommonData
User *mastodon.Account
PostContext model.PostContext
}
2019-12-26 09:11:24 +00:00
type ErrorData struct {
*CommonData
Err string
Retry bool
SessionErr bool
2019-12-26 09:11:24 +00:00
}
type HomePageData struct {
*CommonData
}
type SigninData struct {
*CommonData
}
2020-02-18 22:15:37 +00:00
type RootData struct {
Title string
}
2019-12-25 14:13:59 +00:00
type TimelineData struct {
*CommonData
2020-02-18 22:15:37 +00:00
Title string
2021-01-23 08:44:05 +00:00
Type string
Instance string
2020-02-18 22:15:37 +00:00
Statuses []*mastodon.Status
NextLink string
PrevLink string
2019-12-13 18:08:26 +00:00
}
2022-02-11 11:18:02 +00:00
type ListsData struct {
*CommonData
Lists []*mastodon.List
}
type ListData struct {
*CommonData
List *mastodon.List
Accounts []*mastodon.Account
Q string
SearchAccounts []*mastodon.Account
}
2019-12-25 14:13:59 +00:00
type ThreadData struct {
*CommonData
Statuses []*mastodon.Status
PostContext model.PostContext
ReplyMap map[string][]mastodon.ReplyInfo
2019-12-13 18:08:26 +00:00
}
2021-09-05 17:17:59 +00:00
type QuickReplyData struct {
*CommonData
Ancestor *mastodon.Status
Status *mastodon.Status
PostContext model.PostContext
}
2019-12-25 14:13:59 +00:00
type NotificationData struct {
*CommonData
2019-12-15 17:37:58 +00:00
Notifications []*mastodon.Notification
2020-02-18 22:15:37 +00:00
UnreadCount int
ReadID string
2019-12-15 17:37:58 +00:00
NextLink string
2019-12-13 18:08:26 +00:00
}
2019-12-25 14:13:59 +00:00
type UserData struct {
*CommonData
User *mastodon.Account
IsCurrent bool
Type string
Users []*mastodon.Account
Statuses []*mastodon.Status
NextLink string
}
2019-12-21 05:48:48 +00:00
2020-01-30 15:32:37 +00:00
type UserSearchData struct {
*CommonData
User *mastodon.Account
Q string
Statuses []*mastodon.Status
NextLink string
}
2019-12-25 14:13:59 +00:00
type AboutData struct {
*CommonData
2019-12-21 05:48:48 +00:00
}
2022-10-12 10:34:41 +00:00
type AboutInstanceData struct {
*CommonData
Instance *mastodon.Instance
2022-10-12 22:41:34 +00:00
Peers []string
2022-10-12 10:34:41 +00:00
}
2019-12-25 14:13:59 +00:00
type EmojiData struct {
2019-12-26 09:11:24 +00:00
*CommonData
2019-12-26 19:18:09 +00:00
Emojis []*mastodon.Emoji
2019-12-26 09:11:24 +00:00
}
type LikedByData struct {
*CommonData
2019-12-26 19:18:09 +00:00
Users []*mastodon.Account
NextLink string
2019-12-26 09:11:24 +00:00
}
2022-10-19 14:33:43 +00:00
//For Pleroma reactions
type ReactedByData struct {
*CommonData
Reactions []*mastodon.ReactionsPleroma
ReactionEmojis map[string]string
ID string
2022-10-19 14:33:43 +00:00
}
2019-12-26 09:11:24 +00:00
type RetweetedByData struct {
*CommonData
2019-12-26 19:18:09 +00:00
Users []*mastodon.Account
NextLink string
}
type SearchData struct {
*CommonData
2019-12-27 08:06:43 +00:00
Q string
Type string
Users []*mastodon.Account
Statuses []*mastodon.Status
2019-12-26 19:18:09 +00:00
NextLink string
2019-12-22 18:10:42 +00:00
}
2019-12-27 08:06:43 +00:00
type SettingsData struct {
*CommonData
2020-10-19 06:51:23 +00:00
Settings *model.Settings
PostFormats []model.PostFormat
2019-12-27 08:06:43 +00:00
}
2021-01-30 16:51:09 +00:00
type FiltersData struct {
*CommonData
Filters []*mastodon.Filter
}
2022-12-17 08:26:51 +00:00
2023-10-01 13:04:07 +00:00
type ProfileData struct {
*CommonData
User *mastodon.Account
}
2022-12-17 08:26:51 +00:00
type MuteData struct {
*CommonData
User *mastodon.Account
}