From 70a20666699704ab4b1b826874e4c8b4fd16d5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Tue, 25 Jun 2024 01:38:02 +0200 Subject: [PATCH] Chybova stranka pro neprihlasene --- VERSION | 2 +- lib/SeMeet.pm | 1 + templates/index.html.ep | 4 +--- templates/unauthorized.html.ep | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 templates/unauthorized.html.ep diff --git a/VERSION b/VERSION index 54d1a4f..a803cc2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.13.0 +0.14.0 diff --git a/lib/SeMeet.pm b/lib/SeMeet.pm index 6d5e8db..b20a5a6 100644 --- a/lib/SeMeet.pm +++ b/lib/SeMeet.pm @@ -134,6 +134,7 @@ sub startup( $self ) { $r->get('/')->to(cb => sub { shift->render('index'); }); $r->get('/meets/:id')->requires(authenticated => 1)->to('Meets#meet'); + $r->get('/meets/:id')->to(cb => sub { shift->render('unauthorized'); }); $r->get('/guest/:token')->to('Invites#meet'); $r->websocket('/ws')->to('Websockets#main'); diff --git a/templates/index.html.ep b/templates/index.html.ep index 7757df4..422f6ed 100644 --- a/templates/index.html.ep +++ b/templates/index.html.ep @@ -9,9 +9,7 @@ </div> <div> -<h1 class="head-alt-xl">Opravdu bezpeÄŤnĂ˝ jitsi</h1> -<h1 class="head-alt-xl text-blue-300">VĹľdy vĂš kdo tÄ› poslouchá</h1> -<h1 class="head-alt-xl text-green-400">ŽádnĂ náhodnĂ moderatoĹ™i</h1> +<h1 class="head-alt-xl">BezpeÄŤnĂ˝ jitsi jenom pro ověřenĂ© účastnĂky</h1> <h1 class="head-alt-lg text-red-600 pt-10">TestovacĂ provoz</h1> </div> </div> diff --git a/templates/unauthorized.html.ep b/templates/unauthorized.html.ep new file mode 100644 index 0000000..95dd640 --- /dev/null +++ b/templates/unauthorized.html.ep @@ -0,0 +1,14 @@ +% layout 'default'; + +<h1 class="head-alt-xl">AktuálnÄ› nemáte oprávnÄ›nĂ pro pĹ™Ăstup do tĂ©to mĂstnosti</h1> + +<a href="<%= oidc->authorize %>"> +<button class="btn btn--icon btn--grey-125 btn--hoveractive"> + <div class="btn__body-wrap"> + <div class="btn__body">PĹ™ihlásit se</div> + <div class="btn__icon"> + <i class="ico--pirati"></i> + </div> + </div> +</button> +</a> -- GitLab