diff options
author | metamuffin <metamuffin@disroot.org> | 2022-09-09 12:45:37 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-09-09 12:45:37 +0200 |
commit | e590ea788aefe0714bb9ce24976303566a648d42 (patch) | |
tree | d6b3d827512af388fe0ea4f2ac1c2f1fc983178a /client-web/public | |
parent | b25bbae82f9bfaf6f37dfb16e07708060dd3df55 (diff) | |
download | keks-meet-e590ea788aefe0714bb9ce24976303566a648d42.tar keks-meet-e590ea788aefe0714bb9ce24976303566a648d42.tar.bz2 keks-meet-e590ea788aefe0714bb9ce24976303566a648d42.tar.zst |
reworked websocket stuff with encryption and new spec
Diffstat (limited to 'client-web/public')
-rw-r--r-- | client-web/public/app.html | 32 | ||||
-rw-r--r-- | client-web/public/assets/style/master.css | 4 | ||||
-rw-r--r-- | client-web/public/start.html | 24 |
3 files changed, 34 insertions, 26 deletions
diff --git a/client-web/public/app.html b/client-web/public/app.html index 493796f..693e9a2 100644 --- a/client-web/public/app.html +++ b/client-web/public/app.html @@ -1,20 +1,24 @@ <!DOCTYPE html> <html lang="en"> - <head> - <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <script defer async type="module" src="/_assets/bundle.js"></script> - <link rel="stylesheet" href="/_assets/style/master.css" /> + <script defer async type="module" src="/assets/bundle.js"></script> + <link rel="stylesheet" href="/assets/style/master.css" /> - <title>keks-meet</title> - </head> + <title>keks-meet</title> + </head> - <body> - <p> - 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> - </p> - </body> + <body> + <p> + 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> + </p> + <p> + If you have JS enabled, check the browser console to see if + something else failed + </p> + </body> </html> diff --git a/client-web/public/assets/style/master.css b/client-web/public/assets/style/master.css index 0b9e205..8a22d1b 100644 --- a/client-web/public/assets/style/master.css +++ b/client-web/public/assets/style/master.css @@ -10,8 +10,8 @@ } :root { - --bg: #263238; - --bg-dark: #000a12; + --bg: #212121; + --bg-dark: #070707; --bg-light: #354b58; --bg-lighter: #4f5b62; --bg-disabled: #720000; diff --git a/client-web/public/start.html b/client-web/public/start.html index 4a04174..db62bcf 100644 --- a/client-web/public/start.html +++ b/client-web/public/start.html @@ -18,8 +18,9 @@ the third version of the GNU Affero General Public Licence only. </p> <p> - To get started, just enter a unique idenfier, click 'Join', then - share the URL with your partner. + 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> <noscript> keks-meet needs evil javascript to be enabled. Don't be afraid @@ -30,18 +31,21 @@ const room_input = document.createElement("input"); room_input.type = "text"; room_input.id = "room-id-input"; - room_input.placeholder = "Room ID (leave blank for random id)"; + room_input.placeholder = "Room ID"; const submit = document.createElement("input"); submit.type = "button"; submit.addEventListener("click", () => { - if (room_input.value.length == 0) - room_input.value = Math.floor(Math.random() * 0x100000) - .toString(16) - .padStart(5, "0"); - window.location.pathname = `/${encodeURIComponent( - room_input.value - )}`; + 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(""); + } + const url = `/room#${encodeURIComponent(room_input.value)}`; + window.location.href = url; }); submit.value = "Join room!"; |