added upload and changing of community logo, and fixed logo references in other files

This commit is contained in:
2025-10-18 20:41:06 -06:00
parent 94c3877819
commit 1797a6ec7e
8 changed files with 227 additions and 12 deletions
+5 -1
View File
@@ -62,7 +62,11 @@ func ShowCommunity(ctxt ui.AmContext) (string, any, error) {
}
ctxt.VarMap().Set("commName", comm.Name)
// TODO: set photo URL
if ci.PhotoURL != nil && *ci.PhotoURL != "" {
ctxt.VarMap().Set("logoURL", *ci.PhotoURL)
} else {
ctxt.VarMap().Set("logoURL", "/img/builtin/default-community.jpg")
}
tz := prefs.Location()
loc := prefs.Localizer()
ctxt.VarMap().Set("dateCreated", loc.Strftime("%x %X", comm.CreateDate.In(tz)))