|
52 | 52 | <button @click="isDesktopSidebarCollapsed = true" class="icon-btn-hidden hidden md:flex"> |
53 | 53 | <Icon icon="ep:fold" /> |
54 | 54 | </button> |
55 | | - <div |
56 | | - v-if="gameStore.player?.avatar" |
57 | | - class="w-[1.2em] h-[1.2em] rounded-full bg-surface border border-border flex items-center justify-center text-xl font-bold relative" |
58 | | - > |
59 | | - <img |
| 55 | + <section class="inline-flex items-center gap-2"> |
| 56 | + <span |
60 | 57 | v-if="gameStore.player?.avatar" |
61 | | - :src="gameStore.player?.avatar" |
62 | | - alt="avatar" |
63 | | - class="w-full h-full object-cover rounded-full" |
64 | | - /> |
65 | | - </div> |
66 | | - <span class="font-medium">{{ gameStore.player?.name }}</span> |
| 58 | + class="w-[1.2em] h-[1.2em] rounded-full bg-surface border border-border inline-flex items-center justify-center text-xl font-bold relative" |
| 59 | + > |
| 60 | + <img |
| 61 | + v-if="gameStore.player?.avatar" |
| 62 | + :src="gameStore.player?.avatar" |
| 63 | + alt="avatar" |
| 64 | + class="w-full h-full object-cover rounded-full" |
| 65 | + /> |
| 66 | + </span> |
| 67 | + <span class="font-medium">{{ gameStore.player?.name }}</span> |
| 68 | + </section> |
67 | 69 | <div class="flex items-center gap-2"> |
68 | 70 | <button |
69 | 71 | @click="handleLogout" |
|
80 | 82 | <section class="flex justify-between mb-2"> |
81 | 83 | <h2 class="text-sm font-bold text-secondary uppercase tracking-wider mb-2 flex items-center gap-1"> |
82 | 84 | <Icon icon="fluent:chess-16-filled" size="1.5em"/> |
83 | | - <span>在线房间</span> |
| 85 | + <span>在线房间 ({{ gameStore.rooms.length }})</span> |
84 | 86 | </h2> |
85 | 87 | <select v-model="gameType" class="text-xs"> |
86 | 88 | <option value="">全部游戏</option> |
|
114 | 116 | <div class="flex-shrink-1 overflow-auto"> |
115 | 117 | <h2 class="text-sm font-bold text-secondary uppercase tracking-wider mb-2 flex items-center gap-1"> |
116 | 118 | <Icon icon="fluent:people-16-filled" size="1.5em"/> |
117 | | - <span>在线玩家</span> |
| 119 | + <span>在线玩家 ({{ gameStore.players.length }})</span> |
118 | 120 | </h2> |
119 | 121 | <ul class="space-y-1"> |
120 | 122 | <li v-for="p in gameStore.players" :key="p.id" class="text-sm text-primary/80"> |
|
0 commit comments