2026-04-17 15:45:54 +08:00
|
|
|
|
<!-- src/views/Home.vue -->
|
|
|
|
|
|
<script setup lang="ts">
|
2026-04-17 17:38:27 +08:00
|
|
|
|
import { ref, onMounted, computed } from 'vue'
|
2026-04-17 15:45:54 +08:00
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
|
import { useGroupStore } from '@/stores/group'
|
2026-04-17 17:38:27 +08:00
|
|
|
|
import { useUserStore } from '@/stores/user'
|
2026-04-17 15:45:54 +08:00
|
|
|
|
import { getPopularGames } from '@/api/games'
|
2026-04-17 20:23:39 +08:00
|
|
|
|
import GameDetailDialog from '@/components/game/GameDetailDialog.vue'
|
2026-04-17 17:38:27 +08:00
|
|
|
|
import { UserStatusMap } from '@/types'
|
2026-04-17 15:45:54 +08:00
|
|
|
|
import type { Game } from '@/types'
|
|
|
|
|
|
import TeamSessionPanel from '@/components/team/TeamSessionPanel.vue'
|
|
|
|
|
|
import IdleMembersList from '@/components/team/IdleMembersList.vue'
|
|
|
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
const groupStore = useGroupStore()
|
2026-04-17 17:38:27 +08:00
|
|
|
|
const userStore = useUserStore()
|
2026-04-17 15:45:54 +08:00
|
|
|
|
|
|
|
|
|
|
const popularGames = ref<Game[]>([])
|
|
|
|
|
|
const loading = ref(false)
|
2026-04-17 20:23:39 +08:00
|
|
|
|
const selectedGame = ref<Game | null>(null)
|
|
|
|
|
|
const showGameDetail = ref(false)
|
2026-04-17 15:45:54 +08:00
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
const statusDotClass = computed(() => {
|
|
|
|
|
|
const s = userStore.userStatus
|
|
|
|
|
|
return `gg-status-dot gg-status-dot--${s}`
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const statusText = computed(() => UserStatusMap[userStore.userStatus] || '未知')
|
|
|
|
|
|
|
2026-04-17 15:45:54 +08:00
|
|
|
|
onMounted(async () => {
|
|
|
|
|
|
await loadPopularGames()
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
async function loadPopularGames() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
popularGames.value = await getPopularGames(8)
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.error('加载热门游戏失败:', error)
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function selectGroup(groupId: string) {
|
|
|
|
|
|
groupStore.setCurrentGroup(groupId)
|
|
|
|
|
|
router.push({ name: 'GroupView', params: { id: groupId } })
|
|
|
|
|
|
}
|
2026-04-17 20:23:39 +08:00
|
|
|
|
|
|
|
|
|
|
function openGameDetail(game: Game) {
|
|
|
|
|
|
selectedGame.value = game
|
|
|
|
|
|
showGameDetail.value = true
|
|
|
|
|
|
}
|
2026-04-17 15:45:54 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<div class="home-page">
|
2026-04-17 17:38:27 +08:00
|
|
|
|
<!-- 欢迎区 -->
|
|
|
|
|
|
<section class="welcome-section">
|
|
|
|
|
|
<h1 class="welcome-title">
|
|
|
|
|
|
欢迎回来, <span class="gg-text-gradient">{{ userStore.user?.username || '玩家' }}</span>!
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
<div class="status-line">
|
|
|
|
|
|
<span :class="statusDotClass" />
|
|
|
|
|
|
<span class="status-text">{{ statusText }}</span>
|
|
|
|
|
|
<span v-if="userStore.user?.statusNote" class="status-note">{{ userStore.user.statusNote }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 主内容双栏 -->
|
|
|
|
|
|
<div class="content-grid">
|
|
|
|
|
|
<!-- 左列: 我的群组 -->
|
|
|
|
|
|
<section class="section groups-section">
|
|
|
|
|
|
<h2 class="section-title">
|
|
|
|
|
|
<span class="section-icon">🎮</span> 我的群组
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="groupStore.groups.length === 0" class="empty-state">
|
|
|
|
|
|
<div class="empty-icon">🎮</div>
|
|
|
|
|
|
<p class="empty-text">暂无群组</p>
|
|
|
|
|
|
<p class="empty-hint">创建或加入一个群组,开始组队冒险吧</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-else class="group-grid">
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-for="group in groupStore.groups"
|
|
|
|
|
|
:key="group.id"
|
|
|
|
|
|
class="group-card"
|
|
|
|
|
|
@click="selectGroup(group.id)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<div class="group-card-header">
|
|
|
|
|
|
<span class="group-name">{{ group.name }}</span>
|
|
|
|
|
|
<span class="member-badge">{{ group.members.length }} 人</span>
|
2026-04-17 15:45:54 +08:00
|
|
|
|
</div>
|
2026-04-17 17:38:27 +08:00
|
|
|
|
<p class="group-desc">{{ group.description || '暂无简介' }}</p>
|
2026-04-17 15:45:54 +08:00
|
|
|
|
</div>
|
2026-04-17 17:38:27 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 右列: 当前临时小组 -->
|
|
|
|
|
|
<section class="section session-section">
|
|
|
|
|
|
<h2 class="section-title">
|
|
|
|
|
|
<span class="section-icon">⚔</span> 当前临时小组
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
<div class="session-card">
|
|
|
|
|
|
<TeamSessionPanel />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="idle-section">
|
|
|
|
|
|
<IdleMembersList status="idle" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
2026-04-17 15:45:54 +08:00
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
<!-- 热门游戏 -->
|
|
|
|
|
|
<section class="section games-section">
|
|
|
|
|
|
<h2 class="section-title">
|
|
|
|
|
|
<span class="section-icon">🔥</span> 热门游戏
|
|
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="loading" class="loading-state">
|
|
|
|
|
|
<div class="loading-spinner" />
|
|
|
|
|
|
<span>加载中...</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-else-if="popularGames.length === 0" class="empty-state">
|
|
|
|
|
|
<div class="empty-icon">🎮</div>
|
|
|
|
|
|
<p class="empty-text">暂无热门游戏</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-else class="games-scroll">
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-for="game in popularGames"
|
|
|
|
|
|
:key="game.id"
|
|
|
|
|
|
class="game-card"
|
2026-04-17 20:23:39 +08:00
|
|
|
|
@click="openGameDetail(game)"
|
2026-04-17 17:38:27 +08:00
|
|
|
|
>
|
|
|
|
|
|
<div class="game-cover-wrap">
|
|
|
|
|
|
<img
|
|
|
|
|
|
:src="game.cover || '/game-placeholder.png'"
|
|
|
|
|
|
:alt="game.name"
|
|
|
|
|
|
class="game-cover"
|
|
|
|
|
|
/>
|
2026-04-17 15:45:54 +08:00
|
|
|
|
</div>
|
2026-04-17 17:38:27 +08:00
|
|
|
|
<div class="game-info">
|
|
|
|
|
|
<span class="game-name">{{ game.name }}</span>
|
|
|
|
|
|
<span v-if="game.platform" class="game-platform-tag">{{ game.platform }}</span>
|
2026-04-17 15:45:54 +08:00
|
|
|
|
</div>
|
2026-04-17 17:38:27 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
2026-04-17 20:23:39 +08:00
|
|
|
|
|
|
|
|
|
|
<GameDetailDialog v-model="showGameDetail" :game="selectedGame" @create-team="() => {}" />
|
2026-04-17 15:45:54 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.home-page {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
gap: 28px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
/* ── 欢迎区 ── */
|
|
|
|
|
|
.welcome-section {
|
|
|
|
|
|
padding: 28px 32px;
|
|
|
|
|
|
background: var(--gg-bg-card);
|
|
|
|
|
|
border: 1px solid var(--gg-border);
|
|
|
|
|
|
border-radius: var(--gg-radius-lg);
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
overflow: hidden;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.welcome-section::before {
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
height: 3px;
|
|
|
|
|
|
background: var(--gg-gradient);
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.welcome-title {
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
margin: 0 0 12px;
|
|
|
|
|
|
color: var(--gg-text);
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.status-line {
|
2026-04-17 15:45:54 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
gap: 10px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.status-text {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: var(--gg-text-secondary);
|
|
|
|
|
|
font-weight: 500;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.status-note {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: var(--gg-text-muted);
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
/* ── 通用 section ── */
|
|
|
|
|
|
.section {
|
2026-04-17 15:45:54 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-title {
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
margin: 0 0 16px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
gap: 8px;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
color: var(--gg-text);
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.section-icon {
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ── 双栏内容 ── */
|
|
|
|
|
|
.content-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: 1fr 340px;
|
|
|
|
|
|
gap: 28px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ── 群组区 ── */
|
|
|
|
|
|
.group-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
|
gap: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.group-card {
|
|
|
|
|
|
background: var(--gg-bg-card);
|
|
|
|
|
|
border: 1px solid var(--gg-border);
|
|
|
|
|
|
border-radius: var(--gg-radius-md);
|
|
|
|
|
|
padding: 18px 20px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
cursor: pointer;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.group-card:hover {
|
|
|
|
|
|
border-color: var(--gg-primary);
|
|
|
|
|
|
box-shadow: 0 0 24px rgba(99, 102, 241, 0.18);
|
|
|
|
|
|
transform: translateY(-2px);
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.group-card-header {
|
2026-04-17 15:45:54 +08:00
|
|
|
|
display: flex;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
margin-bottom: 10px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.group-name {
|
2026-04-17 17:38:27 +08:00
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: var(--gg-text);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.member-badge {
|
2026-04-17 15:45:54 +08:00
|
|
|
|
font-size: 12px;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
padding: 3px 10px;
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
background: rgba(99, 102, 241, 0.15);
|
|
|
|
|
|
color: var(--gg-primary-light);
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
flex-shrink: 0;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.group-desc {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: var(--gg-text-muted);
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
|
overflow: hidden;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
/* ── 临时小组区 ── */
|
|
|
|
|
|
.session-section {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.session-card,
|
|
|
|
|
|
.idle-section {
|
|
|
|
|
|
background: var(--gg-bg-card);
|
|
|
|
|
|
border: 1px solid var(--gg-border);
|
|
|
|
|
|
border-radius: var(--gg-radius-md);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ── 热门游戏 ── */
|
|
|
|
|
|
.games-section {
|
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.games-scroll {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
|
scroll-behavior: smooth;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.games-scroll::-webkit-scrollbar {
|
|
|
|
|
|
height: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.games-scroll::-webkit-scrollbar-thumb {
|
|
|
|
|
|
background: var(--gg-border);
|
|
|
|
|
|
border-radius: 2px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.game-card {
|
2026-04-17 17:38:27 +08:00
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
width: 160px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
cursor: pointer;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
transition: transform 0.25s, box-shadow 0.25s;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.game-card:hover {
|
|
|
|
|
|
transform: translateY(-4px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.game-card:hover .game-cover-wrap {
|
|
|
|
|
|
box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.game-cover-wrap {
|
|
|
|
|
|
width: 160px;
|
|
|
|
|
|
height: 200px;
|
|
|
|
|
|
border-radius: var(--gg-radius-md);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
background: var(--gg-bg-elevated);
|
|
|
|
|
|
border: 1px solid var(--gg-border);
|
|
|
|
|
|
transition: box-shadow 0.25s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 15:45:54 +08:00
|
|
|
|
.game-cover {
|
|
|
|
|
|
width: 100%;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
height: 100%;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
object-fit: cover;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
display: block;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.game-info {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
gap: 6px;
|
|
|
|
|
|
margin-top: 10px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.game-name {
|
2026-04-17 17:38:27 +08:00
|
|
|
|
font-size: 14px;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
font-weight: 500;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
color: var(--gg-text);
|
2026-04-17 15:45:54 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 17:38:27 +08:00
|
|
|
|
.game-platform-tag {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: fit-content;
|
2026-04-17 15:45:54 +08:00
|
|
|
|
font-size: 11px;
|
2026-04-17 17:38:27 +08:00
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
background: rgba(168, 85, 247, 0.15);
|
|
|
|
|
|
color: var(--gg-accent-light);
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ── 空状态 ── */
|
|
|
|
|
|
.empty-state {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 40px 20px;
|
|
|
|
|
|
background: var(--gg-bg-card);
|
|
|
|
|
|
border: 1px dashed var(--gg-border);
|
|
|
|
|
|
border-radius: var(--gg-radius-md);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.empty-icon {
|
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.empty-text {
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
color: var(--gg-text-secondary);
|
|
|
|
|
|
margin: 0 0 4px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.empty-hint {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: var(--gg-text-muted);
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ── 加载状态 ── */
|
|
|
|
|
|
.loading-state {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
padding: 40px;
|
|
|
|
|
|
color: var(--gg-text-muted);
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.loading-spinner {
|
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
border: 2px solid var(--gg-border);
|
|
|
|
|
|
border-top-color: var(--gg-primary);
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
animation: spin 0.8s linear infinite;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes spin {
|
|
|
|
|
|
to { transform: rotate(360deg); }
|
2026-04-17 15:45:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|