Skip to content

Commit 804de57

Browse files
committed
chore: update menus
1 parent 815db98 commit 804de57

7 files changed

Lines changed: 57 additions & 52 deletions

File tree

‎components/ClipBoard.vue‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
import { Copy } from "lucide-vue-next";
33
</script>
44
<template>
5-
<div class="copy bg-background hover:bg-background/50 transition-colors" @click="copyToClipboard">
5+
<div
6+
class="copy bg-background hover:bg-background/50 transition-colors"
7+
@click="copyToClipboard"
8+
>
69
<div
710
ref="copy"
811
class="icon--btn icon--btn-small"
@@ -38,42 +41,42 @@ export default {
3841
} else {
3942
this.fallbackCopyToClipboard(this.data);
4043
}
41-
44+
4245
toast({
4346
title: "Copied to Clipboard",
4447
});
4548
} catch (err) {
46-
console.error('Failed to copy to clipboard:', err);
49+
console.error("Failed to copy to clipboard:", err);
4750
this.fallbackCopyToClipboard(this.data);
4851
toast({
4952
title: "Copied to Clipboard",
5053
});
5154
}
5255
},
53-
56+
5457
fallbackCopyToClipboard(text) {
5558
// Create a temporary textarea element
5659
const textArea = document.createElement("textarea");
5760
textArea.value = text;
58-
61+
5962
// Make it invisible
6063
textArea.style.position = "fixed";
6164
textArea.style.left = "-999999px";
6265
textArea.style.top = "-999999px";
6366
document.body.appendChild(textArea);
64-
67+
6568
// Select and copy the text
6669
textArea.focus();
6770
textArea.select();
68-
71+
6972
try {
70-
document.execCommand('copy');
73+
document.execCommand("copy");
7174
} catch (err) {
72-
console.error('Fallback copy failed:', err);
75+
console.error("Fallback copy failed:", err);
7376
}
74-
77+
7578
document.body.removeChild(textArea);
76-
}
79+
},
7780
},
7881
};
7982
</script>

