Add Browsers (browser management) to cloud app (#3549)

This commit is contained in:
Jonathan Dobson
2025-09-29 14:05:30 -04:00
committed by GitHub
parent f2d32da914
commit e04f81fcda
11 changed files with 687 additions and 119 deletions

View File

@@ -108,7 +108,7 @@ interface Dom {
splitLeft: MutableRefObject<HTMLInputElement | null>;
}
function CopyText({ text }: { text: string }) {
function CopyText({ className, text }: { className?: string; text: string }) {
const [wasCopied, setWasCopied] = useState(false);
function handleCopy(code: string) {
@@ -118,7 +118,15 @@ function CopyText({ text }: { text: string }) {
}
return (
<Button size="icon" variant="link" onClick={() => handleCopy(text)}>
<Button
className={className}
size="icon"
variant="link"
onClick={(e) => {
e.stopPropagation();
handleCopy(text);
}}
>
{wasCopied ? <CheckIcon /> : <CopyIcon />}
</Button>
);

View File

@@ -0,0 +1,20 @@
interface BrowserSession {
browser_address: string | null;
browser_session_id: string;
completed_at: string | null;
recordings: Recording[];
runnable_id: string | null;
runnable_type: string | null;
started_at: string | null;
timeout: number | null;
vnc_streaming_supported: boolean;
}
interface Recording {
url: string;
checksum: string;
filename: string;
modified_at: string;
}
export { type BrowserSession, type Recording };