diff --git a/.prettierrc b/.prettierrc index 9573023..8bc6e86 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,6 +3,6 @@ "singleQuote": true, "trailingComma": "none", "printWidth": 100, - "plugins": ["prettier-plugin-svelte"], + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/bun.lockb b/bun.lockb index 776ad14..a0825cf 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 62d2359..e1f49f0 100644 --- a/package.json +++ b/package.json @@ -30,5 +30,8 @@ "typescript": "^5.6.3", "typescript-eslint": "^8.14.0", "vite": "^5.4.11" + }, + "dependencies": { + "lucide-svelte": "^0.456.0" } } diff --git a/src/lib/components/Action.svelte b/src/lib/components/Action.svelte index 1a5a1be..103f0fb 100644 --- a/src/lib/components/Action.svelte +++ b/src/lib/components/Action.svelte @@ -1,25 +1,45 @@ - - - - - - - - + {action_data.action} +
+ + + +
+ diff --git a/src/lib/components/SuccessFail.svelte b/src/lib/components/SuccessFail.svelte index 007da5b..a2ffa60 100644 --- a/src/lib/components/SuccessFail.svelte +++ b/src/lib/components/SuccessFail.svelte @@ -3,19 +3,21 @@ $props(); -
- - - +
+ + + +
diff --git a/src/lib/components/Timeline.svelte b/src/lib/components/Timeline.svelte index de4c097..769a74d 100644 --- a/src/lib/components/Timeline.svelte +++ b/src/lib/components/Timeline.svelte @@ -2,15 +2,38 @@ import type { AutoActionData } from '$lib/types'; import Action from './Action.svelte'; - let { actions = $bindable() }: { actions: AutoActionData[] } = $props(); + let { + actions = $bindable(), + displaying = $bindable() + }: { actions: AutoActionData[]; displaying: boolean } = $props(); // let latestActions: AutoActionData[] = $derived(actions.toReversed().slice(0, 5)); + + const remove = (index: number) => { + actions.splice(index, 1); + }; + + const shift = (index: number, change: number) => { + let item = actions[index]; + actions.splice(index, 1); + actions.splice(index + change, 0, item); + }; -{#each actions as _, i} - { - actions.splice(actions.indexOf(actions[i]), 1); - }} - /> -{/each} + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 4b474b2..493a0b6 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -7,6 +7,6 @@ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index aefc4d7..cfde746 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,6 +1,9 @@ -
+

hiiii :3

- + scout
diff --git a/src/routes/scout/+page.svelte b/src/routes/scout/+page.svelte index ddf130b..7e480ec 100644 --- a/src/routes/scout/+page.svelte +++ b/src/routes/scout/+page.svelte @@ -1,5 +1,5 @@ -
-

Team {team_key}

- {#if timelineExtended} -
- -
- - {:else} -
- -
+
+
+ Team {team_key} + {pageName} +
- - {/if} + + + +
diff --git a/src/routes/scout/ActionInputs.svelte b/src/routes/scout/ActionInputs.svelte index eadb514..407d974 100644 --- a/src/routes/scout/ActionInputs.svelte +++ b/src/routes/scout/ActionInputs.svelte @@ -1,16 +1,20 @@ -

Number of pieces currently held: {held_scorables}

-
+
{#if is_none_state} -
- +
+ {#if held_scorables > 0} - + {/if} {#if held_ejectables > 0} - + {/if}
{:else if is_intake_state} -
- - + - (actionState = 'IntakeTote')} + >Tote - (actionState = 'IntakeBalloon')} + >Balloon: Ground (actionState = 'IntakeBalloonCoral')}>Ballon: Coral
+ {:else if is_score_state} -
+
{#if held_bunnies > 0} - - - {#if held_totes > 0} - - {/if} - +
+

Bunny

+
+ + + {#if held_totes > 0} + + {/if} + +
+
{/if} {#if held_balloons > 0} - - - {#if held_totes > 0} - - {/if} - +
+

Ballon

+
+ + + {#if held_totes > 0} + + {/if} + +
+
{/if} - (actionState = 'None')} + >Cancel
{:else if is_eject_state} -
+
{#if held_bunnies > 0} - (actionState = 'EjectBunny')}>Bunny {/if} {#if held_balloons > 0} (actionState = 'EjectBalloon')}>Ballon {/if} {#if held_totes > 0} - (actionState = 'EjectTote')}>Tote {/if} -
+ {:else}