From 8f8da9739320d0145441746d309bd7aa483e9b0c 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 00000000..4f05c586 --- /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 77fa6ceae3e5e7f9364a8d611d0e91fb24cc5814 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 909d0cf0..26527476 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 168db5e78022748c2def41ce00537dbc3c580549 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 26527476..8a3e2d58 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 8a3e2d58..eb9d5695 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 400e5f936df1d5b829db2946d0dc9b229f515968 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 2555bb8b..8fed1583 100644 --- a/sites/index.php +++ b/sites/index.php @@ -14,7 +14,7 @@ - + Self-updating list of active Session communities From c17f1c55f155acb75ac01d216114330c7c119934 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 40b43099..68a710bb 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;