-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Style Action Input Screen and Timeline (#9)
* feat: type model for scouting system * chore: update svelte * feat: add none * refactor: type state model * feat: state transforms * add successfail screen * theme fixes * fix: package.json * fix: formating * fix: dependencies * format thingy * refactor: update types to match new schema * fix: id after clarifying with Brandon * update dep * style: format files * refactor: action input state machine into component * feat: make cancel buttons go back one level * fix: actions display on timeline * feat: piece specific error prevention * feat: ejectables! * fix: name in pkg.json + update dep * style: format files * feat: update colorsceme * feat: timeline popup above contents * feat: better timeline thingy * style: format files * feat: timeline reorder + styling * format: prettier tailwind reorder thingy * style: format files * feat: some small styling tweaks * fix: make successfail work on all screen sizes * feat: more updating styling * fix: success vs. failure logic * feat: make timeline grow up * feat: full-size buttons on ActionInput screen * feat: move page title + styling fixes * fix: better pageName handling * style: format files --------- Co-authored-by: awwpotato <[email protected]> Co-authored-by: awwpotato <[email protected]>
- Loading branch information
1 parent
938b296
commit 668526f
Showing
11 changed files
with
228 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,45 @@ | ||
<script lang="ts"> | ||
import type { AutoActionData } from '$lib/types'; | ||
import { MoveUp, MoveDown, X } from 'lucide-svelte'; | ||
let { | ||
action_data = $bindable(), | ||
deleteself | ||
}: { action_data: AutoActionData; deleteself: () => void } = $props(); | ||
index, | ||
shift, | ||
remove | ||
}: { | ||
action_data: AutoActionData; | ||
index: number; | ||
shift: (index: number, change: number) => void; | ||
remove: (index: number) => void; | ||
} = $props(); | ||
//let actionBorderColor = $derived(action.success ? 'border-cresc_green' : 'border-fail_red'); | ||
let actionBackgroundColor = $derived(action_data.success ? 'bg-cresc_green' : 'bg-fail_red'); | ||
let color = $derived( | ||
action_data.success | ||
? 'bg-jungle_green/50 shadow-jungle_green/10' | ||
: 'bg-flaming_red/50 shadow-flaming_red/10' | ||
); | ||
</script> | ||
|
||
<!-- <button --> | ||
<!-- class="{actionBorderColor} w-full p-1 rounded border-2 text-text_yellow" --> | ||
<!-- onclick={deleteself} --> | ||
<!-- > --> | ||
<!-- {action.type} --> | ||
<!-- </button> --> | ||
|
||
<button | ||
class="{actionBackgroundColor} w-full p-1 rounded border-2 border-outline_gray text-text_white" | ||
onclick={deleteself} | ||
<div | ||
class="group flex flex-row content-center justify-between {color} w-full rounded p-2 text-white shadow-lg" | ||
> | ||
{action_data.action} | ||
</button> | ||
<span class="w-auto shrink text-clip">{action_data.action}</span> | ||
<div class="flex shrink-0 flex-row content-center justify-end gap-4"> | ||
<button | ||
class="group-first:pointer-events-none group-first:opacity-30" | ||
onclick={() => shift(index, -1)} | ||
> | ||
<MoveUp /> | ||
</button> | ||
<button | ||
class="group-last:pointer-events-none group-last:opacity-30" | ||
onclick={() => shift(index, 1)} | ||
> | ||
<MoveDown /> | ||
</button> | ||
<button onclick={() => remove(index)}> | ||
<X /> | ||
</button> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
|
||
<style lang="postcss"> | ||
:global(body) { | ||
@apply bg-zinc-800; | ||
@apply bg-eerie_black text-white; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
<div class="flex flex-col items-center justify-evenly h-dvh text-text_white"> | ||
<div class="flex h-dvh flex-col items-center justify-evenly"> | ||
<h1 class="text-center text-5xl font-bold">hiiii :3</h1> | ||
<a class="text-center text-2xl rounded bg-btn_grey px-4 py-2 font-bold" href="/scout"> | ||
<a | ||
class="rounded bg-gunmetal px-4 py-2 text-center text-2xl font-bold text-yolk_yellow" | ||
href="/scout" | ||
> | ||
scout | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.