Skip to content
/ web Public

Commit 758032c

Browse files
committed
chore: fix some page transitions
1 parent 443aa7d commit 758032c

File tree

12 files changed

+327
-360
lines changed

12 files changed

+327
-360
lines changed

components/matchmaking/MatchmakingSettings.vue

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Loader2 } from "lucide-vue-next";
66
</script>
77

88
<template>
9-
<div class="space-y-2">
9+
<div class="space-y-4">
1010
<div class="flex items-center p-8 border border-border rounded-lg bg-card">
1111
<div class="flex-1">
1212
<div class="flex justify-between mb-4">
@@ -32,96 +32,96 @@ import { Loader2 } from "lucide-vue-next";
3232
</p>
3333
</div>
3434
</div>
35-
</div>
3635

37-
<div
38-
class="border border-border rounded-lg bg-card"
39-
v-if="availableRegions.length > 0"
40-
>
41-
<div class="p-4 flex justify-end">
42-
<Button
43-
variant="outline"
44-
size="sm"
45-
@click="refreshLatencies"
46-
:disabled="isRefreshing"
47-
>
48-
<Loader2 v-if="isRefreshing" class="h-4 w-4 mr-2 animate-spin" />
49-
<RefreshCw v-else class="h-4 w-4 mr-2" />
50-
{{ $t("common.refresh") }}
51-
</Button>
52-
</div>
53-
<div class="overflow-x-auto">
54-
<table class="min-w-full divide-y divide-border">
55-
<thead>
56-
<tr>
57-
<th
58-
class="px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider"
59-
>
60-
{{ $t("pages.settings.matchmaking.region") }}
61-
</th>
62-
<th
63-
class="px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider"
64-
>
65-
{{ $t("pages.settings.matchmaking.average_latency") }}
66-
</th>
67-
<th
68-
class="px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider"
69-
>
70-
{{ $t("pages.settings.matchmaking.preferred") }}
71-
</th>
72-
</tr>
73-
</thead>
74-
<tbody class="divide-y divide-border">
75-
<tr
76-
v-for="region in availableRegions"
77-
:key="region.value"
78-
:class="{
79-
'hover:bg-muted/50 transition-colors': true,
80-
'opacity-50':
81-
!availableRegions.includes(region) &&
82-
!isPreferredRegion(region.value),
83-
}"
84-
>
85-
<template
86-
v-if="
87-
!region.is_lan || getRegionlatencyResult(region.value)?.isLan
88-
"
36+
<div
37+
class="border border-border rounded-lg bg-card"
38+
v-if="availableRegions.length > 0"
39+
>
40+
<div class="p-4 flex justify-end">
41+
<Button
42+
variant="outline"
43+
size="sm"
44+
@click="refreshLatencies"
45+
:disabled="isRefreshing"
46+
>
47+
<Loader2 v-if="isRefreshing" class="h-4 w-4 mr-2 animate-spin" />
48+
<RefreshCw v-else class="h-4 w-4 mr-2" />
49+
{{ $t("common.refresh") }}
50+
</Button>
51+
</div>
52+
<div class="overflow-x-auto">
53+
<table class="min-w-full divide-y divide-border">
54+
<thead>
55+
<tr>
56+
<th
57+
class="px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider"
58+
>
59+
{{ $t("pages.settings.matchmaking.region") }}
60+
</th>
61+
<th
62+
class="px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider"
63+
>
64+
{{ $t("pages.settings.matchmaking.average_latency") }}
65+
</th>
66+
<th
67+
class="px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider"
68+
>
69+
{{ $t("pages.settings.matchmaking.preferred") }}
70+
</th>
71+
</tr>
72+
</thead>
73+
<tbody class="divide-y divide-border">
74+
<tr
75+
v-for="region in availableRegions"
76+
:key="region.value"
77+
:class="{
78+
'hover:bg-muted/50 transition-colors': true,
79+
'opacity-50':
80+
!availableRegions.includes(region) &&
81+
!isPreferredRegion(region.value),
82+
}"
8983
>
90-
<td class="px-6 py-4 whitespace-nowrap">
91-
{{ region.description || region.value }}
92-
</td>
93-
<td class="px-6 py-4 whitespace-nowrap">
94-
<div class="flex items-center gap-2">
95-
<div
96-
class="px-3 py-1 rounded-full text-xs font-medium"
97-
:class="{
98-
'bg-green-500/20 text-green-400':
99-
getLatencyStatus(region.value) === 'Excellent',
100-
'bg-blue-500/20 text-blue-400':
101-
getLatencyStatus(region.value) === 'Good',
102-
'bg-yellow-500/20 text-yellow-400':
103-
getLatencyStatus(region.value) === 'Fair',
104-
'bg-red-500/20 text-red-400':
105-
getLatencyStatus(region.value) === 'Poor',
106-
'bg-gray-500/20 text-gray-400':
107-
getLatencyStatus(region.value) === 'Measuring',
108-
}"
109-
>
110-
{{ getRegionLatency(region.value) }} ms
84+
<template
85+
v-if="
86+
!region.is_lan || getRegionlatencyResult(region.value)?.isLan
87+
"
88+
>
89+
<td class="px-6 py-4 whitespace-nowrap">
90+
{{ region.description || region.value }}
91+
</td>
92+
<td class="px-6 py-4 whitespace-nowrap">
93+
<div class="flex items-center gap-2">
94+
<div
95+
class="px-3 py-1 rounded-full text-xs font-medium"
96+
:class="{
97+
'bg-green-500/20 text-green-400':
98+
getLatencyStatus(region.value) === 'Excellent',
99+
'bg-blue-500/20 text-blue-400':
100+
getLatencyStatus(region.value) === 'Good',
101+
'bg-yellow-500/20 text-yellow-400':
102+
getLatencyStatus(region.value) === 'Fair',
103+
'bg-red-500/20 text-red-400':
104+
getLatencyStatus(region.value) === 'Poor',
105+
'bg-gray-500/20 text-gray-400':
106+
getLatencyStatus(region.value) === 'Measuring',
107+
}"
108+
>
109+
{{ getRegionLatency(region.value) }} ms
110+
</div>
111111
</div>
112-
</div>
113-
</td>
114-
<td class="px-6 py-4 whitespace-nowrap">
115-
<Switch
116-
class="text-sm text-muted-foreground cursor-pointer flex items-center gap-2"
117-
:model-value="isPreferredRegion(region.value)"
118-
@click="togglePreferredRegion(region.value)"
119-
/>
120-
</td>
121-
</template>
122-
</tr>
123-
</tbody>
124-
</table>
112+
</td>
113+
<td class="px-6 py-4 whitespace-nowrap">
114+
<Switch
115+
class="text-sm text-muted-foreground cursor-pointer flex items-center gap-2"
116+
:model-value="isPreferredRegion(region.value)"
117+
@click="togglePreferredRegion(region.value)"
118+
/>
119+
</td>
120+
</template>
121+
</tr>
122+
</tbody>
123+
</table>
124+
</div>
125125
</div>
126126
</div>
127127
</template>

