diff options
| author | metamuffin <metamuffin@disroot.org> | 2023-06-11 10:06:40 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2023-06-11 10:06:40 +0200 | 
| commit | 5d1cd6a466ea7d9e702b76899170a4b39ab7138f (patch) | |
| tree | fea3ee515fcf098607c8a221c8442c8e8144be17 /client-web/public/start.html | |
| parent | ab1c3b39a1077b3f4bad75c6a0722c850d06d409 (diff) | |
| download | keks-meet-5d1cd6a466ea7d9e702b76899170a4b39ab7138f.tar keks-meet-5d1cd6a466ea7d9e702b76899170a4b39ab7138f.tar.bz2 keks-meet-5d1cd6a466ea7d9e702b76899170a4b39ab7138f.tar.zst | |
made the start page more intuitive
Diffstat (limited to 'client-web/public/start.html')
| -rw-r--r-- | client-web/public/start.html | 29 | 
1 files changed, 15 insertions, 14 deletions
| diff --git a/client-web/public/start.html b/client-web/public/start.html index 7a1885c..68ede54 100644 --- a/client-web/public/start.html +++ b/client-web/public/start.html @@ -13,37 +13,38 @@              <p class="description">A simple secure conferencing application using webrtc</p>              <br>              <p> -                keks-meet is free software! It is licenced under the terms of -                the third version of the GNU Affero General Public Licence only. -            </p> -            <p>                  To get started, click 'Join' and share the URL with your                  partner. You can also optionally customize the URL by entering a                  <b>secure/unguessable(!!!)</b> identifier below.              </p> +            <p> +                keks-meet is free software! It is licenced under the terms of +                the third version of the GNU Affero General Public Licence only. +            </p>              <noscript>                  keks-meet needs evil javascript to be enabled. Don't be afraid                  though, all the code is free (AGPL-3.0-only)! Look at it on                  <a href="https://codeberg.org/metamuffin/keks-meet">codeberg</a>              </noscript>              <script> +                function random_room() { +                    const random = window.crypto.getRandomValues(new Uint8Array(32)); +                    return Array.from(random) +                        .map((b) => b.toString(16).padStart(2, "0")) +                        .join(""); +                } +                  const room_input = document.createElement("input");                  room_input.type = "text";                  room_input.id = "room-id-input"; -                room_input.placeholder = "Room Secret"; +                room_input.placeholder = `Override room name: ${random_room()}`;                  room_input.ariaLabel = "Room Secret"                  const submit = document.createElement("input");                  submit.type = "button";                  function go() { -                    if (room_input.value.length == 0) { -                        const random = window.crypto.getRandomValues( -                            new Uint8Array(32) -                        ); -                        room_input.value = Array.from(random) -                            .map((b) => b.toString(16).padStart(2, "0")) -                            .join(""); -                    } +                    if (room_input.value.length == "") +                        room_input.value = random_room();                      const url = `/room#${encodeURIComponent(room_input.value)}`;                      window.location.href = url;                  } @@ -53,7 +54,7 @@                  room_input.addEventListener("keydown", (ev) => {                      if (ev.code == "Enter") go();                  }); -                submit.value = "Join room!"; +                submit.value = "Create/Join room!";                  document                      .querySelector("div.start-box") | 
