mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2025-01-08 14:39:28 -07:00
Rename qr to qrfp
This commit is contained in:
parent
d070ed0864
commit
c25e7e6ef1
3 changed files with 21 additions and 4 deletions
|
@ -273,7 +273,7 @@ async function displayProfile(opts) {
|
|||
if (opts.mode == "hkp") {
|
||||
feedback += `<div class="profileDataItem">`;
|
||||
feedback += `<div class="profileDataItem__label">qrcode</div>`;
|
||||
feedback += `<div class="profileDataItem__value"><a href="/util/qr/${keyData.fingerprint}">fingerprint</a></div>`;
|
||||
feedback += `<div class="profileDataItem__value"><a href="/util/qrfp/${keyData.fingerprint}">fingerprint</a></div>`;
|
||||
feedback += `</div>`;
|
||||
}
|
||||
|
||||
|
|
12
index.php
12
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':
|
||||
|
|
11
views/util/qrfp.php
Normal file
11
views/util/qrfp.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php $this->layout('template.base', ['title' => $title]) ?>
|
||||
|
||||
<div class="content">
|
||||
<h1>QR Code</h1>
|
||||
<form id="form-util-qr" method="post">
|
||||
<p>This tool generates a QR code containing the fingerprint of your public key (<a href="https://github.com/open-keychain/open-keychain/wiki/QR-Codes">format</a>). This QR code can be scanned by apps like <a href="https://www.openkeychain.org/">OpenKeyChain</a>.</p>
|
||||
<h3>Fingerprint</h3>
|
||||
<input type="text" name="input" id="input" placeholder="Fingerprint" value="<?=$this->escape($input)?>">
|
||||
<div id="qrcode"></div>
|
||||
</form>
|
||||
</div>
|
Loading…
Reference in a new issue