Add kiosk join/leave pages, waiting room, and meeting feedback.
Deploy Ladill Meet / deploy (push) Successful in 47s
Deploy Ladill Meet / deploy (push) Successful in 47s
Redesign public join flows on the Frontdesk kiosk template, enforce host admission when waiting room is enabled, and collect star ratings after leave. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -39,6 +39,12 @@ class MeetingRoomController extends Controller
|
||||
->where('session_id', $session->id)
|
||||
->firstOrFail();
|
||||
|
||||
if ($participant->status === 'waiting') {
|
||||
return redirect()->route('meet.join.waiting', $session->room);
|
||||
}
|
||||
|
||||
abort_unless($participant->status === 'joined', 403, 'You are not in this meeting.');
|
||||
|
||||
$token = $this->media->isConfigured()
|
||||
? $this->sessions->generateMediaToken($participant)
|
||||
: '';
|
||||
@@ -81,11 +87,18 @@ class MeetingRoomController extends Controller
|
||||
|
||||
if ($participant) {
|
||||
$this->sessions->leaveParticipant($participant);
|
||||
|
||||
$request->session()->put('meet.left.feedback', [
|
||||
'session_uuid' => $session->uuid,
|
||||
'participant_uuid' => $participant->uuid,
|
||||
'display_name' => $participant->display_name,
|
||||
'user_ref' => $participant->user_ref,
|
||||
]);
|
||||
}
|
||||
|
||||
$request->session()->forget("meet.participant.{$session->uuid}");
|
||||
|
||||
return redirect()->route('meet.dashboard');
|
||||
return redirect()->route('meet.left', $session);
|
||||
}
|
||||
|
||||
public function raiseHand(Request $request, Session $session): JsonResponse
|
||||
@@ -145,7 +158,7 @@ class MeetingRoomController extends Controller
|
||||
{
|
||||
$this->currentParticipant($request, $session);
|
||||
|
||||
$session->load(['participants' => fn ($q) => $q->where('status', 'joined')]);
|
||||
$session->load(['participants' => fn ($q) => $q->whereIn('status', ['joined', 'waiting'])]);
|
||||
|
||||
$avatars = ParticipantPresenter::avatarMap($session->participants, $session->room->host_user_ref);
|
||||
|
||||
@@ -167,6 +180,7 @@ class MeetingRoomController extends Controller
|
||||
'participants' => $session->participants->map(
|
||||
fn ($p) => ParticipantPresenter::toArray($p, $avatars, $session->room->host_user_ref)
|
||||
),
|
||||
'waiting_count' => $session->participants->where('status', 'waiting')->count(),
|
||||
'messages' => $messages->map(fn ($m) => [
|
||||
'uuid' => $m->uuid,
|
||||
'sender_name' => $m->sender_name,
|
||||
@@ -271,6 +285,28 @@ class MeetingRoomController extends Controller
|
||||
return response()->json(['ok' => true]);
|
||||
}
|
||||
|
||||
public function admit(Request $request, Session $session, Participant $participant): JsonResponse
|
||||
{
|
||||
$current = $this->currentParticipant($request, $session);
|
||||
abort_unless($current->isHost(), 403);
|
||||
abort_unless($participant->session_id === $session->id, 404);
|
||||
|
||||
$this->sessions->admitParticipant($participant);
|
||||
|
||||
return response()->json(['ok' => true, 'status' => 'joined']);
|
||||
}
|
||||
|
||||
public function deny(Request $request, Session $session, Participant $participant): JsonResponse
|
||||
{
|
||||
$current = $this->currentParticipant($request, $session);
|
||||
abort_unless($current->isHost(), 403);
|
||||
abort_unless($participant->session_id === $session->id, 404);
|
||||
|
||||
$this->sessions->denyParticipant($participant);
|
||||
|
||||
return response()->json(['ok' => true, 'status' => 'removed']);
|
||||
}
|
||||
|
||||
protected function currentParticipant(Request $request, Session $session): Participant
|
||||
{
|
||||
$participantUuid = $request->session()->get("meet.participant.{$session->uuid}");
|
||||
|
||||
Reference in New Issue
Block a user