Private
Public Access
Add a People list showing who's online (#25)
A "People" button next to "Browse rooms" opens a modal listing every site user with an online/offline status dot, online users sorted first. No backend changes needed -- GET /api/users (the user directory) and GET /api/users/online (a snapshot of who's connected anywhere in the app, backing every avatar's status dot already) both already existed from other features, just never had a UI surface of their own for regular members. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ interface SidebarProps {
|
||||
onSearchChange: (value: string) => void
|
||||
onOpenNewRoom: () => void
|
||||
onOpenBrowse: () => void
|
||||
onOpenPeople: () => void
|
||||
unavailableOffline?: boolean
|
||||
}
|
||||
|
||||
@@ -20,6 +21,7 @@ export function Sidebar({
|
||||
onSearchChange,
|
||||
onOpenNewRoom,
|
||||
onOpenBrowse,
|
||||
onOpenPeople,
|
||||
unavailableOffline,
|
||||
}: SidebarProps) {
|
||||
const query = searchQuery.trim().toLowerCase()
|
||||
@@ -65,6 +67,15 @@ export function Sidebar({
|
||||
</svg>
|
||||
Browse rooms
|
||||
</button>
|
||||
<button type="button" className="sidebar-entry" onClick={onOpenPeople}>
|
||||
<svg width="15" height="15" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.6" aria-hidden="true">
|
||||
<circle cx="7" cy="6.5" r="3" />
|
||||
<path d="M2 17c0-3 2.5-5 5-5s5 2 5 5" strokeLinecap="round" />
|
||||
<circle cx="14.5" cy="7.5" r="2.3" />
|
||||
<path d="M12.7 12.3c2-.3 4 1.2 4.8 3.7" strokeLinecap="round" />
|
||||
</svg>
|
||||
People
|
||||
</button>
|
||||
|
||||
{unavailableOffline ? (
|
||||
<p className="sidebar-offline-note">
|
||||
|
||||
Reference in New Issue
Block a user