components/teams/TeamMembers.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export default {
139139
return {
140140
team: undefined,
141141
roles: undefined,
142+
team_invites: [],
142143
};
143144
},
144145
apollo: {

pages/play/index.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ import Empty from "~/components/ui/empty/Empty.vue";
1313
<template>
1414
<div class="flex flex-col gap-6">
1515
<PageTransition>
16-
<template v-if="matchmakingAllowed">
17-
<Matchmaking></Matchmaking>
18-
<Separator class="my-4" />
19-
</template>
20-
<template v-else-if="canCreateMatch">
21-
<CustomMatch class="bg-card p-8 rounded-lg" />
22-
</template>
16+
<div>
17+
<template v-if="matchmakingAllowed">
18+
<Matchmaking></Matchmaking>
19+
<Separator class="my-4" />
20+
</template>
21+
<template v-else-if="canCreateMatch">
22+
<CustomMatch class="bg-card p-8 rounded-lg" />
23+
</template>
24+
</div>
2325
</PageTransition>
2426

2527
<PageTransition :delay="100">

pages/players/[id].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
} from "~/components/ui/dropdown-menu";
2828
2929
definePageMeta({
30-
alias: ["/me"],
30+
alias: ["/me/:id?"],
3131
});
3232
3333
const { isMobile } = useSidebar();

