Marcel0123 commited on
Commit
4c172b9
·
verified ·
1 Parent(s): 04f95e7

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +33 -2
index.html CHANGED
@@ -324,7 +324,14 @@
324
  .orchestra .agent .agent-symbol{margin-top:8px}
325
  .orchestra .agent .agent-steps{display:flex!important;flex-direction:column;gap:6px;min-height:110px;margin:12px 0 0;justify-content:flex-start}
326
  .orchestra .agent .mini-visual{display:none!important}
327
- .orchestra .agent .agent-bottom{display:none!important}
 
 
 
 
 
 
 
328
  .orchestra .agent .agent-step{font-size:11px;line-height:1.4;min-height:19px;color:#9ab2d1;display:flex;gap:7px;animation:lineAppear .27s ease both}
329
  .orchestra .agent .agent-step .step-mark{width:16px;height:16px;font-size:10px;flex:none;margin-top:1px}
330
  .orchestra .agent .agent-step.current{color:#f4faff}
@@ -1419,10 +1426,31 @@ function nextSetStatus(id,value){
1419
  const card=$('agent-'+id);card.classList.toggle('active',value==='active');card.classList.toggle('done',value==='done'||value==='warning');
1420
  card.querySelector('.status').textContent={active:'ACTIEF',done:'GEREED',warning:'LET OP',skipped:'NIET BESCHIKBAAR',idle:'STANDBY'}[value]||'STANDBY';
1421
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1422
  function nextInitCards(){
 
1423
  for(const id of nextIds){
1424
  const card=$('agent-'+id);card.classList.remove('has-steps','active','done','completed-pulse');
1425
- nextSetStatus(id,'idle');
1426
  nextLines(id,['Wacht op lokale analyse','Werkstappen verschijnen hier','Overdracht wordt zichtbaar'], -2);
1427
  }
1428
  nextShowCount();
@@ -1435,11 +1463,13 @@ async function nextPhase(id,lines,routes=[],warning=false){
1435
  log('Procesweergave: '+$('agent-'+id).querySelector('h3').textContent);
1436
  const phaseDuration=$('paceSelect').value==='fast'?650:3300;
1437
  const durationStep=phaseDuration/lines.length;
 
1438
  for(let i=0;i<lines.length;i++){
1439
  await nextWait(durationStep);
1440
  nextLines(id,lines,i,false);
1441
  $('flowState').textContent=lines[i];
1442
  }
 
1443
  for(const key of nextActiveKeys)if(!nextFinishedKeys.includes(key))nextFinishedKeys.push(key);
1444
  nextSetStatus(id,warning?'warning':'done');nextLines(id,lines,lines.length-1,warning);
1445
  const card=$('agent-'+id);card.classList.remove('completed-pulse');void card.offsetWidth;card.classList.add('completed-pulse');
@@ -1447,6 +1477,7 @@ async function nextPhase(id,lines,routes=[],warning=false){
1447
  nextShowCount();
1448
  }
1449
  function nextClearNetwork(reset=false){
 
1450
  nextActiveKeys=[];if(reset)nextFinishedKeys=[];
1451
  clearTimeout(nextTransferTimeout);$('conductor').classList.remove('transfering');
1452
  if(nextAnimationFrame)cancelAnimationFrame(nextAnimationFrame);nextAnimationFrame=0;
 
324
  .orchestra .agent .agent-symbol{margin-top:8px}
325
  .orchestra .agent .agent-steps{display:flex!important;flex-direction:column;gap:6px;min-height:110px;margin:12px 0 0;justify-content:flex-start}
326
  .orchestra .agent .mini-visual{display:none!important}
327
+ /* v6: de oorspronkelijke voortgangsbalk terug onder de zichtbare werkstappen */
328
+ .orchestra .agent .agent-bottom{display:flex!important;align-items:center;gap:10px;margin-top:10px;padding-top:9px;border-top:1px solid rgba(135,166,199,.16);position:relative;z-index:3}
329
+ .orchestra .agent .agent-bottom .track{display:block;flex:1;min-width:0;height:7px;background:#1c304c;border:1px solid rgba(124,150,190,.16);border-radius:20px;overflow:hidden}
330
+ .orchestra .agent .agent-bottom .track i{display:block;width:0%;height:100%;background:var(--accent);border-radius:20px;box-shadow:0 0 10px var(--accent);transition:none}
331
+ .orchestra .agent .agent-bottom .percent{display:inline-block;flex:none;width:39px;text-align:right;color:#c8d9f2;font-size:11px;font-variant-numeric:tabular-nums;font-weight:750}
332
+ .orchestra .agent.done .agent-bottom .track i{box-shadow:0 0 12px var(--accent)}
333
+ @media(max-width:700px){.orchestra .agent .agent-bottom{margin-top:8px;gap:6px}.orchestra .agent .agent-bottom .percent{font-size:10px;width:33px}}
334
+
335
  .orchestra .agent .agent-step{font-size:11px;line-height:1.4;min-height:19px;color:#9ab2d1;display:flex;gap:7px;animation:lineAppear .27s ease both}
336
  .orchestra .agent .agent-step .step-mark{width:16px;height:16px;font-size:10px;flex:none;margin-top:1px}
337
  .orchestra .agent .agent-step.current{color:#f4faff}
 
1426
  const card=$('agent-'+id);card.classList.toggle('active',value==='active');card.classList.toggle('done',value==='done'||value==='warning');
1427
  card.querySelector('.status').textContent={active:'ACTIEF',done:'GEREED',warning:'LET OP',skipped:'NIET BESCHIKBAAR',idle:'STANDBY'}[value]||'STANDBY';
1428
  }
1429
+ // v6: visuele voortgang, synchroon met de gekozen procesPRESENTATIE (niet met CPU-tijd).
1430
+ let nextProgressFrame=0;
1431
+ function nextSetProgress(id,value){
1432
+ const card=$('agent-'+id),fill=card?.querySelector('.agent-bottom .track i'),label=card?.querySelector('.agent-bottom .percent');
1433
+ if(!fill||!label)return;
1434
+ const pct=Math.max(0,Math.min(100,Math.round(value)));
1435
+ fill.style.width=pct+'%';label.textContent=pct+'%';
1436
+ }
1437
+ function nextStopProgress(){if(nextProgressFrame)cancelAnimationFrame(nextProgressFrame);nextProgressFrame=0;}
1438
+ function nextAnimateProgress(id,duration){
1439
+ nextStopProgress();nextSetProgress(id,0);
1440
+ const started=performance.now();
1441
+ function tick(now){
1442
+ const fraction=Math.min(1,Math.max(0,(now-started)/duration));
1443
+ nextSetProgress(id,fraction*100);
1444
+ if(fraction<1)nextProgressFrame=requestAnimationFrame(tick);
1445
+ else nextProgressFrame=0;
1446
+ }
1447
+ nextProgressFrame=requestAnimationFrame(tick);
1448
+ }
1449
  function nextInitCards(){
1450
+ nextStopProgress();
1451
  for(const id of nextIds){
1452
  const card=$('agent-'+id);card.classList.remove('has-steps','active','done','completed-pulse');
1453
+ nextSetStatus(id,'idle');nextSetProgress(id,0);card.querySelector('.agent-bottom').title='Voortgang van de procesweergave; geen meting van de werkelijke rekentijd.';
1454
  nextLines(id,['Wacht op lokale analyse','Werkstappen verschijnen hier','Overdracht wordt zichtbaar'], -2);
1455
  }
1456
  nextShowCount();
 
1463
  log('Procesweergave: '+$('agent-'+id).querySelector('h3').textContent);
1464
  const phaseDuration=$('paceSelect').value==='fast'?650:3300;
1465
  const durationStep=phaseDuration/lines.length;
1466
+ nextAnimateProgress(id,phaseDuration);
1467
  for(let i=0;i<lines.length;i++){
1468
  await nextWait(durationStep);
1469
  nextLines(id,lines,i,false);
1470
  $('flowState').textContent=lines[i];
1471
  }
1472
+ nextStopProgress();nextSetProgress(id,100);
1473
  for(const key of nextActiveKeys)if(!nextFinishedKeys.includes(key))nextFinishedKeys.push(key);
1474
  nextSetStatus(id,warning?'warning':'done');nextLines(id,lines,lines.length-1,warning);
1475
  const card=$('agent-'+id);card.classList.remove('completed-pulse');void card.offsetWidth;card.classList.add('completed-pulse');
 
1477
  nextShowCount();
1478
  }
1479
  function nextClearNetwork(reset=false){
1480
+ nextStopProgress();
1481
  nextActiveKeys=[];if(reset)nextFinishedKeys=[];
1482
  clearTimeout(nextTransferTimeout);$('conductor').classList.remove('transfering');
1483
  if(nextAnimationFrame)cancelAnimationFrame(nextAnimationFrame);nextAnimationFrame=0;