feat(player,admin): 钱包卡片与登录页 UI 优化
- 玩家端我的页:钱包背景图、银行卡式排版、自定义语言下拉与投注规则折叠 - 管理端登录:左右布局、金边半透明卡片、自定义语言选择 - 修复 API promotePlayerToTier1Agent 返回类型导致编译失败
This commit is contained in:
@@ -1,41 +1,177 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue';
|
||||
import { useAdminLocale, type AdminLocale } from '../composables/useAdminLocale';
|
||||
import AdminLocaleFlag from './AdminLocaleFlag.vue';
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
/** gold:与玩家端登录一致;admin:管理后台顶栏绿色主题 */
|
||||
variant?: 'gold' | 'admin';
|
||||
}>(),
|
||||
{ variant: 'admin' },
|
||||
);
|
||||
|
||||
const { locale, locales, setLocale, t } = useAdminLocale();
|
||||
|
||||
function onChange(e: Event) {
|
||||
setLocale((e.target as HTMLSelectElement).value as AdminLocale);
|
||||
const open = ref(false);
|
||||
const root = ref<HTMLElement | null>(null);
|
||||
|
||||
const currentLabel = computed(
|
||||
() => locales.find((l) => l.code === locale.value)?.label ?? locale.value,
|
||||
);
|
||||
|
||||
function pick(code: AdminLocale) {
|
||||
open.value = false;
|
||||
setLocale(code);
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
open.value = !open.value;
|
||||
}
|
||||
|
||||
function onDocClick(e: MouseEvent) {
|
||||
if (!root.value?.contains(e.target as Node)) open.value = false;
|
||||
}
|
||||
|
||||
onMounted(() => document.addEventListener('click', onDocClick));
|
||||
onUnmounted(() => document.removeEventListener('click', onDocClick));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<label class="admin-locale" :title="t('lang')">
|
||||
<AdminLocaleFlag :locale="locale" :size="20" />
|
||||
<select :value="locale" class="admin-locale-select" :aria-label="t('lang')" @change="onChange">
|
||||
<option v-for="l in locales" :key="l.code" :value="l.code">
|
||||
{{ l.label }}
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<div ref="root" class="admin-locale" :class="[variant, { open }]">
|
||||
<button
|
||||
type="button"
|
||||
class="admin-locale-trigger"
|
||||
:aria-expanded="open"
|
||||
aria-haspopup="listbox"
|
||||
:title="t('lang')"
|
||||
@click.stop="toggle"
|
||||
>
|
||||
<AdminLocaleFlag :locale="locale" :size="20" />
|
||||
<span class="admin-locale-label">{{ currentLabel }}</span>
|
||||
<span class="locale-chevron" aria-hidden="true">▾</span>
|
||||
</button>
|
||||
<ul v-show="open" class="admin-locale-menu" role="listbox" :aria-label="t('lang')">
|
||||
<li
|
||||
v-for="l in locales"
|
||||
:key="l.code"
|
||||
role="option"
|
||||
:aria-selected="locale === l.code"
|
||||
class="admin-locale-option"
|
||||
:class="{ active: locale === l.code }"
|
||||
@click="pick(l.code)"
|
||||
>
|
||||
<AdminLocaleFlag :locale="l.code" :size="18" />
|
||||
<span>{{ l.label }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.admin-locale {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.admin-locale-trigger {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.admin-locale-select {
|
||||
background: #0d0d0d;
|
||||
color: var(--green-text);
|
||||
border: 1px solid var(--green-border);
|
||||
min-width: 120px;
|
||||
padding: 5px 10px 5px 8px;
|
||||
border-radius: 6px;
|
||||
padding: 5px 24px 5px 8px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
min-width: 120px;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.admin-locale-label {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.locale-chevron {
|
||||
font-size: 10px;
|
||||
opacity: 0.7;
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.admin-locale.open .locale-chevron {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.admin-locale-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
right: 0;
|
||||
z-index: 50;
|
||||
min-width: 100%;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
list-style: none;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.admin-locale-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 管理顶栏 */
|
||||
.admin-locale.admin .admin-locale-trigger {
|
||||
background: #0d0d0d;
|
||||
color: var(--green-text);
|
||||
border: 1px solid var(--green-border);
|
||||
}
|
||||
|
||||
.admin-locale.admin .admin-locale-menu {
|
||||
background: #0f1411;
|
||||
border: 1px solid var(--green-border);
|
||||
}
|
||||
|
||||
.admin-locale.admin .admin-locale-option {
|
||||
color: #8ab89a;
|
||||
}
|
||||
|
||||
.admin-locale.admin .admin-locale-option:hover,
|
||||
.admin-locale.admin .admin-locale-option.active {
|
||||
background: var(--green-surface);
|
||||
color: var(--green-text);
|
||||
}
|
||||
|
||||
/* 登录页:与玩家端金色主题一致 */
|
||||
.admin-locale.gold .admin-locale-trigger {
|
||||
background: #0d0d0d;
|
||||
color: #f0d875;
|
||||
border: 1px solid rgba(212, 175, 55, 0.28);
|
||||
}
|
||||
|
||||
.admin-locale.gold .admin-locale-menu {
|
||||
background: #141414;
|
||||
border: 1px solid rgba(212, 175, 55, 0.28);
|
||||
}
|
||||
|
||||
.admin-locale.gold .admin-locale-option {
|
||||
color: #8e8e93;
|
||||
}
|
||||
|
||||
.admin-locale.gold .admin-locale-option:hover,
|
||||
.admin-locale.gold .admin-locale-option.active {
|
||||
background: rgba(212, 175, 55, 0.1);
|
||||
color: #f0d875;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -57,34 +57,42 @@ async function login() {
|
||||
<div class="login-page" :style="{ backgroundImage: `url(${bgImage})` }">
|
||||
<div class="login-mask" />
|
||||
<div class="login-wrap">
|
||||
<div class="login-lang">
|
||||
<AdminLocaleSwitcher />
|
||||
</div>
|
||||
<form @submit.prevent="login" class="login-form" autocomplete="off">
|
||||
<img src="/logo.png" alt="TheBet365" class="logo" />
|
||||
<h2 class="title">{{ t('login.title') }}</h2>
|
||||
<div class="form-lang">
|
||||
<AdminLocaleSwitcher variant="gold" />
|
||||
</div>
|
||||
|
||||
<label>{{ t('login.username') }}</label>
|
||||
<input v-model="form.username" class="field" :placeholder="t('login.username_ph')" autocomplete="off" required />
|
||||
<label>{{ t('login.password') }}</label>
|
||||
<input v-model="form.password" class="field" type="password" :placeholder="t('login.password_ph')" autocomplete="off" required />
|
||||
<div class="form-body">
|
||||
<aside class="form-brand">
|
||||
<img src="/logo.png" alt="TheBet365" class="logo-large" />
|
||||
</aside>
|
||||
|
||||
<RobotVerify ref="captchaRef" />
|
||||
<div class="form-fields">
|
||||
<h2 class="title">{{ t('login.title') }}</h2>
|
||||
|
||||
<button type="submit" class="btn-login" :disabled="loading">
|
||||
{{ loading ? '...' : t('login.submit') }}
|
||||
</button>
|
||||
<label>{{ t('login.username') }}</label>
|
||||
<input v-model="form.username" class="field" :placeholder="t('login.username_ph')" autocomplete="off" required />
|
||||
<label>{{ t('login.password') }}</label>
|
||||
<input v-model="form.password" class="field" type="password" :placeholder="t('login.password_ph')" autocomplete="off" required />
|
||||
|
||||
<div class="quick-label">{{ t('login.quick_label') }}</div>
|
||||
<div class="quick-btns">
|
||||
<button type="button" class="quick-btn" :disabled="loading" @click="quickLogin('admin', 'Admin@123')">
|
||||
<span class="quick-role">{{ t('login.quick_admin') }}</span>
|
||||
<span class="quick-acc">admin</span>
|
||||
</button>
|
||||
<button type="button" class="quick-btn" :disabled="loading" @click="quickLogin('agent1', 'Agent@123')">
|
||||
<span class="quick-role">{{ t('login.quick_agent') }}</span>
|
||||
<span class="quick-acc">agent1</span>
|
||||
</button>
|
||||
<RobotVerify ref="captchaRef" />
|
||||
|
||||
<button type="submit" class="btn-login" :disabled="loading">
|
||||
{{ loading ? '...' : t('login.submit') }}
|
||||
</button>
|
||||
|
||||
<div class="quick-label">{{ t('login.quick_label') }}</div>
|
||||
<div class="quick-btns">
|
||||
<button type="button" class="quick-btn" :disabled="loading" @click="quickLogin('admin', 'Admin@123')">
|
||||
<span class="quick-role">{{ t('login.quick_admin') }}</span>
|
||||
<span class="quick-acc">admin</span>
|
||||
</button>
|
||||
<button type="button" class="quick-btn" :disabled="loading" @click="quickLogin('agent1', 'Agent@123')">
|
||||
<span class="quick-role">{{ t('login.quick_agent') }}</span>
|
||||
<span class="quick-acc">agent1</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -112,37 +120,59 @@ async function login() {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
max-width: 720px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.login-lang {
|
||||
.login-form {
|
||||
position: relative;
|
||||
padding: 14px 0 0;
|
||||
background: rgba(14, 14, 14, 0.92);
|
||||
border: 1px solid rgba(212, 175, 55, 0.28);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.form-lang {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 10px;
|
||||
padding: 0 18px 10px;
|
||||
}
|
||||
.login-form {
|
||||
|
||||
.form-body {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(200px, 260px) 1fr;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.form-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 28px 20px;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
border-right: 1px solid rgba(212, 175, 55, 0.15);
|
||||
}
|
||||
|
||||
.logo-large {
|
||||
width: 100%;
|
||||
max-width: 220px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(0 4px 24px rgba(212, 175, 55, 0.25));
|
||||
}
|
||||
|
||||
.form-fields {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 28px 22px 22px;
|
||||
background: rgba(12, 12, 12, 0.95);
|
||||
border: 1px solid var(--green-border);
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(36, 143, 84, 0.08);
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
.logo {
|
||||
max-width: 160px;
|
||||
max-height: 56px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
margin: 0 auto 2px;
|
||||
padding: 22px 24px 24px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #aaa;
|
||||
@@ -150,6 +180,34 @@ async function login() {
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.login-wrap {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.form-body {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.form-brand {
|
||||
padding: 20px 24px 12px;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid rgba(212, 175, 55, 0.15);
|
||||
}
|
||||
|
||||
.logo-large {
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.form-fields {
|
||||
padding: 18px 20px 22px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
label {
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
@@ -231,8 +289,8 @@ label {
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.quick-btn:hover:not(:disabled) {
|
||||
background: var(--green-surface);
|
||||
border-color: var(--green-border);
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border-color: rgba(255, 255, 255, 0.18);
|
||||
}
|
||||
.quick-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
.quick-role {
|
||||
|
||||
@@ -462,7 +462,11 @@ export class AgentsService {
|
||||
await this.recalculateUsedCredit(oldParentId);
|
||||
}
|
||||
|
||||
return this.prisma.user.findUnique({ where: { id: userId } });
|
||||
const updated = await this.prisma.user.findUnique({ where: { id: userId } });
|
||||
if (!updated) {
|
||||
throw new NotFoundException('用户不存在');
|
||||
}
|
||||
return updated;
|
||||
}
|
||||
|
||||
async createAgent(
|
||||
|
||||
BIN
apps/player/src/assets/images/qianbao.png
Normal file
BIN
apps/player/src/assets/images/qianbao.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 MiB |
BIN
apps/player/src/assets/images/钱包.png
Normal file
BIN
apps/player/src/assets/images/钱包.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 MiB |
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import LocaleFlag from './LocaleFlag.vue';
|
||||
import { useAppLocale } from '../composables/useAppLocale';
|
||||
@@ -13,30 +14,62 @@ withDefaults(
|
||||
const { locale } = useI18n();
|
||||
const { locales, setLocale } = useAppLocale();
|
||||
|
||||
async function onChange(code: string) {
|
||||
const open = ref(false);
|
||||
const root = ref<HTMLElement | null>(null);
|
||||
|
||||
const currentLabel = computed(
|
||||
() => locales.find((l) => l.code === locale.value)?.label ?? locale.value,
|
||||
);
|
||||
|
||||
async function pick(code: string) {
|
||||
open.value = false;
|
||||
await setLocale(code);
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
open.value = !open.value;
|
||||
}
|
||||
|
||||
function onDocClick(e: MouseEvent) {
|
||||
if (!root.value?.contains(e.target as Node)) open.value = false;
|
||||
}
|
||||
|
||||
onMounted(() => document.addEventListener('click', onDocClick));
|
||||
onUnmounted(() => document.removeEventListener('click', onDocClick));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="locale-switch" :class="{ compact }">
|
||||
<LocaleFlag :locale="locale" :size="compact ? 16 : 18" />
|
||||
<select
|
||||
:value="locale"
|
||||
class="locale-select"
|
||||
:aria-label="compact ? 'Language' : undefined"
|
||||
@change="onChange(($event.target as HTMLSelectElement).value)"
|
||||
>
|
||||
<option v-for="l in locales" :key="l.code" :value="l.code">
|
||||
{{ l.label }}
|
||||
</option>
|
||||
</select>
|
||||
<div ref="root" class="locale-switch" :class="{ compact, open }">
|
||||
<button type="button" class="locale-trigger" :aria-expanded="open" aria-haspopup="listbox" @click.stop="toggle">
|
||||
<LocaleFlag :locale="locale" :size="compact ? 16 : 18" />
|
||||
<span class="locale-label">{{ currentLabel }}</span>
|
||||
<span class="locale-chevron" aria-hidden="true">▾</span>
|
||||
</button>
|
||||
<ul v-show="open" class="locale-menu" role="listbox" :aria-label="compact ? 'Language' : undefined">
|
||||
<li
|
||||
v-for="l in locales"
|
||||
:key="l.code"
|
||||
role="option"
|
||||
:aria-selected="locale === l.code"
|
||||
class="locale-option"
|
||||
:class="{ active: locale === l.code }"
|
||||
@click="pick(l.code)"
|
||||
>
|
||||
<LocaleFlag :locale="l.code" :size="16" />
|
||||
<span>{{ l.label }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.locale-switch {
|
||||
display: flex;
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.locale-trigger {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
height: 36px;
|
||||
@@ -44,22 +77,68 @@ async function onChange(code: string) {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
background: #0d0d0d;
|
||||
color: var(--primary-light);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.locale-switch.compact {
|
||||
.locale-switch.compact .locale-trigger {
|
||||
height: auto;
|
||||
padding: 2px 5px;
|
||||
min-height: 30px;
|
||||
padding: 4px 6px 4px 5px;
|
||||
}
|
||||
|
||||
.locale-select {
|
||||
background: transparent;
|
||||
color: var(--primary-light);
|
||||
border: none;
|
||||
padding: 2px 2px 2px 0;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
outline: none;
|
||||
.locale-label {
|
||||
max-width: 120px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.locale-chevron {
|
||||
font-size: 10px;
|
||||
color: var(--text-muted);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.locale-switch.open .locale-chevron {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.locale-menu {
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
right: 0;
|
||||
z-index: 50;
|
||||
min-width: 100%;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
list-style: none;
|
||||
background: #141414;
|
||||
border: 1px solid var(--border-gold-soft);
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.locale-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.locale-option:hover,
|
||||
.locale-option.active {
|
||||
background: rgba(212, 175, 55, 0.1);
|
||||
color: var(--primary-light);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -48,6 +48,7 @@ const i18n = createI18n({
|
||||
wallet: {
|
||||
balance: '余额',
|
||||
cash_balance: '现金余额',
|
||||
card_holder: '持卡人',
|
||||
unsettled: '未结算',
|
||||
available: '可用',
|
||||
no_records: '暂无账单记录',
|
||||
@@ -231,6 +232,7 @@ const i18n = createI18n({
|
||||
wallet: {
|
||||
balance: 'Balance',
|
||||
cash_balance: 'Cash Balance',
|
||||
card_holder: 'Cardholder',
|
||||
unsettled: 'Unsettled',
|
||||
available: 'Available',
|
||||
no_records: 'No records',
|
||||
@@ -420,6 +422,7 @@ const i18n = createI18n({
|
||||
wallet: {
|
||||
balance: 'Baki',
|
||||
cash_balance: 'Baki Tunai',
|
||||
card_holder: 'Pemegang',
|
||||
unsettled: 'Belum Selesai',
|
||||
available: 'Tersedia',
|
||||
no_records: 'Tiada rekod',
|
||||
|
||||
@@ -7,6 +7,7 @@ import { formatMoney } from '../utils/localeDisplay';
|
||||
import LocaleFlag from '../components/LocaleFlag.vue';
|
||||
import { useAuthStore } from '../stores/auth';
|
||||
import { useAppLocale } from '../composables/useAppLocale';
|
||||
import walletBg from '../assets/images/钱包.png';
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const router = useRouter();
|
||||
@@ -18,6 +19,8 @@ const profile = ref<{
|
||||
wallet?: { availableBalance: string; frozenBalance: string };
|
||||
} | null>(null);
|
||||
|
||||
const rulesExpanded = ref(false);
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await api.get('/player/profile');
|
||||
profile.value = data.data;
|
||||
@@ -36,18 +39,28 @@ function logout() {
|
||||
|
||||
<template>
|
||||
<div class="profile-page">
|
||||
<div class="summary-card">
|
||||
<p class="username">{{ profile?.username }}</p>
|
||||
<div class="balance-row">
|
||||
<span class="balance-label">
|
||||
<LocaleFlag :locale="locale" :size="16" />
|
||||
{{ t('wallet.balance') }}
|
||||
</span>
|
||||
<span class="amount">{{ formatMoney(profile?.wallet?.availableBalance, locale) }}</span>
|
||||
<div class="wallet-banner">
|
||||
<img class="wallet-banner-img" :src="walletBg" alt="" />
|
||||
<img src="/logo.png" alt="TheBet365" class="wallet-card-logo" />
|
||||
<div class="wallet-banner-info">
|
||||
<div class="card-balance-block">
|
||||
<span class="card-kicker">
|
||||
<LocaleFlag :locale="locale" :size="14" />
|
||||
{{ t('wallet.balance') }}
|
||||
</span>
|
||||
<p class="card-balance">{{ formatMoney(profile?.wallet?.availableBalance, locale) }}</p>
|
||||
</div>
|
||||
<div class="card-foot">
|
||||
<div class="card-holder">
|
||||
<span class="card-kicker">{{ t('wallet.card_holder') }}</span>
|
||||
<span class="card-name">{{ profile?.username }}</span>
|
||||
</div>
|
||||
<div class="card-pending">
|
||||
<span class="card-kicker">{{ t('wallet.unsettled') }}</span>
|
||||
<span class="card-pending-val">{{ formatMoney(profile?.wallet?.frozenBalance, locale) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="frozen">
|
||||
{{ t('wallet.unsettled') }}: {{ formatMoney(profile?.wallet?.frozenBalance, locale) }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section class="settings-group">
|
||||
@@ -56,6 +69,25 @@ function logout() {
|
||||
<span class="cell-chevron" aria-hidden="true">›</span>
|
||||
</RouterLink>
|
||||
|
||||
<div class="rules-cell">
|
||||
<button
|
||||
type="button"
|
||||
class="settings-cell rules-toggle"
|
||||
:aria-expanded="rulesExpanded"
|
||||
@click="rulesExpanded = !rulesExpanded"
|
||||
>
|
||||
<span class="cell-label">{{ t('profile.rules_title') }}</span>
|
||||
<span class="cell-chevron" :class="{ open: rulesExpanded }" aria-hidden="true">›</span>
|
||||
</button>
|
||||
<div v-show="rulesExpanded" class="rules-body">
|
||||
<p>{{ t('profile.rules_p1') }}</p>
|
||||
<p>{{ t('profile.rules_p2') }}</p>
|
||||
<p>{{ t('profile.rules_p3') }}</p>
|
||||
<p>{{ t('profile.rules_p4') }}</p>
|
||||
<p>{{ t('profile.rules_p5') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-cell settings-cell--stack">
|
||||
<div class="cell-head">
|
||||
<span class="cell-label">{{ t('profile.language') }}</span>
|
||||
@@ -74,19 +106,6 @@ function logout() {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-cell settings-cell--stack rules-cell">
|
||||
<div class="cell-head">
|
||||
<span class="cell-label">{{ t('profile.rules_title') }}</span>
|
||||
</div>
|
||||
<div class="rules-body">
|
||||
<p>{{ t('profile.rules_p1') }}</p>
|
||||
<p>{{ t('profile.rules_p2') }}</p>
|
||||
<p>{{ t('profile.rules_p3') }}</p>
|
||||
<p>{{ t('profile.rules_p4') }}</p>
|
||||
<p>{{ t('profile.rules_p5') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<button type="button" class="logout-btn" @click="logout">
|
||||
@@ -100,49 +119,140 @@ function logout() {
|
||||
padding: 8px 0 12px;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 14px 16px;
|
||||
.wallet-banner {
|
||||
position: relative;
|
||||
margin-bottom: 12px;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 15px;
|
||||
font-weight: 800;
|
||||
color: var(--primary-light);
|
||||
margin-bottom: 10px;
|
||||
.wallet-banner-img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.balance-row {
|
||||
.wallet-card-logo {
|
||||
position: absolute;
|
||||
top: 9%;
|
||||
right: 5.5%;
|
||||
z-index: 2;
|
||||
width: clamp(42px, 12.8vw, 64px);
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
pointer-events: none;
|
||||
filter:
|
||||
drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45))
|
||||
drop-shadow(0 0 5px rgba(212, 175, 55, 0.32))
|
||||
drop-shadow(0 0 10px rgba(240, 216, 117, 0.18));
|
||||
}
|
||||
|
||||
.wallet-banner-info {
|
||||
position: absolute;
|
||||
inset: 11% 12% 9% 19%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-direction: column;
|
||||
gap: clamp(14px, 3.5vw, 20px);
|
||||
line-height: normal;
|
||||
box-sizing: border-box;
|
||||
pointer-events: none;
|
||||
font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-stretch: semi-expanded;
|
||||
}
|
||||
|
||||
.balance-label {
|
||||
.card-kicker {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.amount {
|
||||
color: var(--primary-light);
|
||||
font-size: clamp(10px, 2.5vw, 11px);
|
||||
font-weight: 800;
|
||||
font-size: 20px;
|
||||
white-space: nowrap;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: rgba(180, 180, 185, 0.92);
|
||||
text-shadow:
|
||||
0 1px 2px rgba(0, 0, 0, 0.75),
|
||||
0 2px 5px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.frozen {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
margin-top: 6px;
|
||||
font-weight: 500;
|
||||
.card-balance-block {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: clamp(3px, 1vw, 6px);
|
||||
min-height: clamp(44px, 12vw, 60px);
|
||||
}
|
||||
|
||||
.card-balance {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
font-size: clamp(22px, 6.8vw, 36px);
|
||||
font-weight: 900;
|
||||
letter-spacing: -0.02em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1.05;
|
||||
white-space: nowrap;
|
||||
background: var(--gradient-gold);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
filter:
|
||||
drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85))
|
||||
drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45))
|
||||
drop-shadow(0 0 10px rgba(212, 175, 55, 0.22));
|
||||
}
|
||||
|
||||
.card-foot {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-top: auto;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.card-holder,
|
||||
.card-pending {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.card-pending {
|
||||
align-items: flex-end;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.card-name {
|
||||
font-size: clamp(12px, 3.2vw, 15px);
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
line-height: 1.25;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 44vw;
|
||||
background: linear-gradient(180deg, #fff6d8 0%, #e8c96a 38%, #c9a227 100%);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
filter:
|
||||
drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8))
|
||||
drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
|
||||
}
|
||||
|
||||
.card-pending-val {
|
||||
font-size: clamp(12px, 3.2vw, 14px);
|
||||
font-weight: 900;
|
||||
letter-spacing: -0.01em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: rgba(210, 210, 215, 0.95);
|
||||
text-shadow:
|
||||
0 1px 2px rgba(0, 0, 0, 0.75),
|
||||
0 2px 5px rgba(0, 0, 0, 0.35);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.settings-group {
|
||||
@@ -199,6 +309,22 @@ function logout() {
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
font-weight: 300;
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.cell-chevron.open {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.rules-toggle {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.rules-cell .rules-body {
|
||||
padding: 0 16px 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.lang-segment {
|
||||
@@ -246,7 +372,6 @@ function logout() {
|
||||
}
|
||||
|
||||
.rules-body {
|
||||
padding: 0 0 12px;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
color: var(--text-muted);
|
||||
|
||||
Reference in New Issue
Block a user