wiz
This commit is contained in:
parent
cc62e72b1d
commit
5d75253b09
2 changed files with 11 additions and 7 deletions
|
|
@ -13,9 +13,8 @@
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 253px;
|
width: 253px;
|
||||||
height: 241px;
|
min-height: 241px;
|
||||||
-webkit-backdrop-filter: blur(10px);
|
height: auto;
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
transition: background-color 0.5s;
|
transition: background-color 0.5s;
|
||||||
|
|
@ -27,7 +26,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prevent overlap: hide connect string until revealed; click surface on box */
|
/* prevent overlap: hide connect string until revealed; click surface on box */
|
||||||
.qrcode-box #connectString { display: none; }
|
.qrcode-box #connectString { display: none; margin-top: 6px; }
|
||||||
.qrcode-box.revealed #connectString { display: block; }
|
.qrcode-box.revealed #connectString { display: block; }
|
||||||
.qrcode-box { cursor: pointer; }
|
.qrcode-box { cursor: pointer; }
|
||||||
|
|
||||||
|
|
@ -40,6 +39,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
.qrcode-viewport #qrcode {
|
.qrcode-viewport #qrcode {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -60,6 +60,9 @@
|
||||||
}
|
}
|
||||||
.qrcode-box.revealed .qr-veil { display: none; }
|
.qrcode-box.revealed .qr-veil { display: none; }
|
||||||
|
|
||||||
|
/* hide helper text when revealed to avoid overlap */
|
||||||
|
.qrcode-box.revealed #click-text { display: none; }
|
||||||
|
|
||||||
.qrcode-box-clicked::before {
|
.qrcode-box-clicked::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -152,12 +152,13 @@ $(() => {
|
||||||
new QRCode(qrElement, { text: connectString, colorDark: '#000000', colorLight: '#ffffff', width: 157, height: 157 });
|
new QRCode(qrElement, { text: connectString, colorDark: '#000000', colorLight: '#ffffff', width: 157, height: 157 });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reveal on click: show string and remove veil
|
// Reveal on click: show string below and remove veil/heading
|
||||||
codebox.off('click').on('click', () => {
|
codebox.off('click').on('click', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
if (!codebox.hasClass('revealed')) {
|
if (!codebox.hasClass('revealed')) {
|
||||||
cs.text(connectString);
|
cs.text(connectString);
|
||||||
codebox.addClass('revealed');
|
codebox.addClass('revealed');
|
||||||
clickText.text('Pairing code');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue