Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions handlers/family/page.go

This file was deleted.

52 changes: 0 additions & 52 deletions handlers/family/page.gohtml

This file was deleted.

49 changes: 0 additions & 49 deletions handlers/friends/page.go

This file was deleted.

53 changes: 0 additions & 53 deletions handlers/friends/page.gohtml

This file was deleted.

49 changes: 0 additions & 49 deletions handlers/humans/page.go

This file was deleted.

54 changes: 0 additions & 54 deletions handlers/humans/page.gohtml

This file was deleted.

4 changes: 0 additions & 4 deletions handlers/layout/gom.layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ func header(unreadCount int, user api.User) g.Node {
h.Style("padding: 1em 0 1em"),
h.Div(
h.Style("display:flex;gap:4px;align-items:center;justify-content:space-between"),
h.A(
h.Href("/me/humans"),
g.Text("Humans"),
),
h.A(
h.Href("/bots"),
g.Text("Robots"),
Expand Down
1 change: 0 additions & 1 deletion handlers/layout/layout.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
<div style="padding: 1em 0 1em">

<div style="display:flex;gap:4px;align-items:center;justify-content:space-between">
<a href="/me/humans">Humans</a>
<a href="/bots">Robots</a>
<a href="/fun">Activities</a>
<a href="/me"
Expand Down
12 changes: 12 additions & 0 deletions handlers/me/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ func (s *service) Page(w http.ResponseWriter, r *http.Request) {
layout.Layout(l,
l.User.Username,
h.Div(h.Style("display:flex;flex-direction:column;gap:1em;"),
h.Div(h.Style("display:flex; gap: 1em; justify-content: flex-end"),
g.If(l.User.IsParent,
g.Group{
h.A(h.Href("/parent"), h.Class("nes-btn"), g.Text("Family")),
h.A(h.Href("/connect"), h.Class("nes-btn"), g.Text("Friends")),
},
),
g.If(!l.User.IsParent,
h.A(h.Href("/connectkids"), h.Class("nes-btn"), g.Text("Friends")),
),
),

h.Section(ProfileEl(l.User, true)),

h.Section(
Expand Down
15 changes: 0 additions & 15 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ import (
"oj/handlers/connectkids"
"oj/handlers/deliveries"
"oj/handlers/eventsource"
"oj/handlers/family"
"oj/handlers/friends"
"oj/handlers/fun"
"oj/handlers/fun/chess"
"oj/handlers/fun/gradients"
"oj/handlers/fun/notebook"
"oj/handlers/header"
"oj/handlers/humans"
"oj/handlers/me"
"oj/handlers/me/editme"
"oj/handlers/postoffice"
Expand Down Expand Up @@ -71,18 +68,6 @@ func (rs Service) Routes() chi.Router {
r.Put("/avatar", s.PutAvatar)
})

r.Group(func(r chi.Router) {
s := humans.NewService(rs.Queries)
r.Get("/me/humans", s.Page)
})
r.Group(func(r chi.Router) {
s := family.NewService(rs.Queries)
r.Get("/me/family", s.Page)
})
r.Group(func(r chi.Router) {
s := friends.NewService(rs.Queries)
r.Get("/me/friends", s.Page)
})
r.Get("/fun", fun.Page)
r.Get("/fun/gradients", gradients.Index)
r.Post("/fun/gradients/picker", gradients.Picker)
Expand Down