Match cards: composed title, header stage from match title, equal-sized grid

- SportsMatchController syncs Video.title with SportsMatch.title on
  store/update so the "Match title" field drives the video's display
  title everywhere.
- headerData(): "championship" now prefers event_name (event title)
  and adds a dedicated "stage" key sourced from SportsMatch.title
  (shown between the yellow lines above the weight class in both the
  in-player VS overlay and the vs-mini gallery card).
- Video cards render match titles with flags + corner colours
  ("FINALS – 🇧🇭 Blue vs 🇧🇭 Red (-61 kg)"), matching the video
  page header, and clip long titles to one line.
- Video gallery grid uses repeat(N, minmax(0, 1fr)) + grid-auto-rows:1fr
  so every card thumbnail renders at exactly the same size; hover-preview
  videos use object-fit:cover to stop portrait sources looking smaller.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
ghassanandClaude Opus 4.7 committed 2026-08-11 09:14:25 +03:00
1 parent 04d63cccdb
commit 665bad76bf
7 files changed
+128 -37

No files matched your search

@@ -34,6 +34,11 @@ class SportsMatchController extends Controller
$this->handleImages($match, $request, $nas);
$match->save();
if ($match->video && $match->video->title !== $match->title) {
$match->video->title = $match->title;
$match->video->save();
}
return response()->json([
'ok' => true,
'message' => 'Match saved as draft.',
@@ -51,6 +56,14 @@ class SportsMatchController extends Controller
$this->handleImages($sportsMatch, $request, $nas);
$sportsMatch->save();
// Keep the parent Video's display title in sync with the match title
// so the match page header, share metadata, and search results all
// reflect the edited value.
if ($sportsMatch->video && $sportsMatch->video->title !== $sportsMatch->title) {
$sportsMatch->video->title = $sportsMatch->title;
$sportsMatch->video->save();
}
return response()->json([
'ok' => true,
'message' => 'Match updated.',