diff --git a/testnet.html b/testnet.html index 7ae3874..c3eeff7 100644 --- a/testnet.html +++ b/testnet.html @@ -81,19 +81,23 @@ border: 1px transparent solid; } - .flex{ + .flex { display: flex; } - .grid{ + + .grid { display: grid; } - .column-grid{ + + .column-grid { grid-auto-flow: column; } - .align-center{ + + .align-center { align-items: center; } - .gap-1{ + + .gap-1 { gap: 1rem; } @@ -222,7 +226,7 @@ margin: 0.4rem 0.8rem; } - #flo_data_status:not(:empty){ + #flo_data_status:not(:empty) { color: red; padding: 0.5rem 0; } @@ -564,11 +568,12 @@ opacity: 0; pointer-events: none; } - .hide-completely{ + + .hide-completely { display: none; } - #fix_invalid_button{ + #fix_invalid_button { margin-bottom: 1rem !important; } @@ -1756,20 +1761,45 @@ } } + /* new styles */ + .flex { + display: flex; + } + + details { + border-top: thin rgba(var(--text-color), 0.3) solid; + border-bottom: thin rgba(var(--text-color), 0.3) solid; + } + + details summary { + display: flex; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + align-items: center; + color: var(--accent-color); + } + + details[open]>summary .down-arrow { + transform: rotate(180deg); + } + /*# sourceMappingURL=main.css.map */ + -
@@ -1963,9 +1993,7 @@ C9.3,5.7,9.6,6,10,6z" />
- - - + 1040/1040

- + @@ -2096,6 +2125,32 @@ please proceed cautiously! +
+
+ +

Developer options

+ + + + +
+
+
+

Allow unconfirmed UTXOs

+ + This is a developer option only and not recommended for normal use. + +
+ +
+
+

About

Version 2.7.4
@@ -2826,64 +2881,113 @@ document.getElementById('transactions-container').scrollTop = 0; } - let showCharacterCount = document.getElementById('show_character_count') + let showCharacterCount = document.getElementById('show_character_count') let isFloDataChanged = false const fixFloDataButton = document.getElementById('fix_invalid_button') const sendFloDataButton = document.getElementById('sendBtn') const sentFloData = document.getElementById('flotextdata') const floDataStaus = document.getElementById('flo_data_status') - sentFloData.addEventListener('keydown', function(e){ - if(this.value.length > 1040) + sentFloData.addEventListener('keydown', function (e) { + if (this.value.length > 1040) e.preventDefault() }) - - sentFloData.addEventListener('input', function(e){ - isFloDataChanged = true - if(this.value.trim() !== ''){ + + sentFloData.addEventListener('input', function (e) { + isFloDataChanged = true + if (this.value.trim() !== '') { sendFloDataButton.classList.add('hide-completely') fixFloDataButton.classList.remove('hide-completely') } - else{ + else { sendFloDataButton.classList.remove('hide-completely') fixFloDataButton.classList.add('hide-completely') } - if(1040 - this.value.length){ - showCharacterCount.textContent = `${1040 - this.value.length}/1040` + if (1040 - this.value.length) { + showCharacterCount.textContent = `${1040 - this.value.length}/1040` } else showCharacterCount.textContent = `You can only add FLO data upto 1040 characters.` checkFloData() }) - function checkFloData(){ + function checkFloData() { isFloDataChanged = false - const floDataText = sentFloData.value.trim() - let isValid = true - for(char of floDataText){ - // if(/^[a-z0-9\s!"#$%&'()*+,.\/:;<=>?@\[\]^_`{|}~-]*$/i.test(char)){ - if(!/^[\x20-\x7E\s]+/.test(char)){ - isValid = false - break; - } - } - if(isValid){ + const floDataText = sentFloData.value; + if (/^[\x20-\x7E]*$/.test(floDataText)) { sendFloDataButton.classList.remove('hide-completely') fixFloDataButton.classList.add('hide-completely') floDataStaus.textContent = '' } - else{ + else { floDataStaus.textContent = 'FLO data contains invalid characters. Use "Fix" to remove invalid characters.' } } - function removeInvalid(){ - const floDataText = sentFloData.value.trim() - sentFloData.value = floDataText.replace(/[^\x20-\x7E]*/gm, '') + function removeInvalid() { + const floDataText = sentFloData.value; + sentFloData.value = floDataText.replace(/\s/g, " ").replace(/[^\x20-\x7E]/g, ''); checkFloData() } + + let preventUnconfirmedUTXO = true + document.getElementById('allow_utxo_switch').addEventListener('change', e => { + preventUnconfirmedUTXO = !e.target.checked + localStorage.preventUnconfirmedUTXO = preventUnconfirmedUTXO + }) + if (localStorage.getItem('preventUnconfirmedUTXO') !== 'null') { + const getBoolean = (localStorage.preventUnconfirmedUTXO === 'false') + preventUnconfirmedUTXO = getBoolean + document.getElementById('allow_utxo_switch').checked = getBoolean + } - - - - - + \ No newline at end of file