mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 10:00:46 -04:00
kjfehkds
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-BiETXuiL.js"></script>
|
<script type="module" crossorigin src="/assets/index-DaLcEoUf.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BHswGLE7.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-CDl278eW.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ 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, fillParent = false }) {
|
export default function ChatPanel({ hideInput = false, hideSpectatorNotice = false }) {
|
||||||
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('');
|
||||||
@@ -57,12 +57,10 @@ export default function ChatPanel({ hideInput = false, hideSpectatorNotice = fal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const listClass = fillParent
|
const listClass = 'h-48';
|
||||||
? 'flex-1 min-h-[8rem]'
|
|
||||||
: 'h-48';
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={`panel-section ${fillParent ? 'flex h-full flex-col overflow-hidden' : ''} space-y-0.5 text-base`}>
|
<section className="panel-section space-y-0.5 text-base">
|
||||||
<div className={`surface overflow-y-auto space-y-0.25 ${listClass}`} ref={listRef}>
|
<div className={`surface overflow-y-auto space-y-0.25 ${listClass}`} ref={listRef}>
|
||||||
{sorted.length === 0 ? (
|
{sorted.length === 0 ? (
|
||||||
<p className="text-sm text-slate-500">No messages yet.</p>
|
<p className="text-sm text-slate-500">No messages yet.</p>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ function formatLabel(user, selfId) {
|
|||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function UserListPanel({ hideNicknameForm = false, hideHeader = false, className = '', fillParent = false }) {
|
export default function UserListPanel({ hideNicknameForm = false, hideHeader = false, className = '' }) {
|
||||||
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);
|
||||||
@@ -91,12 +91,10 @@ export default function UserListPanel({ hideNicknameForm = false, hideHeader = f
|
|||||||
return Math.ceil(ms / 1000);
|
return Math.ceil(ms / 1000);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const listClass = fillParent ? 'flex-1 min-h-[8rem]' : 'h-48';
|
const listClass = 'h-48';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section className={`panel-section space-y-0.5 text-base ${className}`}>
|
||||||
className={`panel-section ${fillParent ? 'flex h-full flex-col overflow-hidden' : ''} space-y-0.5 text-base ${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 h-[50vh] flex-col">
|
<div className="flex h-[50vh] flex-col">
|
||||||
<UserListPanel hideNicknameForm hideHeader fillParent />
|
<UserListPanel hideNicknameForm hideHeader />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-[50vh] flex-col">
|
<div className="flex h-[50vh] flex-col">
|
||||||
<ChatPanel hideInput hideSpectatorNotice fillParent />
|
<ChatPanel hideInput hideSpectatorNotice />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user