mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 10:00:46 -04:00
wuhm
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -11,8 +11,8 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||||
<title>Multi Roomba Rover</title>
|
<title>Multi Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-BEgkv8eh.js"></script>
|
<script type="module" crossorigin src="/assets/index-CxK7Tp9p.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-CZGlqUdQ.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DACGQIM5.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -25,7 +25,12 @@ function displayName(message) {
|
|||||||
return message.nickname || message.socketId?.slice(0, 6) || 'unknown';
|
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 { session } = useSession();
|
||||||
const { messages, sendMessage, registerInputRef, onInputFocus, onInputBlur, blurChat } = useChat();
|
const { messages, sendMessage, registerInputRef, onInputFocus, onInputBlur, blurChat } = useChat();
|
||||||
const [draft, setDraft] = useState('');
|
const [draft, setDraft] = useState('');
|
||||||
@@ -58,7 +63,9 @@ export default function ChatPanel({ hideInput = false, hideSpectatorNotice = fal
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
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">
|
{/* <div className="flex items-center justify-between text-sm text-slate-400">
|
||||||
<span>Chat</span>
|
<span>Chat</span>
|
||||||
<span className="text-xs text-slate-500">{sorted.length}</span>
|
<span className="text-xs text-slate-500">{sorted.length}</span>
|
||||||
|
|||||||
@@ -26,7 +26,12 @@ function formatLabel(user, selfId) {
|
|||||||
return base;
|
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 { session, setNickname } = useSession();
|
||||||
const { value } = useSettingsNamespace('profile', { nickname: '' });
|
const { value } = useSettingsNamespace('profile', { nickname: '' });
|
||||||
const lastSyncedSocketRef = useRef(null);
|
const lastSyncedSocketRef = useRef(null);
|
||||||
@@ -92,7 +97,9 @@ export default function UserListPanel({ hideNicknameForm = false, hideHeader = f
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
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 && (
|
{!hideNicknameForm && (
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<NicknameForm />
|
<NicknameForm />
|
||||||
|
|||||||
@@ -89,10 +89,10 @@ function SecondaryRow() {
|
|||||||
<section className="grid grid-cols-1 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 />
|
<RoomCameraPanel defaultOrientation="horizontal" hideLayoutToggle hideHeader />
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<UserListPanel hideNicknameForm hideHeader className="h-full max-h-[50vh]" />
|
<UserListPanel hideNicknameForm hideHeader heightClass="h-[50vh]" />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<ChatPanel hideInput hideSpectatorNotice maxHeightClass="max-h-[50vh]" />
|
<ChatPanel hideInput hideSpectatorNotice heightClass="h-[50vh]" />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user