diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a882442 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..79e544f --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,22 @@ +name: Format + +on: + push: + pull_request: + +jobs: + format: + runs-on: ubuntu-latest + name: Format Files + steps: + - uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v2 + - run: bun install + - name: Prettier + run: bun run format ./src + env: + GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} + - uses: stefanzweifel/git-auto-commit-action@v4 + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + with: + commit_message: 'style: format files' diff --git a/README.md b/README.md index 3620165..337d398 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # inflatedchickens ## usage + ```bash # install dependencies bun i diff --git a/bun.lockb b/bun.lockb index 35a82e3..1e6848d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/postcss.config.js b/postcss.config.js index 2e7af2b..0f77216 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/src/app.html b/src/app.html index 165a387..00b6bae 100644 --- a/src/app.html +++ b/src/app.html @@ -1,12 +1,12 @@ - + - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/lib/components/Action.svelte b/src/lib/components/Action.svelte index 50ab92f..1e4f9ec 100644 --- a/src/lib/components/Action.svelte +++ b/src/lib/components/Action.svelte @@ -1,11 +1,27 @@ - diff --git a/src/lib/components/Timeline.svelte b/src/lib/components/Timeline.svelte index 63173a3..6680589 100644 --- a/src/lib/components/Timeline.svelte +++ b/src/lib/components/Timeline.svelte @@ -2,15 +2,19 @@ import type { ActionData } from '$lib/types'; import Action from './Action.svelte'; - let { actions = $bindable() }: { actions: ActionData[] } = $props() + let { actions = $bindable() }: { actions: ActionData[] } = $props(); + // let latestActions: ActionData[] = $derived(actions.toReversed().slice(0, 5)); +

Timeline

-
+
{#each actions as _, i} { - actions.splice(i, 1); + actions.splice(actions.indexOf(actions[i]), 1); }} /> {/each} diff --git a/src/lib/types.ts b/src/lib/types.ts index 3b0d357..712d52b 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -1,19 +1,19 @@ export enum actionType { - IntakeTote = 'Intake Tote', - EjectTote = 'Eject Tote', - IntakeBalloon = 'Intake Balloon', - ScoreLow = 'Score Low', - ScoreExternalTote = 'Score External Tote', - ScoreInternalTote = 'Score Internal Tote', - ScoreAnotherRobotsTote = 'Score Another Robots Tote' + IntakeTote = 'Intake Tote', + EjectTote = 'Eject Tote', + IntakeBalloon = 'Intake Balloon', + ScoreLow = 'Score Low', + ScoreExternalTote = 'Score External Tote', + ScoreInternalTote = 'Score Internal Tote', + ScoreAnotherRobotsTote = 'Score Another Robots Tote' } export enum actionResult { - success = 'success', - fail = 'fail' + success = 'success', + fail = 'fail' } export type ActionData = { - type: actionType; - result: actionResult; -} + type: actionType; + result: actionResult; +}; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index ac60bc0..060a519 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,13 +1,14 @@ +{@render children()} + - -{@render children()} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 6fb7d44..aefc4d7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,8 +1,6 @@ -
-

- hiiii :3 -

- - scout - +
+

hiiii :3

+ + scout +
diff --git a/src/routes/scout/+page.svelte b/src/routes/scout/+page.svelte index f5ba4a6..592c39c 100644 --- a/src/routes/scout/+page.svelte +++ b/src/routes/scout/+page.svelte @@ -4,17 +4,20 @@ function addAction() { //everything here is for testing, as there is no system for this yet - latestActions.push({ type: actionType.ScoreAnotherRobotsTote, result: actionResult.success }); - latestActions.push({ type: actionType.EjectTote, result: actionResult.fail }); - latestActions.push({ type: actionType.IntakeTote, result: actionResult.success }); + actions.push({ type: actionType.ScoreAnotherRobotsTote, result: actionResult.success }); + actions.push({ type: actionType.EjectTote, result: actionResult.fail }); + actions.push({ type: actionType.IntakeTote, result: actionResult.success }); } - let latestActions: ActionData[] = $state([]); + let actions: ActionData[] = $state([]);
- + - - + +
diff --git a/tailwind.config.js b/tailwind.config.js index e009022..2c73fee 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,21 +1,21 @@ /** @type {import('tailwindcss').Config} */ export default { - content: ['./src/**/*.{html,js,svelte,ts}'], - theme: { - colors: { - "navbar_black": "#1c1c1c", - "outline_gray": "#ec4899", - "cresc_green": "#49A078", - "bg_gray": "#020617", - "slack_purple": "#4A154B", - "robot_blue": "#0083E6", - "robot_red": "#ED1C24", - "fail_red": "#FF6663", - "btn_grey": "#0f172a", - "text_red": "#FF4848", - "text_yellow": "#F6B14B", - }, - extend: {}, - }, - plugins: [], -} + content: ['./src/**/*.{html,js,svelte,ts}'], + theme: { + colors: { + navbar_black: '#1c1c1c', + outline_gray: '#ec4899', + cresc_green: '#49A078', + bg_gray: '#020617', + slack_purple: '#4A154B', + robot_blue: '#0083E6', + robot_red: '#ED1C24', + fail_red: '#FF6663', + btn_grey: '#0f172a', + text_red: '#FF4848', + text_yellow: '#F6B14B' + }, + extend: {} + }, + plugins: [] +};