Paillasse/portail/resources/views/rejoindre/attente.blade.php

22 lines
985 B
PHP
Raw Normal View History

@extends('layouts.vitrine')
@section('titre', 'Demande envoyée')
@section('contenu')
<div class="mx-auto max-w-xl px-5 py-20 text-center lg:px-10">
<p class="font-mono text-sm font-semibold">{{ $demande->classe->nom }}</p>
<h1 class="mt-2 text-4xl font-extrabold tracking-tight">Demande envoyée, {{ $demande->prenom }} !</h1>
<p class="mt-4 text-lg font-semibold">Attends que ton prof l'accepte. Garde cette page ouverte : ton identifiant et ton code s'afficheront ici.</p>
</div>
<script nonce="{{ Vite::cspNonce() }}">
(function () {
setInterval(function () {
fetch('{{ route('rejoindre.etat') }}', { headers: { 'Accept': 'application/json' } })
.then(function (r) { return r.json(); })
.then(function (d) { if (d.statut !== 'en_attente') location.reload(); })
.catch(function () {});
}, 2000);
})();
</script>
@endsection