diff options
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/model.go | 15 | ||||
-rw-r--r-- | renderer/renderer.go | 5 |
2 files changed, 15 insertions, 5 deletions
diff --git a/renderer/model.go b/renderer/model.go index ffeb2d1..12fa90f 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -92,10 +92,15 @@ type RetweetedByData struct { type SearchData struct { *CommonData - Q string - Type string - Users []*mastodon.Account - Statuses []*mastodon.Status - HasNext bool + Q string + Type string + Users []*mastodon.Account + Statuses []*mastodon.Status + HasNext bool NextLink string } + +type SettingsData struct { + *CommonData + Settings *model.Settings +} diff --git a/renderer/renderer.go b/renderer/renderer.go index 5e5f005..a46cfd2 100644 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -24,6 +24,7 @@ type Renderer interface { RenderLikedByPage(ctx context.Context, writer io.Writer, data *LikedByData) (err error) RenderRetweetedByPage(ctx context.Context, writer io.Writer, data *RetweetedByData) (err error) RenderSearchPage(ctx context.Context, writer io.Writer, data *SearchData) (err error) + RenderSettingsPage(ctx context.Context, writer io.Writer, data *SettingsData) (err error) } type renderer struct { @@ -96,6 +97,10 @@ func (r *renderer) RenderSearchPage(ctx context.Context, writer io.Writer, data return r.template.ExecuteTemplate(writer, "search.tmpl", data) } +func (r *renderer) RenderSettingsPage(ctx context.Context, writer io.Writer, data *SettingsData) (err error) { + return r.template.ExecuteTemplate(writer, "settings.tmpl", data) +} + func EmojiFilter(content string, emojis []mastodon.Emoji) string { var replacements []string for _, e := range emojis { |