Redesign the UI on brain's look: sidebar with search, Overview, modules, grouped Settings
- Left sidebar as in brain: search at the top (press /), Overview, Inventory, the modules (Content with Inbox, Sources, Scheduled and Published; later phases greyed out), Settings at the bottom; a top bar with breadcrumbs, and a menu that slides in on narrow screens. - brain's colour tokens, type, radius and shadows, with a dark theme that follows the system setting. - Settings as grouped tabs: Profile; Social accounts (was Credentials, now keys and sign-in together per network); Core & Hermes; AI, which now holds the API keys too. Old addresses redirect. - /search matches every word across posts, fetched items, the inventory, products and settings pages. - Overview: a card per module, then the setup checklist, folded once done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,7 +36,7 @@ func (s *Server) profilePage(w http.ResponseWriter, r *http.Request) {
|
||||
d.DraftURL = p.Websites[0].URL
|
||||
}
|
||||
d.NoAI = !s.aiReady()
|
||||
s.render(w, r, "profile", page{Title: "Company profile", Nav: "profile", Data: d})
|
||||
s.render(w, r, "profile", page{Title: "Company profile", Nav: "settings/profile", Data: d})
|
||||
}
|
||||
|
||||
// profileFromForm reads the profile form. Repeated rows (products, websites)
|
||||
@@ -103,7 +103,7 @@ func (s *Server) profileSave(w http.ResponseWriter, r *http.Request) {
|
||||
p := profileFromForm(r)
|
||||
p.Clean()
|
||||
if !p.IsSet() {
|
||||
s.render(w, r, "profile", page{Title: "Company profile", Nav: "profile",
|
||||
s.render(w, r, "profile", page{Title: "Company profile", Nav: "settings/profile",
|
||||
Error: "The company's name and description are required.", Data: withBlankRows(p)})
|
||||
return
|
||||
}
|
||||
@@ -111,7 +111,7 @@ func (s *Server) profileSave(w http.ResponseWriter, r *http.Request) {
|
||||
s.serverError(w, err)
|
||||
return
|
||||
}
|
||||
redirect(w, r, "/profile", "saved")
|
||||
redirect(w, r, "/settings/profile", "saved")
|
||||
}
|
||||
|
||||
// profileDraft drafts the profile from a website and shows it in the form,
|
||||
@@ -132,7 +132,7 @@ func (s *Server) profileDraft(w http.ResponseWriter, r *http.Request) {
|
||||
d.Drafted = drafted
|
||||
d.DraftURL = siteURL
|
||||
d.NoAI = !s.aiReady()
|
||||
s.render(w, r, "profile", page{Title: "Company profile", Nav: "profile", Error: errMsg, Data: d})
|
||||
s.render(w, r, "profile", page{Title: "Company profile", Nav: "settings/profile", Error: errMsg, Data: d})
|
||||
}
|
||||
|
||||
cfg, err := ai.LoadConfig(s.DB)
|
||||
|
||||
Reference in New Issue
Block a user