This commit is contained in:
legop3
2025-11-24 03:04:34 -05:00
parent 00f31efc3d
commit 1e788be509
7 changed files with 30 additions and 16 deletions
+9 -2
View File
@@ -25,7 +25,12 @@ function displayName(message) {
return message.nickname || message.socketId?.slice(0, 6) || 'unknown';
}
export default function ChatPanel({ hideInput = false, hideSpectatorNotice = false, maxHeightClass = '' }) {
export default function ChatPanel({
hideInput = false,
hideSpectatorNotice = false,
maxHeightClass = '',
heightClass = '',
}) {
const { session } = useSession();
const { messages, sendMessage, registerInputRef, onInputFocus, onInputBlur, blurChat } = useChat();
const [draft, setDraft] = useState('');
@@ -58,7 +63,9 @@ export default function ChatPanel({ hideInput = false, hideSpectatorNotice = fal
}
return (
<section className={`panel-section flex h-full flex-col space-y-0.5 overflow-hidden text-base ${maxHeightClass}`}>
<section
className={`panel-section flex flex-col space-y-0.5 overflow-hidden text-base ${heightClass} ${maxHeightClass}`}
>
{/* <div className="flex items-center justify-between text-sm text-slate-400">
<span>Chat</span>
<span className="text-xs text-slate-500">{sorted.length}</span>
+9 -2
View File
@@ -26,7 +26,12 @@ function formatLabel(user, selfId) {
return base;
}
export default function UserListPanel({ hideNicknameForm = false, hideHeader = false, className = '' }) {
export default function UserListPanel({
hideNicknameForm = false,
hideHeader = false,
className = '',
heightClass = '',
}) {
const { session, setNickname } = useSession();
const { value } = useSettingsNamespace('profile', { nickname: '' });
const lastSyncedSocketRef = useRef(null);
@@ -92,7 +97,9 @@ export default function UserListPanel({ hideNicknameForm = false, hideHeader = f
}, []);
return (
<section className={`panel-section flex h-full flex-col space-y-0.5 overflow-hidden text-base ${className}`}>
<section
className={`panel-section flex flex-col space-y-0.5 overflow-hidden text-base ${heightClass} ${className}`}
>
{!hideNicknameForm && (
<div className="space-y-0.5">
<NicknameForm />