add block game

This commit is contained in:
2026-08-06 00:23:04 +07:00
parent a43b23aad9
commit 115f2498cd
3 changed files with 59 additions and 14 deletions
+8 -3
View File
@@ -75,8 +75,12 @@ async function getGame(id: number) {
}
getGame(Number(gameId))
async function toTeamStory(id: number, password: string) {
router.push('/team-story/' + id + '?password=' + password)
async function toTeamStory(id: number, password: string, newTab: boolean = false) {
const uri = '/team-story/' + id + '?password=' + password
if (newTab) {
window.open(uri, '_blank');
}
router.push(uri)
}
async function updateGame() {
@@ -364,7 +368,7 @@ useSimplePolling(() => {
<n-button @click="openQR(getTeamStoryURL(team.id!, team.password!))">
QR
</n-button>
<n-button @click="toTeamStory(team.id!, team.password!)">
<n-button @click="toTeamStory(team.id!, team.password!, true)">
Подсмотреть игру
</n-button>
<n-button type="error" ghost @click="deleteTeam(team)">
@@ -498,6 +502,7 @@ useSimplePolling(() => {
margin: 10px 0;
border-radius: 10px;
background-color: #222;
border: 1px solid #222;
}
.team-block-hover:hover {