minor fix

This commit is contained in:
2025-09-11 16:59:42 +08:00
parent 15ff6a17c6
commit b7878de586

View File

@@ -52,7 +52,7 @@
<br> <br>
<button type="button" class="inline-flex pure-button pure-button-primary" id="send"> <button type="button" class="inline-flex pure-button pure-button-primary" id="send">
<span class="text">Open</span> <span class="text">Open</span>
<span class="icon spin hidden"> <span class="icon spin" hidden>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-loader"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-loader">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M12 6l0 -3" /> <path d="M12 6l0 -3" />
@@ -231,13 +231,13 @@ $$$('#send', 'click', async (e) => {
case 'STANDBY': case 'STANDBY':
Connection.send('RESUME'); Connection.send('RESUME');
$('#send > span.text').innerText = 'Pause'; $('#send > span.text').innerText = 'Pause';
$('#send > span.icon').classList.remove('hidden'); $('#send > span.icon').removeAttribute('hidden');
$('#send').disabled = true; $('#send').disabled = true;
break; break;
case 'RUNNING': case 'RUNNING':
Connection.send('ONHOLD'); Connection.send('ONHOLD');
$('#send > span.text').innerText = 'Resume'; $('#send > span.text').innerText = 'Resume';
$('#send > span.icon').classList.add('hidden'); $('#send > span.icon').setAttribute('hidden', '');
$('#send').disabled = true; $('#send').disabled = true;
break; break;
case 'READY': case 'READY':
@@ -268,7 +268,7 @@ $$$('#send', 'click', async (e) => {
Timer.setTimestamp(true); Timer.setTimestamp(true);
$('#send > span.text').innerText = 'Pause'; $('#send > span.text').innerText = 'Pause';
$('#send > span.icon').classList.remove('hidden'); $('#send > span.icon').removeAttribute('hidden');
$('#skip').disabled = false; $('#skip').disabled = false;
break; break;
default: default:
@@ -283,7 +283,7 @@ $$$('#send', 'click', async (e) => {
} }
] ]
}; };
$('#send > span.icon').classList.remove('hidden'); $('#send > span.icon').removeAttribute('hidden');
let [handle] = await showOpenFilePicker(PickerOptions); let [handle] = await showOpenFilePicker(PickerOptions);
let file = await handle.getFile(); let file = await handle.getFile();
@@ -303,7 +303,7 @@ $$$('#send', 'click', async (e) => {
$('#cancel').disabled = false; $('#cancel').disabled = false;
$('#send').disabled = true; $('#send').disabled = true;
} finally { } finally {
$('#send > span.icon').classList.add('hidden'); $('#send > span.icon').setAttribute('hidden', '');
} }
} }
}); });
@@ -490,7 +490,7 @@ function main(url, parameters, locales) {
case 'FAILED': case 'FAILED':
Status = 'STANDBY'; Status = 'STANDBY';
$('#send > span.text').innerText = 'Resume'; $('#send > span.text').innerText = 'Resume';
$('#send > span.icon').classList.add('hidden'); $('#send > span.icon').setAttribute('hidden', '');
Timer.setTimedelta(); Timer.setTimedelta();
break; break;
case 'FINISH': case 'FINISH':
@@ -499,7 +499,7 @@ function main(url, parameters, locales) {
case 'CANCEL': case 'CANCEL':
Status = null; Status = null;
$('#send > span.text').innerText = 'Open'; $('#send > span.text').innerText = 'Open';
$('#send > span.icon').classList.add('hidden'); $('#send > span.icon').setAttribute('hidden', '');
$('#cancel').disabled = true; $('#cancel').disabled = true;
$('#skip').disabled = true; $('#skip').disabled = true;
@@ -590,10 +590,6 @@ label {
color: orangered; color: orangered;
} }
.hidden {
display: none;
}
.gaps { .gaps {
row-gap: 0.4em; row-gap: 0.4em;
} }