From 945588d9e022ff4f5219478433f3abd8d4267d85 Mon Sep 17 00:00:00 2001 From: Chris Duncan <chris@zoso.dev> Date: Thu, 31 Oct 2024 20:47:12 -0700 Subject: [PATCH] Tweaks. --- app/pages/nemo-wallet.html | 42 +++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/app/pages/nemo-wallet.html b/app/pages/nemo-wallet.html index 74354b7..f4b192b 100644 --- a/app/pages/nemo-wallet.html +++ b/app/pages/nemo-wallet.html @@ -4,11 +4,18 @@ <meta charset="utf-8" /> <meta lang="en" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> - <script - type="module" - src="https://cdn.jsdelivr.net/npm/barcode-detector@2.2.11/dist/es/side-effects.js"></script> - <script> + <script type="module" src="https://cdn.jsdelivr.net/npm/barcode-detector@2.2.11/dist/es/side-effects.min.js"></script> + <script type="module"> let libnemo, css + const barcodeDetector = new BarcodeDetector() + + const observer = new MutationObserver((mutations) => { + for (const mutation of mutations) { + if (mutation.type === "attributes") { + mutation.target.dispatchEvent(new Event('attributeschanged')) + } + } + }) window.addEventListener('load', async (event) => { try { @@ -32,15 +39,6 @@ "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=Hello%20world!", ).then(resp => resp.blob()) barcodeDetector.detect(imageFile).then(console.log) - - const observer = new MutationObserver((mutations) => { - for (const mutation of mutations) { - if (mutation.type === "attributes") { - mutation.target.dispatchEvent(new Event('attributeschanged')) - } - } - }) - console.log('loaded libnemo') } async function loadData () { @@ -519,7 +517,7 @@ body { align-items: flex-start; background-color: var(--theme-primary); - box-shadow: 0 0 2rem var(--color-dark); + box-shadow: 0 0 2rem black; color: var(--theme-content); display: flex; fill: var(--theme-highlight); @@ -549,6 +547,7 @@ display: flex; flex: 0 1 auto; justify-content: space-evenly; + padding-bottom: 1dvh; width: 100%; } main iframe { @@ -784,8 +783,7 @@ <div class="grid"> <div class="col-3"></div> <button id="wallet-new-cancel" class="cancel col-3">Cancel</button> - <button id="wallet-new-ok" class="col-3" - onclick="createWallet().then(w => { console.log(w) })">OK</button> + <button id="wallet-new-ok" class="col-3" onclick="createWallet().then(w => { console.log(w) })">OK</button> </div> </div> </div> @@ -837,8 +835,7 @@ <div class="grid"> <div class="col-3"></div> <button id="wallet-import-cancel" class="cancel col-3">Cancel</button> - <button id="wallet-import-ok" class="col-3" - onclick="importWallet().then(w => { console.log(w) })">OK</button> + <button id="wallet-import-ok" class="col-3" onclick="importWallet().then(w => { console.log(w) })">OK</button> </div> </div> </div> @@ -850,8 +847,8 @@ <div class="flex-y stretch"> <div id="account-new-name" class="flex-x left mid"> <label for="account-new-name-input">Name</label> - <input id="account-new-name-input" name="account-new-name" autocomplete="off" maxlength="80" - pattern="[^_].*" placeholder="My Account" /> + <input id="account-new-name-input" name="account-new-name" autocomplete="off" maxlength="80" pattern="[^_].*" + placeholder="My Account" /> </div> <div id="account-new-index" class="flex-x left mid"> <label for="account-new-index-input">Index</label> @@ -866,8 +863,7 @@ <div class="grid"> <div class="col-3"></div> <button id="account-new-cancel" class="cancel col-3" type="reset">Cancel</button> - <button id="account-new-ok" class="col-3" - onclick="createAccount().then(a => { console.log(a) })">OK</button> + <button id="account-new-ok" class="col-3" onclick="createAccount().then(a => { console.log(a) })">OK</button> </div> </div> </div> @@ -910,8 +906,8 @@ <!-- Settings Page --> <div id="settings" class="page"> + <h1>Settings</h1> <div class="flex-y left mid"> - <h1>Settings</h1> <label for="theme-checkbox">Theme</label> <div class="toggle"> <input id="theme-checkbox" name="theme" type="checkbox" autocomplete="on" checked /> -- 2.34.1