pages/settings/application/servers.vue

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,56 @@ definePageMeta({
66
</script>
77

88
<template>
9-
<form @submit.prevent="updateSettings" class="grid gap-4">
10-
<div
11-
class="flex flex-row items-center justify-between rounded-lg border p-4 cursor-pointer"
12-
@click="toggleCpuPinning"
13-
>
14-
<div class="space-y-0.5">
15-
<h4 class="text-base font-medium">
16-
{{ $t("pages.settings.application.servers.enable_cpu_pinning") }}
17-
</h4>
18-
<p class="text-sm text-muted-foreground">
19-
{{
20-
$t(
21-
"pages.settings.application.servers.enable_cpu_pinning_description",
22-
)
23-
}}
24-
</p>
9+
<PageTransition :delay="0">
10+
<form @submit.prevent="updateSettings" class="grid gap-4">
11+
<div
12+
class="flex flex-row items-center justify-between rounded-lg border p-4 cursor-pointer"
13+
@click="toggleCpuPinning"
14+
>
15+
<div class="space-y-0.5">
16+
<h4 class="text-base font-medium">
17+
{{ $t("pages.settings.application.servers.enable_cpu_pinning") }}
18+
</h4>
19+
<p class="text-sm text-muted-foreground">
20+
{{
21+
$t(
22+
"pages.settings.application.servers.enable_cpu_pinning_description",
23+
)
24+
}}
25+
</p>
26+
</div>
27+
<Switch
28+
:model-value="cpuPinningEnabled"
29+
@update:model-value="toggleCpuPinning"
30+
/>
2531
</div>
26-
<Switch
27-
:model-value="cpuPinningEnabled"
28-
@update:model-value="toggleCpuPinning"
29-
/>
30-
</div>
3132

32-
<FormField v-slot="{ componentField }" name="number_of_cpus_per_server">
33-
<FormItem>
34-
<FormLabel>{{
35-
$t("pages.settings.application.servers.number_of_cpus_per_server")
36-
}}</FormLabel>
37-
<FormDescription>{{
38-
$t(
39-
"pages.settings.application.servers.number_of_cpus_per_server_description",
40-
)
41-
}}</FormDescription>
42-
<Input type="number" v-bind="componentField" min="1" />
43-
<FormMessage />
44-
</FormItem>
45-
</FormField>
33+
<FormField v-slot="{ componentField }" name="number_of_cpus_per_server">
34+
<FormItem>
35+
<FormLabel>{{
36+
$t("pages.settings.application.servers.number_of_cpus_per_server")
37+
}}</FormLabel>
38+
<FormDescription>{{
39+
$t(
40+
"pages.settings.application.servers.number_of_cpus_per_server_description",
41+
)
42+
}}</FormDescription>
43+
<Input type="number" v-bind="componentField" min="1" />
44+
<FormMessage />
45+
</FormItem>
46+
</FormField>
4647

47-
<div class="flex justify-start">
48-
<Button
49-
type="submit"
50-
:disabled="Object.keys(form.errors).length > 0"
51-
class="my-3"
52-
>
53-
{{ $t("pages.settings.application.servers.update") }}
54-
</Button>
55-
</div>
56-
</form>
48+
<div class="flex justify-start">
49+
<Button
50+
type="submit"
51+
:disabled="Object.keys(form.errors).length > 0"
52+
class="my-3"
53+
>
54+
{{ $t("pages.settings.application.servers.update") }}
55+
</Button>
56+
</div>
57+
</form>
58+
</PageTransition>
5759
</template>
5860

5961
<script lang="ts">

0 commit comments

Comments
 (0)