File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 275275 "kd" : " KD" ,
276276 "last_ten_wins" : " Last 10 Wins" ,
277277 "last_ten_losses" : " Last 10 Losses" ,
278+ "teams" : " Teams" ,
278279 "matches" : " Matches"
279280 }
280281 },
Original file line number Diff line number Diff line change @@ -40,6 +40,34 @@ import SteamIcon from "~/components/icons/SteamIcon.vue";
4040 <SteamIcon class="size-5 fill-foreground" />
4141 </a >
4242 </div >
43+ <div
44+ v-if =" player?.teams && player.teams.length > 0"
45+ class =" flex flex-wrap gap-2 mt-2"
46+ >
47+ <NuxtLink
48+ v-for =" team in player .teams "
49+ :key =" team .id "
50+ :to =" ` /teams/${team .id } ` "
51+ class="group relative inline-flex items-center gap-2 px-3 py-1.5 rounded-md bg-muted/50 hover:bg-muted border border-transparent hover:border-border transition-all duration-200"
52+ >
53+ <div class =" flex items-center gap-2" >
54+ <div
55+ class =" w-2 h-2 rounded-full bg-primary/60 group-hover:bg-primary transition-colors"
56+ ></div >
57+ <span
58+ class =" font-medium text-sm text-foreground group-hover:text-primary transition-colors"
59+ >
60+ {{ team.name }}
61+ </span >
62+ <span
63+ v-if =" team.short_name"
64+ class =" text-xs text-muted-foreground bg-muted-foreground/10 px-1.5 py-0.5 rounded"
65+ >
66+ {{ team.short_name }}
67+ </span >
68+ </div >
69+ </NuxtLink >
70+ </div >
4371 </div >
4472 </div >
4573 </template >
@@ -156,8 +184,6 @@ import SteamIcon from "~/components/icons/SteamIcon.vue";
156184 < / Card >
157185 < / div >
158186
159- < Separator / >
160-
161187 < Card class = " p-4">
162188 <CardHeader >
163189 <CardTitle class="text-xl font-bold">
@@ -207,6 +233,14 @@ export default {
207233 ... playerFields ,
208234 role: true ,
209235 profile_url: true ,
236+ teams: [
237+ {},
238+ {
239+ id: true ,
240+ name: true ,
241+ short_name: true ,
242+ },
243+ ],
210244 kills_aggregate: [
211245 {
212246 where: {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ const teamMenu = ref(false);
8787 {{ $t("common.actions.delete") }}
8888 </DropdownMenuItem >
8989 </template >
90- <template v-else >
90+ <template v-if = " isOnTeam " >
9191 <DropdownMenuItem
9292 class="text-red-600"
9393 @click =" leaveTeamAlertDialog = true "
You can’t perform that action at this time.
0 commit comments