add result

This commit is contained in:
2026-09-03 00:18:51 +07:00
parent 131790dd85
commit 8b8fb33d45
80 changed files with 2569 additions and 2041 deletions
+14
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { NButton } from 'naive-ui'
import { useMessage } from 'naive-ui'
import { ref } from 'vue'
import { useRouter } from 'vue-router'
@@ -27,6 +28,10 @@ getGames()
async function toGame(id: number) {
router.push('/games/' + id)
}
function toResults(id: number) {
router.push('/games/' + id + '/results')
}
</script>
<template>
@@ -39,6 +44,9 @@ async function toGame(id: number) {
<div class="game-description">
{{ game.description }}
</div>
<div v-if="game.status == 'finish'" class="game-actions">
<n-button size="small" ghost @click.stop="toResults(game.id!)">Результаты</n-button>
</div>
</div>
</div>
</div>
@@ -64,6 +72,12 @@ async function toGame(id: number) {
margin-bottom: 10px;
}
.game-actions {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
.game-description {
color: #aaa;
margin-bottom: 10px;