feat(i18n): 管理端与玩家端三语支持(中/英/马来语)
- 管理后台 adminT 文案库、结算与代理端页面、表单校验 - 玩家端 vue-i18n 补全首页/公告/串关与 ms 文案 - Element Plus ms 语言包与共享 locale 工具
This commit is contained in:
@@ -1,156 +1,37 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import BetGuideHelp from '../BetGuideHelp.vue';
|
||||
|
||||
const GUIDE_SEEN_KEY = 'thebet365_match_bet_guide_seen';
|
||||
|
||||
const { t } = useI18n();
|
||||
const open = ref(false);
|
||||
|
||||
function close() {
|
||||
open.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button
|
||||
type="button"
|
||||
class="help-btn"
|
||||
:aria-label="t('bet.guide_help_aria')"
|
||||
:title="t('bet.guide_help_aria')"
|
||||
@click="open = true"
|
||||
<BetGuideHelp
|
||||
:title="t('bet.guide_title')"
|
||||
:storage-key="GUIDE_SEEN_KEY"
|
||||
>
|
||||
?
|
||||
</button>
|
||||
|
||||
<Teleport to="body">
|
||||
<div v-if="open" class="overlay" @click.self="close">
|
||||
<div class="modal" role="dialog" aria-modal="true" :aria-label="t('bet.guide_title')">
|
||||
<button type="button" class="close-x" :aria-label="t('bet.cancel')" @click="close">✕</button>
|
||||
|
||||
<h3 class="title">{{ t('bet.guide_title') }}</h3>
|
||||
|
||||
<div class="guide-body">
|
||||
<div class="flow">
|
||||
<p class="flow-name">{{ t('bet.guide_flow_normal') }}</p>
|
||||
<ol>
|
||||
<li>{{ t('bet.guide_normal_1') }}</li>
|
||||
<li>{{ t('bet.guide_normal_2') }}</li>
|
||||
<li>{{ t('bet.guide_normal_3') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="flow flow--cs">
|
||||
<p class="flow-name">{{ t('bet.guide_flow_cs') }}</p>
|
||||
<ol>
|
||||
<li>{{ t('bet.guide_cs_1') }}</li>
|
||||
<li>{{ t('bet.guide_cs_2') }}</li>
|
||||
<li>{{ t('bet.guide_cs_3') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn-ok btn-gold-outline" @click="close">
|
||||
{{ t('bet.guide_got_it') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="flow">
|
||||
<p class="flow-name">{{ t('bet.guide_flow_normal') }}</p>
|
||||
<ol>
|
||||
<li>{{ t('bet.guide_normal_1') }}</li>
|
||||
<li>{{ t('bet.guide_normal_2') }}</li>
|
||||
<li>{{ t('bet.guide_normal_3') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</Teleport>
|
||||
<div class="flow flow-block">
|
||||
<p class="flow-name">{{ t('bet.guide_flow_cs') }}</p>
|
||||
<ol>
|
||||
<li>{{ t('bet.guide_cs_1') }}</li>
|
||||
<li>{{ t('bet.guide_cs_2') }}</li>
|
||||
<li>{{ t('bet.guide_cs_3') }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="flow flow-block">
|
||||
<p class="flow-name">{{ t('bet.guide_flow_parlay') }}</p>
|
||||
<p class="intro">{{ t('bet.guide_parlay_1') }}</p>
|
||||
</div>
|
||||
<p class="rules-link">{{ t('bet.guide_rules_link') }}</p>
|
||||
</BetGuideHelp>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.help-btn {
|
||||
flex-shrink: 0;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--border-gold-soft);
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: var(--primary-light);
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 205;
|
||||
background: rgba(0, 0, 0, 0.72);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
.modal {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 340px;
|
||||
max-height: 85vh;
|
||||
overflow-y: auto;
|
||||
background: linear-gradient(165deg, #1a1810 0%, #121212 45%, #0a0a0a 100%);
|
||||
border: 1px solid var(--border-gold-soft);
|
||||
border-radius: var(--radius);
|
||||
padding: 16px 14px 14px;
|
||||
box-shadow: var(--shadow), 0 0 24px rgba(212, 175, 55, 0.08);
|
||||
}
|
||||
|
||||
.close-x {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
color: var(--text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: var(--primary-light);
|
||||
text-align: center;
|
||||
margin-bottom: 12px;
|
||||
padding-right: 24px;
|
||||
}
|
||||
|
||||
.guide-body {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.flow-name {
|
||||
font-size: 13px;
|
||||
font-weight: 800;
|
||||
color: var(--primary-light);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.flow ol {
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.flow li + li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.flow--cs {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.btn-ok {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user