From 46155018ce8bae3a728f891de6dbac38b28eb65d Mon Sep 17 00:00:00 2001 From: Mars <3361409208a@gmail.com> Date: Thu, 18 Jun 2026 13:32:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(player):=20=E9=87=8D=E6=9E=84=E5=AE=A2?= =?UTF-8?q?=E6=9C=8D=E6=82=AC=E6=B5=AE=E5=85=A5=E5=8F=A3=E4=B8=8E=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=8A=BD=E5=B1=89=EF=BC=8C=E4=BC=98=E5=8C=96=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=A1=B5=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增可拖拽悬浮客服按钮,支持贴边吸附与位置记忆 - 顶部栏改为设置抽屉入口,将语言/规则/登出等从个人页迁出 - 余额芯片集成用户头像,移除独立头像菜单 - 消息列表去掉冗余未读白点,统一消息页返回导航 - 补充 profile.settings 多语言文案 Co-authored-by: Cursor --- .../player/src/components/CashBalanceChip.vue | 45 +- .../src/components/MessageListPanel.vue | 14 - apps/player/src/components/SettingsDrawer.vue | 517 ++++++++++++++++++ apps/player/src/i18n/en-US.ts | 1 + apps/player/src/i18n/ms-MY.ts | 1 + apps/player/src/i18n/zh-CN.ts | 1 + apps/player/src/layouts/MainLayout.vue | 375 +++++++++++-- apps/player/src/views/InboxHubView.vue | 20 +- apps/player/src/views/ProfileView.vue | 92 +--- 9 files changed, 885 insertions(+), 181 deletions(-) create mode 100644 apps/player/src/components/SettingsDrawer.vue diff --git a/apps/player/src/components/CashBalanceChip.vue b/apps/player/src/components/CashBalanceChip.vue index b048b63..4951456 100644 --- a/apps/player/src/components/CashBalanceChip.vue +++ b/apps/player/src/components/CashBalanceChip.vue @@ -2,17 +2,26 @@ import { ref, onMounted, onUnmounted, computed } from 'vue'; import { useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; +import { playerAvatarUrl, randomAvatarKey } from '@thebet365/shared'; +import { useAuthStore } from '../stores/auth'; import { formatMoney } from '../utils/localeDisplay'; import { usePlayerProfile } from '../composables/usePlayerProfile'; const { locale, t } = useI18n(); -const { profileRaw, refreshProfile } = usePlayerProfile(); +const { profileRaw, refreshProfile, avatarUrl } = usePlayerProfile(); +const auth = useAuthStore(); const router = useRouter(); const open = ref(false); const root = ref(null); const wallet = computed(() => profileRaw.value?.wallet ?? null); +const displayAvatarUrl = computed(() => { + if (avatarUrl.value) return avatarUrl.value; + const seed = auth.user?.username; + return seed ? playerAvatarUrl(randomAvatarKey(seed)) : null; +}); + function amountValue(value: unknown): number { if (value == null) return 0; if (typeof value === 'number') return Number.isFinite(value) ? value : 0; @@ -74,7 +83,11 @@ onUnmounted(() => { {{ t('wallet.cash_balance') }} {{ available }} - + + + + +
@@ -110,9 +123,9 @@ onUnmounted(() => { .cash-chip { display: flex; align-items: center; - gap: 4px; + gap: 10px; height: 36px; - padding: 0 10px; + padding: 0 6px 0 10px; min-width: 0; cursor: pointer; border: 1px solid var(--border); @@ -149,15 +162,25 @@ onUnmounted(() => { font-variant-numeric: tabular-nums; } -.chevron { - font-size: 10px; - color: var(--text-muted); - transition: transform 0.2s; - margin-left: 0; +/* Integrated Avatar Styling */ +.chip-avatar-wrap { + width: 24px; + height: 24px; + border-radius: 50%; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + border: 1px solid var(--border-gold-soft); + flex-shrink: 0; + background: var(--bg-body); } -.chevron.open { - transform: rotate(180deg); +.chip-avatar-img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: top; } .cash-panel { diff --git a/apps/player/src/components/MessageListPanel.vue b/apps/player/src/components/MessageListPanel.vue index 657ca6c..6ecf269 100644 --- a/apps/player/src/components/MessageListPanel.vue +++ b/apps/player/src/components/MessageListPanel.vue @@ -122,7 +122,6 @@ onActivated(tryLoad); :class="{ unread: !item.isRead }" >