wiz
This commit is contained in:
parent
312d6e3d37
commit
cc62e72b1d
3 changed files with 37 additions and 7 deletions
|
|
@ -148,14 +148,13 @@ $(() => {
|
|||
cs.text('');
|
||||
if (qrElement) {
|
||||
while (qrElement.firstChild) qrElement.removeChild(qrElement.firstChild);
|
||||
// Pre-generate QR behind veil to entice reveal
|
||||
new QRCode(qrElement, { text: connectString, colorDark: '#000000', colorLight: '#ffffff', width: 157, height: 157 });
|
||||
}
|
||||
|
||||
// Reveal on click: generate QR and show string
|
||||
// Reveal on click: show string and remove veil
|
||||
codebox.off('click').on('click', () => {
|
||||
if (!codebox.hasClass('revealed')) {
|
||||
if (qrElement && !qrElement.firstChild) {
|
||||
new QRCode(qrElement, { text: connectString, colorDark: '#000000', colorLight: '#ffffff', width: 157, height: 157 });
|
||||
}
|
||||
cs.text(connectString);
|
||||
codebox.addClass('revealed');
|
||||
clickText.text('Pairing code');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue