From fb889dcd71814943531cd0638ffd426ddc653455 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Fri, 8 May 2026 19:46:44 +0200 Subject: [PATCH] tauri-app: only show stats for current player --- tauri-app/src/components/GameReview.vue | 204 ++---------------------- 1 file changed, 9 insertions(+), 195 deletions(-) diff --git a/tauri-app/src/components/GameReview.vue b/tauri-app/src/components/GameReview.vue index 183a70d..439002f 100644 --- a/tauri-app/src/components/GameReview.vue +++ b/tauri-app/src/components/GameReview.vue @@ -51,9 +51,6 @@ const isExporting = ref(false); const exportProgress = ref(0); const exportMessage = ref(null); -// Stats panel state -const showTeamStats = ref(false); -const selectedPlayerPuuid = ref(null); // Get video URL for playback using Tauri's convertFileSrc const videoUrl = computed(() => { @@ -227,13 +224,8 @@ const enemyPlayers = computed(() => { return allPlayers.value.filter(p => p.teamId !== localTeamId); }); -// Selected player for detailed view -const selectedPlayer = computed(() => { - if (selectedPlayerPuuid.value) { - return allPlayers.value.find(p => p.puuid === selectedPlayerPuuid.value); - } - return localPlayer.value; -}); +// Selected player is always the local player +const selectedPlayer = computed(() => localPlayer.value); // Video controls function togglePlay() { @@ -478,10 +470,6 @@ onMounted(() => { loadVideoPath(); window.addEventListener("keydown", handleKeydown); - // Set initial selected player - if (localPlayer.value) { - selectedPlayerPuuid.value = localPlayer.value.puuid; - } }); onUnmounted(() => { @@ -530,21 +518,12 @@ onUnmounted(() => { -
- -
-
+
@@ -744,27 +723,12 @@ onUnmounted(() => {
-
+
-

Player Stats

+

Your Stats

- -
- -
- - +
@@ -839,7 +803,6 @@ onUnmounted(() => { :key="player.puuid" class="team-row" :class="{ local: player.isLocalPlayer }" - @click="selectedPlayerPuuid = player.puuid" >
@@ -876,27 +839,6 @@ onUnmounted(() => {
- -
-

Events Timeline

-
-
-
- {{ formatEventTime(event) }} -
-
- {{ event.event_type }} -
-
{{ event.description }}
-
-
-
@@ -1010,21 +952,6 @@ onUnmounted(() => { text-transform: uppercase; } -.toggle-stats-btn { - background: rgba(255, 255, 255, 0.1); - border: 1px solid rgba(255, 255, 255, 0.2); - color: #fff; - padding: 0.5rem 1rem; - border-radius: 6px; - cursor: pointer; - transition: all 0.2s; -} - -.toggle-stats-btn.active { - background: rgba(200, 170, 110, 0.3); - border-color: #c8aa6e; -} - /* Main Content */ .review-content { display: flex; @@ -1051,8 +978,8 @@ onUnmounted(() => { position: relative; background: #000; aspect-ratio: 16/9; - max-height: 55vh; - width: min(100%, calc(55vh * 16 / 9)); + max-height: 75vh; + width: min(100%, calc(75vh * 16 / 9)); display: flex; align-items: center; justify-content: center; @@ -1426,59 +1353,9 @@ onUnmounted(() => { color: #c8aa6e; } -/* Player Selector */ -.player-selector { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; - margin-bottom: 1rem; -} - -.player-btn { - display: flex; - align-items: center; - gap: 0.5rem; - background: rgba(255, 255, 255, 0.05); - border: 1px solid rgba(255, 255, 255, 0.1); - color: #fff; - padding: 0.35rem 0.5rem; - border-radius: 6px; - cursor: pointer; - transition: all 0.2s; -} - -.player-btn:hover { - background: rgba(255, 255, 255, 0.1); -} - -.player-btn.selected { - background: rgba(200, 170, 110, 0.3); - border-color: #c8aa6e; -} - -.player-btn img { - width: 24px; - height: 24px; - border-radius: 4px; -} - -.player-btn .player-name { - font-size: 0.75rem; -} - -.you-badge { - background: #c8aa6e; - color: #000; - font-size: 0.6rem; - padding: 0.1rem 0.3rem; - border-radius: 3px; - font-weight: 600; -} - /* Selected Player Details */ .selected-player-details { - border-top: 1px solid rgba(255, 255, 255, 0.1); - padding-top: 1rem; + padding-top: 0; } .player-header { @@ -1650,69 +1527,6 @@ onUnmounted(() => { color: #888; } -/* Events Panel */ -.events-panel { - background: rgba(0, 0, 0, 0.3); - border-top: 1px solid rgba(255, 255, 255, 0.1); - padding: 1rem 1.5rem; - max-height: 200px; - overflow-y: auto; -} - -.events-panel h3 { - margin: 0 0 0.75rem 0; - font-size: 0.9rem; - color: #888; -} - -.events-list { - display: flex; - flex-wrap: wrap; - gap: 0.5rem; -} - -.event-item { - display: flex; - align-items: center; - gap: 0.5rem; - background: rgba(255, 255, 255, 0.05); - padding: 0.35rem 0.75rem; - border-radius: 4px; - cursor: pointer; - transition: all 0.2s; - font-size: 0.8rem; -} - -.event-item:hover { - background: rgba(255, 255, 255, 0.1); -} - -.event-item.selected { - background: rgba(200, 170, 110, 0.2); - border: 1px solid #c8aa6e; -} - -.event-time { - font-family: monospace; - font-weight: 600; -} - -.event-type-badge { - padding: 0.1rem 0.35rem; - border-radius: 3px; - font-size: 0.7rem; - font-weight: 500; - text-transform: uppercase; -} - -.event-description { - color: #888; - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - /* Responsive */ @media (max-width: 1200px) { .video-section.with-sidebar {