Skip to content

Commit 0ce8303

Browse files
authored
chore: update to latests components (#276)
1 parent d1f2e59 commit 0ce8303

333 files changed

Lines changed: 3524 additions & 2103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

components/EloChangeBadge.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,11 @@ const chipClipSm =
148148
:avoid-collisions="true"
149149
:collision-padding="12"
150150
:class="[
151-
'!p-0 !rounded-none overflow-hidden relative',
151+
'!p-0 !rounded-none overflow-visible relative',
152152
'w-[340px] max-w-[calc(100vw-32px)]',
153153
'bg-[hsl(240_8%_11%)] text-[hsl(var(--popover-foreground))]',
154154
'font-[\'Oxanium\',sans-serif]',
155155
'border border-[hsl(240_6%_22%)]',
156-
'[clip-path:polygon(14px_0,100%_0,100%_calc(100%-14px),calc(100%-14px)_100%,0_100%,0_14px)]',
157156
isWin
158157
? 'shadow-[inset_0_1px_0_hsl(0_0%_100%/0.06),0_0_0_1px_hsl(142_71%_50%/0.2),0_2px_4px_hsl(0_0%_0%/0.4),0_12px_28px_-8px_hsl(0_0%_0%/0.85),0_30px_70px_-20px_hsl(0_0%_0%/0.95),0_0_50px_-12px_hsl(142_71%_45%/0.35)]'
159158
: 'shadow-[inset_0_1px_0_hsl(0_0%_100%/0.06),0_0_0_1px_hsl(0_84%_60%/0.2),0_2px_4px_hsl(0_0%_0%/0.4),0_12px_28px_-8px_hsl(0_0%_0%/0.85),0_30px_70px_-20px_hsl(0_0%_0%/0.95),0_0_50px_-12px_hsl(0_84%_50%/0.35)]',
@@ -336,7 +335,7 @@ const chipClipSm =
336335
class="absolute left-1/2 top-[-2px] bottom-[-2px] w-px bg-border opacity-80"
337336
/>
338337
<span
339-
class="absolute top-[-3px] bottom-[-3px] w-[3px] -translate-x-1/2 bg-[hsl(var(--tac-amber))] shadow-[0_0_8px_hsl(var(--tac-amber)/0.6)] transition-[left] duration-300 ease-[cubic-bezier(0.2,0.8,0.2,1)]"
338+
class="absolute top-[-3px] bottom-[-3px] w-[3px] -translate-x-1/2 bg-[hsl(var(--tac-amber))] shadow-[0_0_8px_hsl(var(--tac-amber)/0.6)] transition-[left] duration-300 [transition-timing-function:cubic-bezier(0.2,0.8,0.2,1)]"
340339
:style="{ left: eloGapBar + '%' }"
341340
/>
342341
</div>

components/Pagination.vue

Lines changed: 58 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<script setup lang="ts">
2+
import {
3+
ChevronLeftIcon,
4+
ChevronRightIcon,
5+
DoubleArrowLeftIcon,
6+
DoubleArrowRightIcon,
7+
} from "@radix-icons/vue";
28
import { Label } from "~/components/ui/label";
39
import {
410
Select,
@@ -9,53 +15,83 @@ import {
915
} from "~/components/ui/select";
1016
import {
1117
Pagination as PaginationRoot,
12-
PaginationList,
13-
PaginationListItem,
18+
PaginationContent,
19+
PaginationItem,
1420
PaginationFirst,
15-
PaginationPrev,
21+
PaginationPrevious,
1622
PaginationNext,
1723
PaginationLast,
1824
PaginationEllipsis,
1925
} from "~/components/ui/pagination";
20-
import { Button } from "~/components/ui/button";
26+
27+
const navControlClass =
28+
"size-9 shrink-0 rounded-md p-0 text-muted-foreground shadow-none hover:bg-transparent hover:text-foreground disabled:opacity-35";
29+
const pageItemBaseClass =
30+
"size-9 shrink-0 rounded-md border text-sm font-semibold tabular-nums shadow-none";
31+
const activePageItemClass =
32+
"border-border/80 bg-background text-foreground hover:bg-background";
33+
const inactivePageItemClass =
34+
"border-transparent bg-transparent text-muted-foreground hover:border-border/60 hover:bg-accent/40 hover:text-foreground";
2135
</script>
2236

2337
<template>
24-
<div class="flex items-center justify-between gap-4 mt-4">
38+
<div
39+
class="mt-4 flex w-full flex-col items-start gap-3 sm:flex-row sm:items-center sm:justify-between"
40+
>
2541
<PaginationRoot
2642
v-slot="{ page }"
2743
:key="`pagination-${current}`"
44+
class="mx-0 min-w-0 flex-1 justify-start overflow-x-auto"
2845
:total="total"
2946
:items-per-page="perPage"
3047
:sibling-count="1"
3148
show-edges
3249
:default-page="current"
3350
@update:page="paginate"
3451
>
35-
<PaginationList v-slot="{ items }" class="flex items-center gap-1">
36-
<PaginationFirst />
37-
<PaginationPrev />
52+
<PaginationContent v-slot="{ items }" class="flex-nowrap gap-1 pr-2">
53+
<PaginationFirst :class="navControlClass">
54+
<DoubleArrowLeftIcon class="size-3.5" />
55+
<span class="sr-only">First page</span>
56+
</PaginationFirst>
57+
<PaginationPrevious :class="navControlClass">
58+
<ChevronLeftIcon class="size-3.5" />
59+
<span class="sr-only">Previous page</span>
60+
</PaginationPrevious>
3861

3962
<template v-for="(item, index) in items">
40-
<PaginationListItem
63+
<PaginationItem
4164
v-if="item.type === 'page'"
42-
:key="index"
65+
:key="`page-${item.value}`"
4366
:value="item.value"
44-
as-child
67+
:is-active="item.value === page"
68+
:class="[
69+
pageItemBaseClass,
70+
item.value === page ? activePageItemClass : inactivePageItemClass,
71+
]"
72+
>
73+
{{ item.value }}
74+
</PaginationItem>
75+
<PaginationEllipsis
76+
v-else
77+
:key="`ellipsis-${index}`"
78+
:index="index"
79+
class="h-9 w-7 shrink-0 text-muted-foreground"
4580
>
46-
<Button
47-
class="w-10 h-10 p-0"
48-
:variant="item.value === page ? 'default' : 'outline'"
49-
>
50-
{{ item.value }}
51-
</Button>
52-
</PaginationListItem>
53-
<PaginationEllipsis v-else :key="item.type" :index="index" />
81+
<span aria-hidden="true" class="text-sm font-semibold">...</span>
82+
<span class="sr-only">More pages</span>
83+
</PaginationEllipsis>
5484
</template>
5585

56-
<PaginationNext />
57-
<PaginationLast />
58-
</PaginationList>
86+
<PaginationNext :class="navControlClass">
87+
<ChevronRightIcon class="size-3.5" />
88+
<span class="sr-only">Next page</span>
89+
</PaginationNext>
90+
<PaginationLast :class="navControlClass">
91+
<DoubleArrowRightIcon class="size-3.5" />
92+
<span class="sr-only">Last page</span>
93+
</PaginationLast>
94+
</PaginationContent>
5995
</PaginationRoot>
6096

6197
<div v-if="showPerPageSelector" class="flex items-center gap-2">

components/PlayerNameRegistration.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import { AlertCircle } from "lucide-vue-next";
5252
import { useApplicationSettingsStore } from "~/stores/ApplicationSettings";
5353
import { useForm } from "vee-validate";
5454
import { z } from "zod";
55-
import { toTypedSchema } from "@vee-validate/zod";
55+
import { toTypedSchema } from "~/utilities/vee-validate-zod";
5656
import { generateMutation } from "~/graphql/graphqlGen";
5757
import { toast } from "@/components/ui/toast";
5858
import { $ } from "~/generated/zeus";

components/SanctionPlayer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
Ban,
1717
} from "lucide-vue-next";
1818
import PlayerDisplay from "~/components/PlayerDisplay.vue";
19-
import { toTypedSchema } from "@vee-validate/zod";
19+
import { toTypedSchema } from "~/utilities/vee-validate-zod";
2020
import { z } from "zod";
2121
import { useForm } from "vee-validate";
2222
</script>

