Add meetings panel to the rooms page, add checkbox for marking for autojoin

This commit is contained in:
blankhex committed 2026-10-24 19:09:00 +03:00
1 parent e9ad57524e
commit f5f389f5d3
6 files changed
+101 -7

No files matched your search

+12
View File
@@ -17,6 +17,9 @@ export default function PlanMeetingPage({ onCreated, onCancel }) {
const [room, setRoom] = useState('')
// Prefill with the current date/time so the field is never empty by default.
const [scheduledAt, setScheduledAt] = useState(() => toLocalInputValue(new Date()))
// When checked the author is recorded as joining straight away. Checked by
// default, since planning a meeting usually means you intend to attend.
const [autoJoin, setAutoJoin] = useState(true)
const [saving, setSaving] = useState(false)
const [error, setError] = useState('')
@@ -38,6 +41,7 @@ export default function PlanMeetingPage({ onCreated, onCancel }) {
// datetime-local is local time; toISOString() produces the RFC3339 UTC
// instant the backend expects.
scheduledAt: new Date(scheduledAt).toISOString(),
autoJoin,
})
onCreated?.()
} catch (err) {
@@ -90,6 +94,14 @@ export default function PlanMeetingPage({ onCreated, onCancel }) {
onChange={(e) => setScheduledAt(e.target.value)}
/>
</label>
<label className="checkbox">
<input
type="checkbox"
checked={autoJoin}
onChange={(e) => setAutoJoin(e.target.checked)}
/>
I will join this meeting
</label>
<button className="btn-primary" type="submit" disabled={saving}>
{saving ? 'Creating…' : 'Create meeting'}
</button>