From a11b6f454f11ac371de13f455c84d8acf9daab2b Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Sat, 26 Oct 2024 15:36:52 -0700 Subject: [PATCH] Implement AvailabilityGrid component --- availabili.tf/src/assets/base.css | 5 +- availabili.tf/src/assets/main.css | 25 +- .../src/components/AvailabilityComboBox.vue | 89 ++++++ .../src/components/AvailabilityGrid.vue | 259 +++++++++++++++++- availabili.tf/src/components/PlayerCard.vue | 35 ++- .../src/components/WeekSelectionBox.vue | 17 ++ availabili.tf/src/stores/roster.ts | 22 +- availabili.tf/src/views/RosterBuilderView.vue | 7 +- availabili.tf/src/views/ScheduleView.vue | 69 ++++- 9 files changed, 508 insertions(+), 20 deletions(-) create mode 100644 availabili.tf/src/components/AvailabilityComboBox.vue create mode 100644 availabili.tf/src/components/WeekSelectionBox.vue diff --git a/availabili.tf/src/assets/base.css b/availabili.tf/src/assets/base.css index 60a8f37..5a36c4b 100644 --- a/availabili.tf/src/assets/base.css +++ b/availabili.tf/src/assets/base.css @@ -40,7 +40,10 @@ --green: #a6e3a1; --lavender: #7287fd; --accent: var(--lavender); - --accent-transparent: color-mix(in srgb, var(--accent), transparent 80%); + --accent-transparent-80: color-mix(in srgb, var(--accent), transparent 80%); + --accent-transparent-50: color-mix(in srgb, var(--accent), transparent 50%); + --accent-transparent: var(--accent-transparent-80); + --shadow: color-mix(in srgb, var(--text), transparent 50%); } diff --git a/availabili.tf/src/assets/main.css b/availabili.tf/src/assets/main.css index b4051ce..03fa55f 100644 --- a/availabili.tf/src/assets/main.css +++ b/availabili.tf/src/assets/main.css @@ -25,10 +25,23 @@ a, button { font-weight: 700; color: var(--text); - background-color: var(--surface-0); + background-color: var(--crust); border: none; - padding: 8px; + padding: 8px 16px; border-radius: 4px; + font-family: + Inter, + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + Oxygen, + Ubuntu, + Cantarell, + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', + sans-serif; } button.accent { @@ -37,6 +50,10 @@ button.accent { text-transform: uppercase; } +button.accent { + +} + h1 { font-weight: 800; font-size: 200%; @@ -46,3 +63,7 @@ h1 { em.aside { color: var(--overlay-0); } + +select { + appearance: none; +} diff --git a/availabili.tf/src/components/AvailabilityComboBox.vue b/availabili.tf/src/components/AvailabilityComboBox.vue new file mode 100644 index 0000000..148fe3b --- /dev/null +++ b/availabili.tf/src/components/AvailabilityComboBox.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/availabili.tf/src/components/AvailabilityGrid.vue b/availabili.tf/src/components/AvailabilityGrid.vue index 09cf09e..d461ce9 100644 --- a/availabili.tf/src/components/AvailabilityGrid.vue +++ b/availabili.tf/src/components/AvailabilityGrid.vue @@ -1,11 +1,268 @@ diff --git a/availabili.tf/src/components/PlayerCard.vue b/availabili.tf/src/components/PlayerCard.vue index 2c2fc95..6a59d82 100644 --- a/availabili.tf/src/components/PlayerCard.vue +++ b/availabili.tf/src/components/PlayerCard.vue @@ -52,6 +52,11 @@ function onClick() { } } }; + +const playtime = computed(() => { + let hours = props.player?.playtime / 3600 ?? 0; + return hours.toFixed(1); +});