Skip to content

Commit

Permalink
feat: clear robots button
Browse files Browse the repository at this point in the history
  • Loading branch information
azaleacolburn committed Dec 12, 2024
1 parent 47d22bd commit a23e6f4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/routes/admin/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
socket.emit('remove_team_match', team_match);
};
const clear_robots = () => {
robot_queue.forEach(remove_robot);
};
</script>

<div class="grid grid-cols-2 grid-rows-2 gap-6">
Expand Down Expand Up @@ -139,7 +143,12 @@
</div>
</div>
<div class="mt-4 grid grid-cols-1 grid-rows-10 place-items-center gap-4 text-xl">
<h1 class="row-span-2">Queued Robots</h1>
<div class="row-span-2 grid grid-cols-2 grid-rows-1">
<h1>Queued Robots</h1>
<button class="rounded border p-2 text-center" onclick={clear_robots}
>Clear Robots</button
>
</div>
<div class="row-span-8 grid grid-cols-1 grid-rows-8 gap-2">
{#each robot_queue as robot}
<button onclick={() => remove_robot(robot)} class="rounded border p-2 text-center">
Expand Down

0 comments on commit a23e6f4

Please sign in to comment.