‎components/match/MyMatches.vue‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ export default {
3636
perPage: 10,
3737
myMatches: [],
3838
myMatchesAggregate: undefined,
39-
statuses: [
40-
e_match_status_enum.Forfeit,
41-
e_match_status_enum.Canceled,
42-
e_match_status_enum.Surrendered,
43-
e_match_status_enum.Tie,
44-
e_match_status_enum.Finished,
45-
],
4639
};
4740
},
4841
apollo: {
@@ -57,9 +50,6 @@ export default {
5750
is_in_lineup: {
5851
_eq: true,
5952
},
60-
status: {
61-
_in: $("statuses", "[e_match_status_enum]"),
62-
},
6353
},
6454
order_by: [
6555
{},
@@ -91,9 +81,6 @@ export default {
9181
is_in_lineup: {
9282
_eq: true,
9383
},
94-
status: {
95-
_in: $("statuses", "[e_match_status_enum]"),
96-
},
9784
},
9885
},
9986
{

‎i18n/locales/en.json‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
}
251251
},
252252
"matches": {
253-
"title": "My Recent Matches",
253+
"title": "My Matches",
254254
"description": "Your most recent completed matches",
255255
"create": "Create Match",
256256
"last_ten_wins": "Last 10 Wins",
@@ -446,7 +446,7 @@
446446
"navigation": {
447447
"play": "Play",
448448
"watch": "Watch",
449-
"matches": "Matches",
449+
"matches": "My Matches",
450450
"tournaments": "Tournaments",
451451
"players": "Players",
452452
"teams": "Teams"
@@ -499,19 +499,24 @@
499499
}
500500
},
501501
"top_nav": {
502+
"my_matches": "My Matches",
503+
"home": "My Matches",
502504
"play_menu": "Play",
503505
"community_menu": "Community",
504506
"watch_menu": "Watch",
505507
"play": {
506508
"find_match": "Find a Match",
507509
"tournaments": "Tournaments",
508-
"view_previous_matches": "View Previous Matches",
509510
"hero": {
510511
"title": "Play & Compete",
511-
"subtitle": "Join matches, tournaments, and view your match history."
512+
"subtitle": "Join matches, tournaments."
512513
}
513514
},
514515
"community": {
516+
"watch": {
517+
"title": "Watch",
518+
"subtitle": "Watch matches, tournaments."
519+
},
515520
"players": {
516521
"title": "Players",
517522
"subtitle": "Browse and search for players"

‎layouts/components/LeftNav.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ import Logout from "./Logout.vue";
8787
:tooltip="$t('layouts.app_nav.tooltips.matches')"
8888
>
8989
<NuxtLink
90-
:to="{ name: 'matches' }"
90+
:to="{ name: 'my-matches' }"
9191
:class="{
9292
'router-link-active': isRouteActive('matches'),
9393
}"

‎layouts/components/TopNav.vue‎

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ const { isMobile } = useSidebar();
5050
<!-- Unified Play and Community menus for all screen sizes -->
5151
<NavigationMenu>
5252
<NavigationMenuList class="flex items-center">
53+
<NavigationMenuItem class="hidden md:block">
54+
<NavigationMenuLink as-child>
55+
<NuxtLink
56+
to="/my-matches"
57+
class="uppercase font-bold px-4 py-2 transition-colors duration-150 border-none outline-none focus:ring-0 hover:text-green-300 rounded bg-transparent"
58+
>
59+
{{ $t("layouts.top_nav.home") }}
60+
</NuxtLink>
61+
</NavigationMenuLink>
62+
</NavigationMenuItem>
63+
5364
<!-- Play menu with hero card -->
5465
<NavigationMenuItem>
5566
<NavigationMenuTrigger
@@ -82,16 +93,16 @@ const { isMobile } = useSidebar();
8293
</NuxtLink>
8394
</NavigationMenuLink>
8495
</li>
85-
<li>
96+
<NavigationMenuItem class="block md:hidden">
8697
<NavigationMenuLink as-child>
8798
<NuxtLink
88-
to="/matches"
99+
to="/my-matches"
89100
class="block w-full text-left px-4 py-2 uppercase font-bold text-sm transition-colors duration-150 border-none outline-none hover:text-green-300"
90101
>
91-
{{ $t("layouts.top_nav.play.view_previous_matches") }}
102+
{{ $t("layouts.top_nav.my_matches") }}
92103
</NuxtLink>
93104
</NavigationMenuLink>
94-
</li>
105+
</NavigationMenuItem>
95106
</ul>
96107
<div
97108
class="flex flex-col items-center justify-center bg-[#18181b] rounded-t-lg md:rounded-l-lg md:rounded-tr-none p-6 min-w-[120px] max-w-[200px]"
@@ -106,7 +117,7 @@ const { isMobile } = useSidebar();
106117
</div>
107118
</NavigationMenuContent>
108119
</NavigationMenuItem>
109-
<NavigationMenuItem>
120+
<NavigationMenuItem class="hidden md:block">
110121
<NavigationMenuLink as-child>
111122
<NuxtLink
112123
to="/watch"
@@ -134,6 +145,21 @@ const { isMobile } = useSidebar();
134145
<div
135146
class="text-xs font-bold text-neutral-400 mb-2 uppercase tracking-widest"
136147
></div>
148+
<li class="block md:hidden">
149+
<NavigationMenuLink as-child>
150+
<NuxtLink
151+
to="/watch"
152+
class="flex flex-col px-2 py-2 rounded hover:text-green-300 transition-colors"
153+
>
154+
<span class="block font-bold">{{
155+
$t("layouts.top_nav.community.watch.title")
156+
}}</span>
157+
<span class="block text-xs text-neutral-400">{{
158+
$t("layouts.top_nav.community.watch.subtitle")
159+
}}</span>
160+
</NuxtLink>
161+
</NavigationMenuLink>
162+
</li>
137163
<li>
138164
<NavigationMenuLink as-child>
139165
<NuxtLink

‎pages/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
definePageMeta({
33
middleware: [
44
function (to, from) {
5-
return navigateTo("/play");
5+
return navigateTo("/my-matches");
66
},
77
],
88
});
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,7 @@ import { PlusCircle } from "lucide-vue-next";
6363
<Separator class="my-4" />
6464

6565
<Card class="p-4">
66-
<Tabs default-value="my-matches">
67-
<TabsList>
68-
<TabsTrigger value="my-matches">{{
69-
$t("pages.matches.my_match_history")
70-
}}</TabsTrigger>
71-
<TabsTrigger value="other-matches">{{
72-
$t("pages.matches.other_matches")
73-
}}</TabsTrigger>
74-
</TabsList>
75-
76-
<TabsContent value="my-matches">
77-
<MyMatches> </MyMatches>
78-
</TabsContent>
79-
<TabsContent value="other-matches">
80-
<OtherMatches></OtherMatches>
81-
</TabsContent>
82-
</Tabs>
66+
<MyMatches> </MyMatches>
8367
</Card>
8468

8569
<div id="pagination"></div>

0 commit comments

Comments
 (0)