diff --git a/assets/scripts.js b/assets/scripts.js index e022f74..12d0d82 100644 --- a/assets/scripts.js +++ b/assets/scripts.js @@ -273,7 +273,7 @@ async function displayProfile(opts) { if (opts.mode == "hkp") { feedback += `
`; feedback += `
qrcode
`; - feedback += `
fingerprint
`; + feedback += `
fingerprint
`; feedback += `
`; } diff --git a/index.php b/index.php index e9698a7..8dfc70b 100644 --- a/index.php +++ b/index.php @@ -14,7 +14,8 @@ $templates = new League\Plates\Engine('views'); $router->map('GET', '/', function() {}, 'index'); $router->map('GET', '/guides', function() {}, 'guides'); $router->map('GET', '/guides/[:id]', function() {}, 'guideId'); -$router->map('GET', '/util/qr/[:fp]', function() {}, 'util_qr'); +$router->map('GET', '/util/qrfp/[:fp]', function() {}, 'util_qrfp'); +$router->map('GET', '/util/qr/[:txt]', function() {}, 'util_qr'); $router->map('GET', '/util/[:id]', function() {}, 'util'); $router->map('GET', '/faq', function() {}, 'faq'); $router->map('GET', '/verify', function() {}, 'verify'); @@ -136,9 +137,14 @@ if(is_array($match) && is_callable($match['target'])) { echo $templates->render("util/$id"); break; - case 'util_qr': + case 'util_qrfp': $fp = htmlspecialchars($match['params']['fp']); - echo $templates->render("util/qr", ['input' => $fp]); + echo $templates->render("util/qrfp", ['input' => $fp]); + break; + + case 'util_qr': + $uri = htmlspecialchars($match['params']['fp']); + echo $templates->render("util/qr", ['input' => $uri]); break; case 'faq': diff --git a/views/util/qrfp.php b/views/util/qrfp.php new file mode 100644 index 0000000..a01507c --- /dev/null +++ b/views/util/qrfp.php @@ -0,0 +1,11 @@ +layout('template.base', ['title' => $title]) ?> + +
+

QR Code

+
+

This tool generates a QR code containing the fingerprint of your public key (format). This QR code can be scanned by apps like OpenKeyChain.

+

Fingerprint

+ +
+
+