Progress Tile
<zn-progress-tile>
ZnProgressTile
Progress tiles show a person and their status, with a bar filling up as their wait time runs out.
<zn-progress-tile class="progress-demo" caption="John Doe" status="Active" avatar="JohnDoe@avatar" wait-time="40"> </zn-progress-tile> <script type="module"> const now = Math.floor(Date.now() / 1000); const tile = document.querySelector('.progress-demo'); tile.setAttribute('start-time', now - 95); tile.setAttribute('max-time', now - 600); </script>
A progress tile tracks one conversation or task. All times are Unix times in seconds.
start-timeis when it started. The total time on the right counts up from it.-
max-timesets the scale of the top bar: the bar is full when the time sincestart-timereaches the time sincemax-time. -
wait-timeis how many seconds the person has been waiting. The lower bar fills as it approachesmax-wait-time(default 300), amber from 60 seconds until half ofmax-wait-time, and red at the limit. -
statusis shown next to the wait time.avataris any Iconsrc.
Examples
Waiting for an Agent
Add waiting-agent-response to show “Waiting for Agent” and count wait-time up
every second.
<zn-progress-tile class="progress-waiting" caption="Jane Cooper" avatar="JaneCooper@avatar" wait-time="100" waiting-agent-response> </zn-progress-tile> <script type="module"> const now = Math.floor(Date.now() / 1000); const tile = document.querySelector('.progress-waiting'); tile.setAttribute('start-time', now - 400); tile.setAttribute('max-time', now - 600); </script>
Ended
Set status="Ended" and an end-time to stop the clock: the total shows the time
from start-time to end-time.
<zn-progress-tile caption="Cody Fisher" status="Ended" avatar="CodyFisher@avatar" start-time="1743070000" end-time="1743070845" max-time="1743069000"> </zn-progress-tile>