Don't show guestWaitingMessage when "anyone_can_start" is set
All checks were successful
Build & Push Docker Image / build (push) Successful in 4m14s

This commit is contained in:
2026-03-25 10:13:02 +01:00
parent 6dcb1e959b
commit 45be976de1

View File

@@ -89,7 +89,7 @@ export default function GuestJoin() {
// Auto-join when meeting starts while waiting // Auto-join when meeting starts while waiting
useEffect(() => { useEffect(() => {
if (!prevRunningRef.current && status.running && waiting) { if (!prevRunningRef.current && status.running && waiting) {
new Audio('/sounds/meeting-started.mp3').play().catch(() => {}); new Audio('/sounds/meeting-started.mp3').play().catch(() => { });
toast.success(t('room.guestMeetingStartedJoining')); toast.success(t('room.guestMeetingStartedJoining'));
joinMeeting(); joinMeeting();
} }
@@ -210,97 +210,97 @@ export default function GuestJoin() {
)} )}
</div> </div>
) : ( ) : (
<form onSubmit={handleJoin} className="space-y-4"> <form onSubmit={handleJoin} className="space-y-4">
<div>
<label className="block text-sm font-medium text-th-text mb-1.5">{t('room.guestYourName')} *</label>
<div className="relative">
<User size={18} className="absolute left-3.5 top-1/2 -translate-y-1/2 text-th-text-s" />
<input
type="text"
value={name}
onChange={e => !isLoggedIn && setName(e.target.value)}
readOnly={isLoggedIn}
className={`input-field pl-11 ${isLoggedIn ? 'opacity-70 cursor-not-allowed' : ''}`}
placeholder={t('room.guestNamePlaceholder')}
required
autoFocus={!isLoggedIn}
/>
</div>
</div>
{roomInfo.has_access_code && (
<div> <div>
<label className="block text-sm font-medium text-th-text mb-1.5">{t('room.guestAccessCode')}</label> <label className="block text-sm font-medium text-th-text mb-1.5">{t('room.guestYourName')} *</label>
<div className="relative"> <div className="relative">
<Lock size={18} className="absolute left-3.5 top-1/2 -translate-y-1/2 text-th-text-s" /> <User size={18} className="absolute left-3.5 top-1/2 -translate-y-1/2 text-th-text-s" />
<input <input
type="text" type="text"
value={accessCode} value={name}
onChange={e => setAccessCode(e.target.value)} onChange={e => !isLoggedIn && setName(e.target.value)}
className="input-field pl-11" readOnly={isLoggedIn}
placeholder={t('room.guestAccessCodePlaceholder')} className={`input-field pl-11 ${isLoggedIn ? 'opacity-70 cursor-not-allowed' : ''}`}
placeholder={t('room.guestNamePlaceholder')}
required
autoFocus={!isLoggedIn}
/> />
</div> </div>
</div> </div>
)}
<div> {roomInfo.has_access_code && (
<label className="block text-sm font-medium text-th-text mb-1.5"> <div>
{t('room.guestModeratorCode')} <label className="block text-sm font-medium text-th-text mb-1.5">{t('room.guestAccessCode')}</label>
<span className="text-th-text-s font-normal ml-1">{t('room.guestModeratorOptional')}</span> <div className="relative">
</label> <Lock size={18} className="absolute left-3.5 top-1/2 -translate-y-1/2 text-th-text-s" />
<div className="relative"> <input
<Shield size={18} className="absolute left-3.5 top-1/2 -translate-y-1/2 text-th-text-s" /> type="text"
<input value={accessCode}
type="text" onChange={e => setAccessCode(e.target.value)}
value={moderatorCode} className="input-field pl-11"
onChange={e => setModeratorCode(e.target.value)} placeholder={t('room.guestAccessCodePlaceholder')}
className="input-field pl-11" />
placeholder={t('room.guestModeratorPlaceholder')} </div>
/>
</div>
</div>
{/* Recording consent notice */}
{roomInfo.allow_recording && (
<div className="rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 space-y-3">
<div className="flex items-start gap-2">
<AlertCircle size={16} className="text-amber-500 flex-shrink-0 mt-0.5" />
<p className="text-sm text-amber-400">{t('room.guestRecordingNotice')}</p>
</div> </div>
<label className="flex items-center gap-2.5 cursor-pointer">
<input
type="checkbox"
checked={recordingConsent}
onChange={e => setRecordingConsent(e.target.checked)}
className="w-4 h-4 rounded accent-amber-500 cursor-pointer"
/>
<span className="text-sm text-th-text">{t('room.guestRecordingConsent')}</span>
</label>
</div>
)}
<button
type="submit"
disabled={joining || (roomInfo.allow_recording && !recordingConsent)}
className="btn-primary w-full py-3"
>
{joining ? (
<Loader2 size={18} className="animate-spin" />
) : (
<>
{t('room.guestJoinButton')}
<ArrowRight size={18} />
</>
)} )}
</button>
{!status.running && ( <div>
<p className="text-xs text-th-text-s text-center"> <label className="block text-sm font-medium text-th-text mb-1.5">
{t('room.guestWaitingMessage')} {t('room.guestModeratorCode')}
</p> <span className="text-th-text-s font-normal ml-1">{t('room.guestModeratorOptional')}</span>
)} </label>
</form> <div className="relative">
<Shield size={18} className="absolute left-3.5 top-1/2 -translate-y-1/2 text-th-text-s" />
<input
type="text"
value={moderatorCode}
onChange={e => setModeratorCode(e.target.value)}
className="input-field pl-11"
placeholder={t('room.guestModeratorPlaceholder')}
/>
</div>
</div>
{/* Recording consent notice */}
{roomInfo.allow_recording && (
<div className="rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 space-y-3">
<div className="flex items-start gap-2">
<AlertCircle size={16} className="text-amber-500 flex-shrink-0 mt-0.5" />
<p className="text-sm text-amber-400">{t('room.guestRecordingNotice')}</p>
</div>
<label className="flex items-center gap-2.5 cursor-pointer">
<input
type="checkbox"
checked={recordingConsent}
onChange={e => setRecordingConsent(e.target.checked)}
className="w-4 h-4 rounded accent-amber-500 cursor-pointer"
/>
<span className="text-sm text-th-text">{t('room.guestRecordingConsent')}</span>
</label>
</div>
)}
<button
type="submit"
disabled={joining || (roomInfo.allow_recording && !recordingConsent)}
className="btn-primary w-full py-3"
>
{joining ? (
<Loader2 size={18} className="animate-spin" />
) : (
<>
{t('room.guestJoinButton')}
<ArrowRight size={18} />
</>
)}
</button>
{!status.running && !roomInfo?.anyone_can_start && (
<p className="text-xs text-th-text-s text-center">
{t('room.guestWaitingMessage')}
</p>
)}
</form>
)} )}
{!isLoggedIn && ( {!isLoggedIn && (