Show a processing label

This commit is contained in:
cmdr2 2022-09-27 18:37:21 +05:30
parent acbf2a8ab0
commit 828a7aabd7
3 changed files with 10 additions and 2 deletions

View File

@ -208,7 +208,7 @@
</div>
</body>
<script src="media/main.js?v=10"></script>
<script src="media/main.js?v=11"></script>
<script>
async function init() {
await loadModifiers()

View File

@ -383,6 +383,11 @@ img {
border-radius: 2pt;
margin-right: 5pt;
}
.activeTaskLabel {
background:rgb(0, 90, 30);
border: 1px solid rgb(0, 75, 19);
color:rgb(204, 255, 217)
}
.secondaryButton {
background: rgb(132, 8, 0);
border: 1px solid rgb(122, 29, 0);

View File

@ -545,7 +545,9 @@ async function checkTasks() {
task.isProcessing = true
task['stopTask'].innerHTML = '<i class="fa-solid fa-circle-stop"></i> Stop'
task['taskStatusLabel'].style.display = 'none'
task['taskStatusLabel'].innerText = "Processing"
task['taskStatusLabel'].className += " activeTaskLabel"
console.log(task['taskStatusLabel'].className)
for (let i = 0; i < task.batchCount; i++) {
task.reqBody['seed'] = task.seed + (i * task.reqBody['num_outputs'])
@ -560,6 +562,7 @@ async function checkTasks() {
task.isProcessing = false
task['stopTask'].innerHTML = '<i class="fa-solid fa-trash-can"></i> Remove'
task['taskStatusLabel'].style.display = 'none'
time = new Date().getTime() - time
time /= 1000