Ron Au commited on
Commit
12f2d79
·
1 Parent(s): d8ef1e9

fix(eta): Update ETA UI on task start

Browse files
Files changed (1) hide show
  1. static/js/index.js +2 -0
static/js/index.js CHANGED
@@ -26,6 +26,7 @@ const generate = async () => {
26
  const cardSlot = scene.querySelector('.card-slot');
27
  const actions = document.querySelector('.actions');
28
  const durationDisplay = actions.querySelector('.duration');
 
29
  const timer = durationTimer(durationDisplay);
30
  const timerCleanup = timer().cleanup;
31
 
@@ -42,6 +43,7 @@ const generate = async () => {
42
  actions.style.opacity = '1';
43
  actions.setAttribute('aria-hidden', 'false');
44
  actions.querySelectorAll('button').forEach((button) => button.setAttribute('tabindex', '0'));
 
45
  durationDisplay.classList.add('displayed');
46
 
47
  if (window.innerWidth <= 500) {
 
26
  const cardSlot = scene.querySelector('.card-slot');
27
  const actions = document.querySelector('.actions');
28
  const durationDisplay = actions.querySelector('.duration');
29
+ const etaDisplay = durationDisplay.querySelector('.eta');
30
  const timer = durationTimer(durationDisplay);
31
  const timerCleanup = timer().cleanup;
32
 
 
43
  actions.style.opacity = '1';
44
  actions.setAttribute('aria-hidden', 'false');
45
  actions.querySelectorAll('button').forEach((button) => button.setAttribute('tabindex', '0'));
46
+ etaDisplay.textContent = Math.round(task.eta);
47
  durationDisplay.classList.add('displayed');
48
 
49
  if (window.innerWidth <= 500) {