mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
give up lol
This commit is contained in:
@@ -25,12 +25,7 @@ function displayName(message) {
|
||||
return message.nickname || message.socketId?.slice(0, 6) || 'unknown';
|
||||
}
|
||||
|
||||
export default function ChatPanel({
|
||||
hideInput = false,
|
||||
hideSpectatorNotice = false,
|
||||
maxHeightClass = '',
|
||||
heightClass = '',
|
||||
}) {
|
||||
export default function ChatPanel({ hideInput = false, hideSpectatorNotice = false }) {
|
||||
const { session } = useSession();
|
||||
const { messages, sendMessage, registerInputRef, onInputFocus, onInputBlur, blurChat } = useChat();
|
||||
const [draft, setDraft] = useState('');
|
||||
@@ -63,14 +58,12 @@ export default function ChatPanel({
|
||||
}
|
||||
|
||||
return (
|
||||
<section
|
||||
className={`panel-section flex flex-col space-y-0.5 overflow-hidden text-base ${heightClass} ${maxHeightClass}`}
|
||||
>
|
||||
<section className="panel-section space-y-0.5 text-base">
|
||||
{/* <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>
|
||||
</div> */}
|
||||
<div className="surface flex-1 overflow-y-auto space-y-0.25" ref={listRef}>
|
||||
<div className="surface h-48 overflow-y-auto space-y-0.25" ref={listRef}>
|
||||
{sorted.length === 0 ? (
|
||||
<p className="text-sm text-slate-500">No messages yet.</p>
|
||||
) : (
|
||||
|
||||
@@ -26,12 +26,7 @@ function formatLabel(user, selfId) {
|
||||
return base;
|
||||
}
|
||||
|
||||
export default function UserListPanel({
|
||||
hideNicknameForm = false,
|
||||
hideHeader = false,
|
||||
className = '',
|
||||
heightClass = '',
|
||||
}) {
|
||||
export default function UserListPanel({ hideNicknameForm = false, hideHeader = false, className = '' }) {
|
||||
const { session, setNickname } = useSession();
|
||||
const { value } = useSettingsNamespace('profile', { nickname: '' });
|
||||
const lastSyncedSocketRef = useRef(null);
|
||||
@@ -97,9 +92,7 @@ export default function UserListPanel({
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<section
|
||||
className={`panel-section flex flex-col space-y-0.5 overflow-hidden text-base ${heightClass} ${className}`}
|
||||
>
|
||||
<section className={`panel-section space-y-0.5 text-base ${className}`}>
|
||||
{!hideNicknameForm && (
|
||||
<div className="space-y-0.5">
|
||||
<NicknameForm />
|
||||
@@ -116,7 +109,7 @@ export default function UserListPanel({
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="surface flex-1 min-h-[12rem] overflow-y-auto space-y-0.25">
|
||||
<div className="surface h-48 overflow-y-auto space-y-0.25">
|
||||
{isTurnsMode ? (
|
||||
Object.keys(turnQueues || {}).length === 0 ? (
|
||||
<p className="text-sm text-slate-500">No turn queues yet.</p>
|
||||
|
||||
@@ -86,13 +86,13 @@ function RoverRow({ roster, frames, videoSources, session }) {
|
||||
|
||||
function SecondaryRow() {
|
||||
return (
|
||||
<section className="grid grid-cols-1 items-start gap-0.5 lg:grid-cols-[2fr_1fr_1fr]">
|
||||
<section className="grid grid-cols-1 gap-0.5 lg:grid-cols-[2fr_1fr_1fr]">
|
||||
<RoomCameraPanel defaultOrientation="horizontal" hideLayoutToggle hideHeader />
|
||||
<div className="flex flex-col self-start">
|
||||
<UserListPanel hideNicknameForm hideHeader heightClass="h-[40vh]" />
|
||||
<div className="flex flex-col">
|
||||
<UserListPanel hideNicknameForm hideHeader />
|
||||
</div>
|
||||
<div className="flex flex-col self-start">
|
||||
<ChatPanel hideInput hideSpectatorNotice heightClass="h-[40vh]" />
|
||||
<div className="flex flex-col">
|
||||
<ChatPanel hideInput hideSpectatorNotice />
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user