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