add hub get logic and part of client

This commit is contained in:
2026-04-28 21:22:33 +02:00
parent a49f9f4615
commit 221fb47495
24 changed files with 1788 additions and 22 deletions
+28
View File
@@ -0,0 +1,28 @@
import { useApp } from '../context/AppContext'
import { colorToCss } from '../utils/color'
export default function UserBar() {
const { state } = useApp()
const user = state.currentUser
return (
<div className="flex items-center gap-2 px-3 py-3 border-t border-gray-700/60 bg-gray-900/80">
<div
className="w-8 h-8 rounded-full flex items-center justify-center text-white text-sm font-semibold shrink-0"
style={{ backgroundColor: colorToCss(user?.color) }}
>
{user?.name?.[0]?.toUpperCase() ?? '?'}
</div>
<span className="text-sm font-medium text-gray-200 truncate flex-1">
{user?.name ?? '…'}
</span>
<button
title="Settings (coming soon)"
disabled
className="text-gray-600 cursor-not-allowed text-base px-1"
>
</button>
</div>
)
}