feat(match): show the ROM file name in the match dialog header

The match dialog covers the gallery card it was opened from, hiding the
file name, which is the one piece of ground truth when re-matching a
mismatched game. Show it next to the dialog title, truncated to a single
line with the full name in the hover title.

Fixes #4038
This commit is contained in:
Georges-Antoine Assi
2026-08-01 13:57:23 -04:00
parent 48c2a75192
commit 286ccff5a1

View File

@@ -290,7 +290,14 @@ function closeDialog() {
@close="closeDialog"
>
<template #header>
<span>{{ t("rom.match-rom") }}</span>
<div class="r-v2-match__header">
<span>{{ t("rom.match-rom") }}</span>
<!-- The file name is the ground truth for a mismatched game, so it
stays visible while the dialog covers the gallery card. -->
<span v-if="rom" class="r-v2-match__header-file" :title="rom.fs_name">
{{ rom.fs_name }}
</span>
</div>
</template>
<template #toolbar>
@@ -415,6 +422,25 @@ function closeDialog() {
</template>
<style scoped>
/* Header — dialog title plus the ROM's file name, which truncates to a
single line and keeps the full name in the hover title. */
.r-v2-match__header {
display: flex;
align-items: baseline;
gap: 10px;
min-width: 0;
}
.r-v2-match__header-file {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: var(--r-font-size-sm);
font-weight: var(--r-font-weight-regular);
color: var(--r-color-fg-muted);
}
/* Saving-overlay anchor — has to pass the dialog body's column layout
through (`flex: 1`, `min-height: 0`, `display: flex; flex-direction:
column`) so the variant inside still sees the same shape it would