Adjust layout more

Ensure camera select box is never hidden.
This commit is contained in:
Vivianne Langdon 2022-02-27 00:33:54 -08:00
parent 43f62ef5d7
commit f5c66b5b4a
3 changed files with 11 additions and 7 deletions

View file

@ -22,6 +22,6 @@
}
}
#barcode-status .select {
#barcode-camera-list {
float: right;
}

View file

@ -642,7 +642,7 @@ let BookWyrm = new (class {
openBarcodeScanner(event) {
const scannerNode = document.getElementById("barcode-scanner");
const statusNode = document.getElementById("barcode-status");
const cameraListNode = document.getElementById("barcode-camera-list");
const cameraListNode = document.querySelector("#barcode-camera-list > select");
cameraListNode.addEventListener('change', onChangeCamera);

View file

@ -8,9 +8,17 @@
{% endblock %}
{% block modal-body %}
<div id="barcode-scanner" class="block"></div>
<div class="block">
<div id="barcode-scanner"></div>
</div>
<div id="barcode-camera-list" class="select is-small">
<select>
</select>
</div>
<div id="barcode-status" class="block">
<div class="grant-access is-hidden">
<span class="icon icon-lock"></span>
<span class="is-size-5">{% trans "Requesting camera..." %}</span></br>
@ -22,10 +30,6 @@
<span>{% trans "Could not access camera" %}</span>
</div>
<div class="scanning is-hidden">
<div class="select is-small">
<select id="barcode-camera-list">
</select>
</div>
<span class="icon icon-barcode"></span>
<span class="is-size-5">{% trans "Scanning..." context "barcode scanner" %}</span><br/>
<span>{% trans "Align your book's barcode with the camera." %}</span>