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:
@@ -1,9 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import GameHistory from "./components/GameHistory.vue";
|
||||
import GameReview from "./components/GameReview.vue";
|
||||
import type { GameHistoryItem } from "./types/timeline";
|
||||
|
||||
// Current view state
|
||||
const currentView = ref<"history" | "review">("history");
|
||||
const selectedGame = ref<GameHistoryItem | null>(null);
|
||||
|
||||
// Navigate to review view
|
||||
function openReview(game: GameHistoryItem) {
|
||||
selectedGame.value = game;
|
||||
currentView.value = "review";
|
||||
}
|
||||
|
||||
// Navigate back to history
|
||||
function closeReview() {
|
||||
currentView.value = "history";
|
||||
selectedGame.value = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<GameHistory />
|
||||
<div class="app">
|
||||
<GameHistory
|
||||
v-if="currentView === 'history'"
|
||||
@open-review="openReview"
|
||||
/>
|
||||
<GameReview
|
||||
v-else-if="currentView === 'review' && selectedGame"
|
||||
:game="selectedGame"
|
||||
@back="closeReview"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@@ -38,4 +67,9 @@ body {
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.app {
|
||||
min-height: 100vh;
|
||||
background: #0a0a13;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user