diff --git a/availabili.tf/src/assets/main.css b/availabili.tf/src/assets/main.css index df4efc1..24775ab 100644 --- a/availabili.tf/src/assets/main.css +++ b/availabili.tf/src/assets/main.css @@ -76,6 +76,17 @@ i.bi.margin { margin-right: 0.5em; } +button.checkbox, button.checkbox.icon { + outline: 1px solid var(--overlay-0); + font-size: 1rem; + height: 24px; + width: 24px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; +} + button:hover { background-color: var(--surface-0); } @@ -206,7 +217,7 @@ main { padding: 2rem; } -input { +input, textarea { display: block; width: 100%; color: var(--text); @@ -233,6 +244,10 @@ input { sans-serif; } +textarea { + resize: vertical; +} + .form-group { display: flex; flex-direction: column; @@ -312,6 +327,7 @@ hr { z-index: 1; position: fixed; inset: 0; + animation: smooth-appear 0.2s ease; } [role="dialog"] { @@ -321,6 +337,16 @@ hr { transform: translateX(-50%) translateY(-50%); background-color: var(--base); z-index: 10; + animation: smooth-appear 0.2s ease; +} + +@keyframes smooth-appear { + from { + opacity: 0; + } + to { + opacity: 1; + } } div.banner { diff --git a/availabili.tf/src/components/EventSchedulerForm.vue b/availabili.tf/src/components/EventSchedulerForm.vue index 603588a..d978e42 100644 --- a/availabili.tf/src/components/EventSchedulerForm.vue +++ b/availabili.tf/src/components/EventSchedulerForm.vue @@ -1,16 +1,40 @@ - Roster for Snus Brotherhood + Roster for {{ team?.teamName }} - {{ moment.unix(rosterStore.startTime).format("LL LT") }} + {{ startTime }} + + + + {{ startTimeTeamTz }} diff --git a/availabili.tf/src/components/GithubCommitHistory.vue b/availabili.tf/src/components/GithubCommitHistory.vue index 0f2b060..5bbcc9a 100644 --- a/availabili.tf/src/components/GithubCommitHistory.vue +++ b/availabili.tf/src/components/GithubCommitHistory.vue @@ -13,7 +13,7 @@ onMounted(() => { - Commit History + Changelog/Commit History { }); const nextHour = computed(() => { - const now = moment().utc(); + const now = moment(); const time = now.clone().tz(props.team.tzTimezone); - if (time.minute() >= props.team.minuteOffset) { + let minute = time.minute(); + let minuteOffset = props.team.minuteOffset; + if (minute >= minuteOffset) { time.add(1, "hour"); - time.minute(props.team.minuteOffset); } + time.minute(minuteOffset); const diff = time.utc().diff(now, "minutes", false); diff --git a/availabili.tf/src/components/SchedulePlayerListItem.vue b/availabili.tf/src/components/SchedulePlayerListItem.vue index 13d7c83..7b08141 100644 --- a/availabili.tf/src/components/SchedulePlayerListItem.vue +++ b/availabili.tf/src/components/SchedulePlayerListItem.vue @@ -2,6 +2,7 @@ import { useScheduleStore } from "../stores/schedule"; import { computed, type PropType } from "vue"; import { type AvailabilitySchema } from "@/client"; +import { CheckboxIndicator, CheckboxRoot } from "radix-vue"; const scheduleStore = useScheduleStore(); @@ -21,10 +22,21 @@ const availabilityAtHoveredIndex = computed(() => { return undefined; }); -const props = defineProps({ - player: Object as PropType, +const selectedMember = computed({ + get: () => scheduleStore.selectedMembers[props.player.steamId] ?? false, + set: (value: boolean) => { + console.log("set", value); + scheduleStore.selectedMembers[props.player.steamId] = value; + }, }); +const props = defineProps<{ + player: AvailabilitySchema; +}>(); +//const props = defineProps({ +// player: Object as PropType, +//}); + function onMouseOver() { if (props.player) { scheduleStore.hoveredMember = props.player; @@ -45,16 +57,25 @@ function onMouseLeave() { @mouseover="onMouseOver" @mouseleave="onMouseLeave" > - + /--> + + + + + + {{ player.username }} @@ -105,4 +126,15 @@ input { .player s { color: var(--overlay-0); } + +label { + display: flex; + align-items: center; + gap: 0.5rem; +} + +button.player-checkbox.icon i.bi { + /* dont take up space */ + position: relative; +} diff --git a/availabili.tf/src/composables/team-details.ts b/availabili.tf/src/composables/team-details.ts index edf61bb..d588596 100644 --- a/availabili.tf/src/composables/team-details.ts +++ b/availabili.tf/src/composables/team-details.ts @@ -8,7 +8,7 @@ export function useTeamDetails() { const teamsStore = useTeamsStore(); const invitesStore = useInvitesStore(); - const teamId = computed(() => Number(route.params.id)); + const teamId = computed(() => Number(route.params.id ?? route.params.teamId)); const team = computed(() => { return teamsStore.teams[teamId.value]; diff --git a/availabili.tf/src/views/RosterBuilderView.vue b/availabili.tf/src/views/RosterBuilderView.vue index 921da04..fdc0afb 100644 --- a/availabili.tf/src/views/RosterBuilderView.vue +++ b/availabili.tf/src/views/RosterBuilderView.vue @@ -2,7 +2,7 @@ import PlayerCard from "../components/PlayerCard.vue"; import { computed, reactive, onMounted, ref } from "vue"; import { useRosterStore } from "../stores/roster"; -import { useRoute } from "vue-router"; +import { RouterLink, useRoute } from "vue-router"; import moment from "moment"; import { useEventsStore } from "@/stores/events"; import EventSchedulerForm from "@/components/EventSchedulerForm.vue"; @@ -60,10 +60,6 @@ onMounted(async () => { - - - Back - diff --git a/availabili.tf/src/views/ScheduleView.vue b/availabili.tf/src/views/ScheduleView.vue index 046f186..0e0e31c 100644 --- a/availabili.tf/src/views/ScheduleView.vue +++ b/availabili.tf/src/views/ScheduleView.vue @@ -138,6 +138,12 @@ onMounted(() => { + + + CTRL + Click to fill entire visible column, + Shift + Click to fill entire row + +