landings: clickable blue payload links under every QR (webextension)
Show the exact encoded URI (taler:// / https / payto://) as a blue monospace link under each QR so wallet webextensions and desktop can open it. Stop stripping :443 in the bank withdraw QR path. Shop pay and exchange withdraw-exchange included.
This commit is contained in:
parent
eb640da64e
commit
2fb060f79a
6 changed files with 134 additions and 15 deletions
|
|
@ -138,6 +138,25 @@ button.shop-item {
|
|||
background: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
/* Full encoded payload under QR — clickable (wallet / webextension) */
|
||||
.goa-pay-payload {
|
||||
display: block;
|
||||
margin: 0.45rem 0 0.55rem;
|
||||
padding: 0 0.25rem;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 0.68rem;
|
||||
line-height: 1.35;
|
||||
color: #7eb6ff;
|
||||
word-break: break-all;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid rgba(126, 182, 255, 0.4);
|
||||
cursor: pointer;
|
||||
}
|
||||
.goa-pay-payload:hover {
|
||||
color: #b8d6ff;
|
||||
border-bottom-color: #7eb6ff;
|
||||
}
|
||||
|
||||
/* Settlement: collapsed by default, expand on click */
|
||||
.goa-pay-settle {
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
' <div class="goa-pay-taler-qr__inner" id="goa-pay-qr-pay"></div>' +
|
||||
' <img class="goa-pay-taler-qr__logo" id="goa-pay-qr-pay-logo" alt="" />' +
|
||||
" </div>" +
|
||||
' <a class="goa-pay-payload" id="goa-pay-qr-payload" href="#">…</a>' +
|
||||
' <a class="goa-pay-cta" id="goa-pay-open" href="#">Open payment link →</a>' +
|
||||
' <p class="goa-pay-line">' +
|
||||
' <a class="goa-pay-link" id="goa-pay-uri" href="#">taler:// URI</a>' +
|
||||
|
|
@ -90,6 +91,7 @@
|
|||
' <div class="goa-pay-payto-qr__caption">Settlement only</div>' +
|
||||
' <div class="goa-pay-payto-qr__inner" id="goa-pay-qr-payto"></div>' +
|
||||
" </div>" +
|
||||
' <a class="goa-pay-payload" id="goa-pay-payto-payload" href="#">…</a>' +
|
||||
' <p class="goa-pay-line">' +
|
||||
' <a class="goa-pay-link" id="goa-pay-payto" href="#">payto:// URI</a>' +
|
||||
' <span class="goa-pay-sep">·</span>' +
|
||||
|
|
@ -127,6 +129,11 @@
|
|||
if (open) {
|
||||
// paint payto QR when first expanded
|
||||
renderQr(document.getElementById("goa-pay-qr-payto"), SHOP_PAYTO, 140);
|
||||
var pp = document.getElementById("goa-pay-payto-payload");
|
||||
if (pp) {
|
||||
pp.href = SHOP_PAYTO;
|
||||
pp.textContent = SHOP_PAYTO;
|
||||
}
|
||||
}
|
||||
};
|
||||
document.addEventListener("keydown", function (e) {
|
||||
|
|
@ -335,11 +342,17 @@
|
|||
// Open first so layout exists, then paint wallet QR only
|
||||
m.hidden = false;
|
||||
m.classList.add("open");
|
||||
var tpl = payTemplateUri(productId);
|
||||
renderQr(
|
||||
document.getElementById("goa-pay-qr-pay"),
|
||||
payTemplateUri(productId),
|
||||
tpl,
|
||||
220
|
||||
);
|
||||
var payload = document.getElementById("goa-pay-qr-payload");
|
||||
if (payload) {
|
||||
payload.href = tpl;
|
||||
payload.textContent = tpl;
|
||||
}
|
||||
|
||||
createPayUri(productId)
|
||||
.then(function (info) {
|
||||
|
|
@ -355,6 +368,10 @@
|
|||
uh.textContent = "HTTPS";
|
||||
// Live unpaid taler://pay (fresh order each open)
|
||||
renderQr(document.getElementById("goa-pay-qr-pay"), pay, 220);
|
||||
if (payload) {
|
||||
payload.href = pay;
|
||||
payload.textContent = pay;
|
||||
}
|
||||
status.textContent = "Ready — scan in wallet";
|
||||
})
|
||||
.catch(function (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue