Skip to content

Commit 905489b

Browse files
authored
chore: update match type display (#403)
1 parent ef02cec commit 905489b

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

components/match/MatchMaps.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ import cleanMapName from "~/utilities/cleanMapName";
160160
size="xs"
161161
variant="ghost"
162162
class="h-6 w-6 p-0 text-white/70 hover:text-white"
163-
v-if="matchMap.demos_total_size"
163+
v-if="matchMap.demos_total_size || (matchMap.demos?.length ?? 0) > 0"
164164
>
165165
<Download class="w-3.5 h-3.5" />
166166
</Button>

components/player/PlayerMatchRow.vue

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,29 @@ function expandLeave(el: Element, done: () => void) {
9999
</span>
100100
</div>
101101

102-
<!-- TYPE — keep the same mode badge as a 5stack match, and tag
103-
external/imported matches with a small source chip (VALVE/FACEIT)
104-
so they read as "comp, but from Valve". -->
105-
<div class="flex min-w-0 items-center justify-center gap-1">
102+
<!-- TYPE — full mode name pill; external/imported matches get the
103+
source (VALVE/FACEIT) tucked into the pill's top-right corner as a
104+
sub-badge so it reads as "comp, but from Valve" without competing
105+
for column width. -->
106+
<div class="flex min-w-0 items-center justify-center">
106107
<span
107108
v-if="matchTypeLabel"
108-
class="inline-block max-w-full truncate rounded border border-border/70 bg-muted/40 px-1.5 py-0.5 font-mono text-[0.55rem] font-bold uppercase tracking-[0.12em] text-foreground/75"
109-
:title="matchType"
109+
class="relative inline-flex max-w-full items-center rounded border border-border/70 bg-muted/40 px-1.5 py-0.5 font-mono text-[0.58rem] font-semibold uppercase tracking-[0.08em] text-foreground/80"
110+
:title="
111+
isExternal
112+
? `${matchType} · imported from ${sourceLabel}`
113+
: matchType
114+
"
110115
>
111-
{{ matchTypeLabel }}
112-
</span>
113-
<span
114-
v-if="isExternal"
115-
class="inline-flex shrink-0 items-center rounded-sm border border-[hsl(200_95%_55%/0.45)] bg-[hsl(200_95%_55%/0.1)] px-1 py-px font-mono text-[0.45rem] font-bold uppercase tracking-[0.08em] text-[hsl(200_95%_60%)]"
116-
:title="`Imported from ${sourceLabel}`"
117-
>
118-
{{ sourceLabel }}
116+
<span class="truncate">{{ matchTypeLabel }}</span>
117+
<span
118+
v-if="isExternal"
119+
class="pointer-events-none absolute -right-1.5 -top-1.5 inline-flex items-center rounded-sm border border-[hsl(200_95%_55%/0.5)] bg-[hsl(200_95%_55%/0.18)] px-1 py-px font-mono text-[0.42rem] font-bold uppercase leading-none tracking-[0.06em] text-[hsl(200_95%_72%)] [text-shadow:0_1px_2px_hsl(var(--background)),0_0_2px_hsl(var(--background))]"
120+
>
121+
{{ sourceLabel }}
122+
</span>
119123
</span>
120-
<span v-else-if="!matchTypeLabel" class="text-muted-foreground">—</span>
124+
<span v-else class="text-muted-foreground">—</span>
121125
</div>
122126

123127
<!-- RESULT + SCORE -->
@@ -859,14 +863,14 @@ export default {
859863
matchTypeLabel(): string {
860864
const t = this.matchType;
861865
if (!t) return "";
862-
const abbr: Record<string, string> = {
863-
Competitive: "COMP",
864-
Wingman: "WM",
865-
Premier: "PREM",
866-
Duel: "DUEL",
867-
Scrimmage: "SCRIM",
866+
const full: Record<string, string> = {
867+
Competitive: "Competitive",
868+
Wingman: "Wingman",
869+
Premier: "Premier",
870+
Duel: "Duel",
871+
Scrimmage: "Scrimmage",
868872
};
869-
return abbr[t] ?? String(t).toUpperCase();
873+
return full[t] ?? String(t);
870874
},
871875
// Imported from outside 5stack (e.g. Valve / Faceit match history).
872876
isExternal(): boolean {

0 commit comments

Comments
 (0)