fixed display of host status on member list

This commit is contained in:
2025-10-22 21:04:30 -06:00
parent 4f363c8fc8
commit beddade58f
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -341,6 +341,7 @@ func MemberList(ctxt ui.AmContext) (string, any, error) {
} }
ctxt.SetLeftMenu("community") ctxt.SetLeftMenu("community")
ctxt.VarMap().Set("comm", comm) ctxt.VarMap().Set("comm", comm)
ctxt.VarMap().Set("hostUid", *comm.HostUid)
showHidden := ctxt.TestPermission("Community.ShowHiddenMembers") showHidden := ctxt.TestPermission("Community.ShowHiddenMembers")
ctxt.VarMap().Set("canExport", showHidden) ctxt.VarMap().Set("canExport", showHidden)
ctxt.VarMap().Set("field", "name") ctxt.VarMap().Set("field", "name")
@@ -392,6 +393,7 @@ func MemberSearch(ctxt ui.AmContext) (string, any, error) {
term := ctxt.FormField("term") term := ctxt.FormField("term")
ctxt.SetLeftMenu("community") ctxt.SetLeftMenu("community")
ctxt.VarMap().Set("comm", comm) ctxt.VarMap().Set("comm", comm)
ctxt.VarMap().Set("hostUid", comm.HostUid)
showHidden := ctxt.TestPermission("Community.ShowHiddenMembers") showHidden := ctxt.TestPermission("Community.ShowHiddenMembers")
ctxt.VarMap().Set("canExport", showHidden) ctxt.VarMap().Set("canExport", showHidden)
ctxt.VarMap().Set("field", field) ctxt.VarMap().Set("field", field)
+3 -1
View File
@@ -98,12 +98,14 @@
<div class="mb-2"> <div class="mb-2">
<a href="/user/{{ rx.Username }}" <a href="/user/{{ rx.Username }}"
class="text-blue-700 hover:text-blue-900 font-bold text-base">{{ rx.Username }}</a> class="text-blue-700 hover:text-blue-900 font-bold text-base">{{ rx.Username }}</a>
{{ if rx.Uid == hostUid }}
<span class="ml-1">👑</span>
{{ end }}
</div> </div>
<div class="text-sm text-gray-700 space-y-1"> <div class="text-sm text-gray-700 space-y-1">
<div> <div>
{{ ci := rx.ContactInfoQ() }} {{ ci := rx.ContactInfoQ() }}
{{ DisplayFullName(ci) }}, from {{ ci.Locality }}, {{ ci.Region }} {{ ci.Country }} {{ DisplayFullName(ci) }}, from {{ ci.Locality }}, {{ ci.Region }} {{ ci.Country }}
{{ if rx.Uid == comm.HostUid }}<span class="ml-1">👑</span>{{ end }}
</div> </div>
</div> </div>
</div> </div>