tauri-app: game review, with video showcase, stats and clip export
All checks were successful
record-daemon / Build, check and test (push) Successful in 2m6s
All checks were successful
record-daemon / Build, check and test (push) Successful in 2m6s
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
import { ref, onMounted } from "vue";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import type { GameHistoryItem, TimestampedEvent, ItemInfo } from "../types/timeline";
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: "open-review", game: GameHistoryItem): void;
|
||||
}>();
|
||||
import {
|
||||
getGameResult,
|
||||
formatDuration,
|
||||
@@ -58,6 +63,11 @@ function closeDetail() {
|
||||
selectedGame.value = null;
|
||||
}
|
||||
|
||||
// Open review view for a game
|
||||
function openReview(game: GameHistoryItem) {
|
||||
emit("open-review", game);
|
||||
}
|
||||
|
||||
// Helper to get items array for display (6 slots + trinket)
|
||||
function getItemsArray(game: GameHistoryItem): (ItemInfo | null)[] {
|
||||
return getItems(game);
|
||||
@@ -137,7 +147,7 @@ onMounted(() => {
|
||||
<img
|
||||
v-if="getSummonerSpells(game)"
|
||||
:src="getSummonerSpellUrl(getSummonerSpells(game)!.spell1Id)"
|
||||
:alt="getSummonerSpells(game)!.spell1Name || 'Spell 1'"
|
||||
alt="Spell 1"
|
||||
class="spell-image"
|
||||
/>
|
||||
<div v-else class="spell-placeholder"></div>
|
||||
@@ -146,7 +156,7 @@ onMounted(() => {
|
||||
<img
|
||||
v-if="getSummonerSpells(game)"
|
||||
:src="getSummonerSpellUrl(getSummonerSpells(game)!.spell2Id)"
|
||||
:alt="getSummonerSpells(game)!.spell2Name || 'Spell 2'"
|
||||
alt="Spell 2"
|
||||
class="spell-image"
|
||||
/>
|
||||
<div v-else class="spell-placeholder"></div>
|
||||
@@ -348,8 +358,8 @@ onMounted(() => {
|
||||
|
||||
<div class="modal-actions">
|
||||
<button class="btn-secondary" @click="closeDetail">Close</button>
|
||||
<button class="btn-primary">
|
||||
Open Video
|
||||
<button class="btn-primary" @click="openReview(selectedGame)">
|
||||
Review Game
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
1671
tauri-app/src/components/GameReview.vue
Normal file
1671
tauri-app/src/components/GameReview.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user