Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…dchickens into Brandon/Database
  • Loading branch information
azaleacolburn committed Dec 11, 2024
2 parents f292c6d + 1ee1ac7 commit d83d13e
Show file tree
Hide file tree
Showing 13 changed files with 163 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ insert_final_newline = true
indent_style = space
indent_size = 4

[*.nix]
[*.{yml,yaml,nix}]
indent_size = 2
26 changes: 10 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
name: Build

on:
pull_request:
pull_request:

jobs:
format:
runs-on: ubuntu-latest
name: Build Application
steps:
- name: Checkout
- uses: actions/checkout@v3

- name: Setup
- uses: oven-sh/setup-bun@v2

- name: Install
- run: bun install

- name: Build
- run: bun run build
format:
runs-on: ubuntu-latest
name: Build Application
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v2
- run: bun install
- name: Build
run: bun run build
34 changes: 17 additions & 17 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Format

on:
push:
pull_request:
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'
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'
22 changes: 22 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
pull_request:
paths:
- 'flake.nix'
push:
paths:
- 'flake.nix'

jobs:
nix-check:
name: Check Nix Dev Shell
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v12
- name: Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v7
- name: Check
run: nix flake check -L
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
Expand All @@ -14,6 +19,7 @@
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
bun
nodePackages.prettier
];
};
});
Expand Down
4 changes: 3 additions & 1 deletion src/lib/components/Timeline.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
</script>

<button
class="fixed inset-0 transition-all {displaying ? 'backdrop-blur' : 'translate-y-full'}"
class="fixed inset-0 transition-all will-change-transform {displaying
? 'backdrop-blur'
: 'translate-y-full'}"
onclick={(e: Event) => {
if (e.target === e.currentTarget && is_valid_timeline) {
displaying = false;
Expand Down
15 changes: 7 additions & 8 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
placeholder="Please enter your name here"
bind:value={inputname}
/>
{#if inputname != ''}
<button
class="text-l bg-grey rounded border-2 border-solid px-4 py-2 text-center text-white"
on:click={login}
>
Login
</button>
{/if}
<button
class="text-l rounded bg-gunmetal px-4 py-2 text-center
{inputname === '' ? 'pointer-events-none text-white/50' : ''}"
on:click={login}
>
Login
</button>
</div>
</div>
18 changes: 6 additions & 12 deletions src/routes/homepage/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@
<h1 class="text-center text-5xl font-bold">
Welcome, <br /><span class="text-yellow-400">{username}</span>
</h1>
<a
class="w-9/12 rounded-full border-4 border-solid p-4 pb-16 pt-16 text-center text-2xl"
href="/queue"
>
Scout
</a>
<a
class="w-9/12 rounded-full border-4 border-solid p-4 pb-16 pt-16 text-center text-2xl"
href="/manual_scout"
>
Manual Scout
</a>
<div class="flex flex-col gap-4">
<a class="w-full rounded bg-gunmetal p-4 text-center text-2xl" href="/queue"> Scout </a>
<a class="w-full rounded bg-gunmetal p-4 text-center text-2xl" href="/manual_scout">
Manual Scout
</a>
</div>
</div>
60 changes: 31 additions & 29 deletions src/routes/manual_scout/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { ArrowLeft } from 'lucide-svelte';
import { goto } from '$app/navigation';
let match_key: string = '';
Expand All @@ -11,39 +12,40 @@
alert('Invalid color, please select red or blue');
return;
}
if (match_key === '' || team_key === '') {
alert('Please input a match and team key');
return;
}
goto(`/scout/${match_key}-${team_key}-${color}`);
}
</script>

<div class="grid grid-cols-1 grid-rows-4 gap-4 pr-4 pt-4 text-center text-xl">
<div class="grid grid-cols-3">
<span class="col-span-1 flex items-center justify-center">Match Key</span>
<input
class="col-span-2 rounded p-4 text-black"
bind:value={match_key}
type="text"
placeholder="2024orbb_qm1"
/>
</div>
<div class="flex min-h-dvh flex-col gap-2 p-4 text-xl">
<a href="/homepage" class="flex w-fit items-center text-lg"><ArrowLeft size={24} />Homepage</a>
<span class="flex items-center">Match Key</span>
<input
class="col-span-2 rounded bg-gunmetal p-4"
bind:value={match_key}
type="text"
placeholder="2024orbb_qm1"
/>

<span class="flex items-center">Team Key</span>
<input
class="col-span-2 rounded bg-gunmetal p-4"
bind:value={team_key}
type="text"
placeholder="1540"
/>

<span class="flex items-center">Color</span>
<select name="color" bind:value={color} class="col-span-2 block rounded bg-gunmetal p-4">
<option selected value="">Select a color</option>
<option value="blue">Blue</option>
<option value="red">Red</option>
</select>

<div class="grid grid-cols-3">
<span class="col-span-1 flex items-center justify-center">Team Key</span>
<input
class="col-span-2 rounded p-4 text-black"
bind:value={team_key}
type="text"
placeholder="1540"
/>
</div>
<div class="grid grid-cols-3">
<span class="col-span-1 flex items-center justify-center">Color</span>
<input
class="col-span-2 rounded p-4 text-black"
bind:value={color}
type="text"
placeholder="Red"
/>
</div>
<div class="flex-grow"></div>

<button class="ml-4 rounded border p-4" onclick={scout}>Scout</button>
<button class="rounded bg-gunmetal px-4 py-2" onclick={scout}>Scout</button>
</div>
5 changes: 2 additions & 3 deletions src/routes/queue/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
};
</script>

<div class="grid h-full w-full grid-cols-1 grid-rows-2 place-items-center gap-4 align-middle">
<div class="grid min-h-dvh grid-cols-1 grid-rows-2 place-items-center gap-4 align-middle">
<h1 class="p-2 font-heading text-5xl font-bold text-yellow-400">In Queue</h1>

<button class="w-9/12 rounded-full border-4 p-8 pb-16 pt-16 text-2xl text-white" onclick={leave}
>Leave Queue</button
<button class="rounded bg-gunmetal p-4 text-center text-2xl" onclick={leave}>Leave Queue</button
>
</div>
Loading

0 comments on commit d83d13e

Please sign in to comment.