feat: complete Phase 1 - game library, lifecycle, realtime sync

- Seed 33 popular games across 5 platforms via admin API script
- Add GameDetailDialog with game info and quick-team button
- Update GamesLibrary with game card click to open detail dialog
- Update Home hot games to open detail dialog instead of navigating
- Rewrite invitation accept: frontend auto-joins team + updates status
- Add user status reset on team dissolution (endGame)
- Add start game / dissolve buttons to TeamSessionPanel lifecycle
- Integrate realtime subscriptions in GroupView and Layout
- Add notification store realtime invitation listener
- Add placeholder images for game covers and avatars
- Remove Go hooks, add JS hooks placeholder + Docker mount

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
congsh
2026-04-17 20:23:39 +08:00
parent 0bcf39bb4b
commit 802712c662
17 changed files with 394 additions and 180 deletions
+11 -1
View File
@@ -5,6 +5,7 @@ import { useRouter } from 'vue-router'
import { useGroupStore } from '@/stores/group'
import { useUserStore } from '@/stores/user'
import { getPopularGames } from '@/api/games'
import GameDetailDialog from '@/components/game/GameDetailDialog.vue'
import { UserStatusMap } from '@/types'
import type { Game } from '@/types'
import TeamSessionPanel from '@/components/team/TeamSessionPanel.vue'
@@ -16,6 +17,8 @@ const userStore = useUserStore()
const popularGames = ref<Game[]>([])
const loading = ref(false)
const selectedGame = ref<Game | null>(null)
const showGameDetail = ref(false)
const statusDotClass = computed(() => {
const s = userStore.userStatus
@@ -43,6 +46,11 @@ function selectGroup(groupId: string) {
groupStore.setCurrentGroup(groupId)
router.push({ name: 'GroupView', params: { id: groupId } })
}
function openGameDetail(game: Game) {
selectedGame.value = game
showGameDetail.value = true
}
</script>
<template>
@@ -125,7 +133,7 @@ function selectGroup(groupId: string) {
v-for="game in popularGames"
:key="game.id"
class="game-card"
@click="router.push({ name: 'GamesLibrary' })"
@click="openGameDetail(game)"
>
<div class="game-cover-wrap">
<img
@@ -141,6 +149,8 @@ function selectGroup(groupId: string) {
</div>
</div>
</section>
<GameDetailDialog v-model="showGameDetail" :game="selectedGame" @create-team="() => {}" />
</div>
</template>