components/TimeAgo.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
props: {
2020
date: {
2121
required: true,
22-
type: String,
22+
type: [String, Number, Date],
2323
},
2424
seconds: {
2525
required: false,
@@ -56,6 +56,10 @@ export default {
5656
updateText() {
5757
const timeAgo = new TimeAgo("en-US");
5858
const time = new Date(this.date);
59+
if (Number.isNaN(time.getTime())) {
60+
this.text = "";
61+
return;
62+
}
5963
time.setSeconds(time.getSeconds() - 1);
6064
6165
if (this.seconds) {

components/chat/ChatInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import { CornerDownLeft } from "lucide-vue-next";
5959
import { FormControl, FormField, FormItem } from "~/components/ui/form";
6060
import * as z from "zod";
6161
import { useForm } from "vee-validate";
62-
import { toTypedSchema } from "@vee-validate/zod";
62+
import { toTypedSchema } from "~/utilities/vee-validate-zod";
6363
6464
export default {
6565
props: {

components/game-server-nodes/GameServerNodeRow.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ const isSectionExpanded = (section: string) => {
15381538
<!-- Desktop Metrics Row (xl and up) -->
15391539
<TableRow class="hidden xl:table-row border-t-0" v-if="shouldShowMetrics">
15401540
<TableCell :colspan="8">
1541-
<NodeMetrics :game-server-node="gameServerNode" />
1541+
<NodeMetrics :game-server-node="gameServerNode" compact-charts />
15421542
</TableCell>
15431543
</TableRow>
15441544

@@ -1685,7 +1685,7 @@ const isSectionExpanded = (section: string) => {
16851685
<script lang="ts">
16861686
import { generateMutation, generateQuery } from "~/graphql/graphqlGen";
16871687
import { useForm } from "vee-validate";
1688-
import { toTypedSchema } from "@vee-validate/zod";
1688+
import { toTypedSchema } from "~/utilities/vee-validate-zod";
16891689
import * as z from "zod";
16901690
import { toast } from "@/components/ui/toast";
16911691
import { defineComponent } from "vue";

components/game-server-nodes/UpdateGameServerLabel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import {
7777
<script lang="ts">
7878
import { generateMutation } from "~/graphql/graphqlGen";
7979
import { useForm } from "vee-validate";
80-
import { toTypedSchema } from "@vee-validate/zod";
80+
import { toTypedSchema } from "~/utilities/vee-validate-zod";
8181
import * as z from "zod";
8282
import { toast } from "@/components/ui/toast";
8383

components/game-type-configs/GameTypeConfigForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { generateMutation } from "~/graphql/graphqlGen";
33
import { toast } from "@/components/ui/toast";
44
import { useForm } from "vee-validate";
5-
import { toTypedSchema } from "@vee-validate/zod";
5+
import { toTypedSchema } from "~/utilities/vee-validate-zod";
66
import { z } from "zod";
77
import {
88
AlertDialog,

components/map-pools/MapForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { generateMutation } from "~/graphql/graphqlGen";
33
import { toast } from "@/components/ui/toast";
44
import { useForm } from "vee-validate";
5-
import { toTypedSchema } from "@vee-validate/zod";
5+
import { toTypedSchema } from "~/utilities/vee-validate-zod";
66
import { z } from "zod";
77
import { e_match_types_enum } from "~/generated/zeus";
88
import {

0 commit comments

Comments
 (0)