Gateway page: live-page instructions (layout, audio, rename, group names, maximise); portal: maximise button per tab bar

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 14:17:30 -06:00
parent d5b2ba502b
commit b2e7e9a4bb
4 changed files with 32 additions and 1 deletions

16
live/src/GroupActions.jsx Normal file
View File

@@ -0,0 +1,16 @@
import React, { useEffect, useState } from 'react'
// Right end of every tab bar: maximise / restore this group.
export default function GroupActions({ api, containerApi }) {
const [max, setMax] = useState(() => api.isMaximized())
useEffect(() => {
const d = containerApi.onDidMaximizedGroupChange?.(() => setMax(api.isMaximized()))
return () => d?.dispose?.()
}, [api, containerApi])
const toggle = e => { e.stopPropagation(); if (api.isMaximized()) api.exitMaximized(); else api.maximize(); setMax(api.isMaximized()) }
return (
<div className="groupactions" onPointerDown={e => e.stopPropagation()}>
<button className="gbtn" onClick={toggle} title={max ? 'restore' : 'maximise this window'}>{max ? '🗗' : '⛶'}</button>
</div>
)
}