From 8dcd6cfdd73aad9bbb7c33b3001a8d7411b72d1a Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Fri, 10 Nov 2023 12:08:33 +0300 Subject: [PATCH] removed old edit user page --- renderer/model.go | 5 ----- renderer/renderer.go | 1 - service/service.go | 13 ----------- templates/user.tmpl | 1 - templates/useredit.tmpl | 48 ----------------------------------------- 5 files changed, 68 deletions(-) delete mode 100644 templates/useredit.tmpl diff --git a/renderer/model.go b/renderer/model.go index 1d3d414..4c31001 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -109,11 +109,6 @@ type UserData struct { NextLink string } -type UserEditData struct { - *CommonData - User *mastodon.Account -} - type UserSearchData struct { *CommonData User *mastodon.Account diff --git a/renderer/renderer.go b/renderer/renderer.go index 599be56..470490e 100644 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -34,7 +34,6 @@ const ( RetweetedByPage = "retweetedby.tmpl" SearchPage = "search.tmpl" SettingsPage = "settings.tmpl" - UserEditPage = "useredit.tmpl" FiltersPage = "filters.tmpl" ProfilePage = "profile.tmpl" MutePage = "mute.tmpl" diff --git a/service/service.go b/service/service.go index 463edf7..cfbab9c 100644 --- a/service/service.go +++ b/service/service.go @@ -839,19 +839,6 @@ func (s *service) SearchPage(c *client, return s.renderer.Render(c.rctx, c.w, renderer.SearchPage, data) } -func (s *service) UserEditPage(c *client) (err error) { - cdata := s.cdata(c, "useredit", 0, 0, "") - u, err := c.GetAccountCurrentUser(c.ctx) - if err != nil { - return - } - data := &renderer.UserEditData{ - CommonData: cdata, - User: u, - } - return s.renderer.Render(c.rctx, c.w, renderer.UserEditPage, data) -} - func (s *service) SettingsPage(c *client) (err error) { cdata := s.cdata(c, "settings", 0, 0, "") data := &renderer.SettingsData{ diff --git a/templates/user.tmpl b/templates/user.tmpl index db3afff..c8123b0 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -114,7 +114,6 @@ - mutes - blocks {{if .User.Locked}}- requests {{end}} - - edit {{end}}
diff --git a/templates/useredit.tmpl b/templates/useredit.tmpl deleted file mode 100644 index cac25d8..0000000 --- a/templates/useredit.tmpl +++ /dev/null @@ -1,48 +0,0 @@ -{{with .Data}} -{{template "header.tmpl" (WithContext .CommonData $.Ctx)}} -
User settings
- -
- - - -
- - -
-
- -
-
- -
-
Current bio for copypaste{{.User.Note | Raw}}
-
-
-
- - -
-
- - -
- {{if .User.MastodonAccount}} - {{else}} -
Pleroma settings
- -
- - -
-
- - -
- {{end}} - - -
- -{{template "footer.tmpl"}} -{{end}}