From 6d714c9a1ea7274911822d345a252771f3c9a87e Mon Sep 17 00:00:00 2001 From: Thomas G <62822072+Thomasluigi07@users.noreply.github.com> Date: Sun, 28 Aug 2022 11:39:36 +1000 Subject: [PATCH] fix --- public/js/main.js | 17 +++++++++++++++++ resources/views/pages/games.blade.php | 8 +++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 43f0440..0799c87 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -4,4 +4,21 @@ function openStudioPopup(placeid) { } function closeStudioPopup() { document.querySelector('.popupcontainer_studio').setAttribute("id", "invisible"); +} +function openClientPopup(ip,port,placefile,mode) { + // launch client + document.querySelector('.popupcontainer_client').removeAttribute('id'); + if (mode == "host") { + // user is hosting, use port and place file + window.location.href = "archblox://host/" + port + "|" + placefile; + } else if (mode == "join") { + // user is joining a game, use ip and port + window.location.href = "archblox://join/" + ip + "|" + port; + } else { + // no information so just use the default + window.location.href = "archblox://"; + } +} +function closeClientPopup() { + document.querySelector('.popupcontainer_client').setAttribute("id", "invisible"); } \ No newline at end of file diff --git a/resources/views/pages/games.blade.php b/resources/views/pages/games.blade.php index 74d26a5..cf8e3cd 100644 --- a/resources/views/pages/games.blade.php +++ b/resources/views/pages/games.blade.php @@ -9,13 +9,15 @@ @endsection +@section('alert') +
Note that this page does not support joining yet. If you would like to join your own game that you are currently hosting, click here.
-