mirror of
https://github.com/arx-research/libhalo.git
synced 2026-01-09 13:18:04 -05:00
Gateway: Update CSS styles and fix bug with emulated prompt (#250)
This commit is contained in:
committed by
GitHub
parent
cb1bcad85b
commit
91d054d055
@@ -92,8 +92,9 @@ svg {
|
||||
font-family: monospace;
|
||||
font-size: 14px;
|
||||
margin-top: 20px;
|
||||
max-height: 120px;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
text-wrap: wrap;
|
||||
}
|
||||
|
||||
.button {
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
// ensure the library is always fully reloaded
|
||||
document.write('<script src="../dist/libhalo.js?_v=' + (Math.random() + '') + '"></scr' + 'ipt>');
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#qr-link {
|
||||
font-size: 10px;
|
||||
color: gray;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -40,6 +47,9 @@
|
||||
<br>
|
||||
<pre id="statusText" style="word-break: break-all; white-space: pre-wrap;"></pre>
|
||||
<img id="qr" src="data:," alt>
|
||||
<div class="qr-link-container">
|
||||
<a href="about:blank" id="qr-link"></a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// generate random message on load
|
||||
@@ -67,6 +77,8 @@
|
||||
let pairInfo = await gate.startPairing();
|
||||
console.log('URL in the QR code:', pairInfo.execURL);
|
||||
document.getElementById('qr').src = pairInfo.qrCode;
|
||||
document.getElementById('qr-link').href = pairInfo.execURL;
|
||||
document.getElementById('qr-link').innerText = pairInfo.execURL;
|
||||
log('Please scan the QR code presented below with your smartphone.');
|
||||
} catch (e) {
|
||||
document.getElementById('pairSignBtn').disabled = false;
|
||||
@@ -83,6 +95,8 @@
|
||||
|
||||
log('Smartphone paired succesfully.');
|
||||
document.getElementById('qr').style.display = 'none';
|
||||
document.getElementById('qr-link').href = 'about:blank';
|
||||
document.getElementById('qr-link').innerText = '';
|
||||
|
||||
await btnInitiateSessClicked();
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ const PROMPT_STYLES = `
|
||||
.__libhalo_popup .waiting-x svg {
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
}
|
||||
.__libhalo_popup .waiting-x:before, .__libhalo_popup .waiting-x:after {
|
||||
z-index: 1;
|
||||
|
||||
Reference in New Issue
Block a user