From 99be687bf746e71940e1338edfd5126d838174ce Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Tue, 24 Jan 2023 17:40:47 +0100 Subject: [PATCH 1/6] Add Czech instructions. Thank you https://github.com/slrslr --- sites/+instructions/Czech.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sites/+instructions/Czech.txt diff --git a/sites/+instructions/Czech.txt b/sites/+instructions/Czech.txt new file mode 100644 index 0000000..4f05c58 --- /dev/null +++ b/sites/+instructions/Czech.txt @@ -0,0 +1,11 @@ +Na mobilu: + +- Klikněte na tlačítko Copy v kolonce Join URL. +- Otevřete Session, klepněte na tlačítko plus a vyberte "Připojit se ke komunitě". +- Klepněte na pole "Zadejte adresu komunity", vložte adresu zkopírovanou v prvním kroku a klepněte na "Připojit se". + +Na mobilu při prohlížení této stránky na stolním PC: + +- Na PC Klikněte na tlačítko QR kódu u vámi vybrané komunity. +- Otevřete Session, klepněte na tlačítko plus a vyberte "Připojit se ke komunitě". +- Vyberte "Skenovat QR kód" v horní části a namiřte kameru telefonu na QR kód. From a074737716351a23e0888fd404d185f1d3c44ead Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Thu, 26 Jan 2023 14:51:09 +0100 Subject: [PATCH 2/6] Use native invite.png QR --- sites/+components/qr_modals.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/sites/+components/qr_modals.php b/sites/+components/qr_modals.php index 909d0cf..2652747 100644 --- a/sites/+components/qr_modals.php +++ b/sites/+components/qr_modals.php @@ -4,7 +4,26 @@ return "$QR_CODES/$room_id.png"; } - /* + /* + * Takes join URL and derives the invite.png path from it + */ + function room_qr_code_native($join_url) { + // Ex.: https://open.getsession.org/session?public_key=[...] + // Goal: https://open.getsession.org/r/session/invite.png + // Note: No @legacy support (Ex.: https://reccacon.com/view/Ukraine/invite.png) + // TODO: How does this behave with unreliable connections to Chinese servers? + $exploded = explode("/", explode("?", $join_url)[0]); // everything before "?" + $png_url = + $exploded[0] . "//" . // https:// + $exploded[2] . "/r/" . // open.getsession.org/r/ + $exploded[3] . "/invite.png"; // session/invite.png + +// fwrite(STDERR, "PNG URL: " . $png_url . PHP_EOL); + return $png_url; + } + + /* + * @Deprecated * Use Google API to generate QR codes and encode them as base64 */ function base64_qr_code($room_id, $join_url, $size = "512x512") { @@ -37,10 +56,20 @@ × + + Community join link encoded as QR code From f9923e445c42ffff4f2a568926cbafa8a08920b1 Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Thu, 26 Jan 2023 14:52:54 +0100 Subject: [PATCH 3/6] Add @Deprecated --- sites/+components/qr_modals.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sites/+components/qr_modals.php b/sites/+components/qr_modals.php index 2652747..8a3e2d5 100644 --- a/sites/+components/qr_modals.php +++ b/sites/+components/qr_modals.php @@ -1,4 +1,7 @@ Date: Thu, 26 Jan 2023 14:56:52 +0100 Subject: [PATCH 4/6] Do not create qr-codes folder anymore --- sites/+components/qr_modals.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/+components/qr_modals.php b/sites/+components/qr_modals.php index 8a3e2d5..eb9d569 100644 --- a/sites/+components/qr_modals.php +++ b/sites/+components/qr_modals.php @@ -50,7 +50,7 @@ return base64_encode($png); } - file_exists($QR_CODES) or mkdir($QR_CODES, 0700); + // file_exists($QR_CODES) or mkdir($QR_CODES, 0700); // @Deprecated ?> $room): ?> From 435bef450635393987c41ba599a641776227e7f4 Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Thu, 26 Jan 2023 15:02:31 +0100 Subject: [PATCH 5/6] Remove 'defer' from module script tag, invalid html --- sites/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/index.php b/sites/index.php index 2555bb8..8fed158 100644 --- a/sites/index.php +++ b/sites/index.php @@ -14,7 +14,7 @@ - + Self-updating list of active Session communities From 4621c9de3810dfd631a1fad8216adbce26b1d8ed Mon Sep 17 00:00:00 2001 From: mdPlusPlus Date: Thu, 26 Jan 2023 15:30:57 +0100 Subject: [PATCH 6/6] Make .protocol-indicator a little more rounded --- output/styles2.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/styles2.css b/output/styles2.css index 40b4309..68a710b 100644 --- a/output/styles2.css +++ b/output/styles2.css @@ -72,7 +72,7 @@ footer nav a { .protocol-indicator { display: inline-block; font-family: monospace; - border-radius: 3px; + border-radius: 4px; width: 6ch; line-height: 22px; text-align: center;