refactor(player): 重构注单详情页为票据式布局并突出净赢
This commit is contained in:
@@ -3,7 +3,7 @@ import { ref, computed, onMounted } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import api from '../api';
|
||||
import { formatMoney } from '../utils/localeDisplay';
|
||||
import { formatMoney, parseAmount } from '../utils/localeDisplay';
|
||||
import GoldSpinner from '../components/GoldSpinner.vue';
|
||||
import { usePullToRefresh } from '../composables/usePullToRefresh';
|
||||
import StatusWatermark from '../components/StatusWatermark.vue';
|
||||
@@ -52,6 +52,8 @@ const statusKey = computed(() => {
|
||||
|
||||
const statusLabel = computed(() => t(`history.status_${statusKey.value}`));
|
||||
|
||||
const isSettled = computed(() => statusKey.value !== 'pending');
|
||||
|
||||
const placedDateTime = computed(() => {
|
||||
if (!bet.value) return '';
|
||||
const d = new Date(bet.value.placedAt);
|
||||
@@ -64,10 +66,53 @@ const returnAmount = computed(() => {
|
||||
if (!bet.value) return '';
|
||||
if (statusKey.value === 'won') return formatMoney(bet.value.actualReturn, locale.value);
|
||||
if (statusKey.value === 'pending') return formatMoney(bet.value.potentialReturn, locale.value);
|
||||
if (statusKey.value === 'lost') return formatMoney(-parseFloat(String(bet.value.stake ?? 0)), locale.value);
|
||||
if (statusKey.value === 'lost') return formatMoney(-parseAmount(bet.value.stake), locale.value);
|
||||
return formatMoney(bet.value.actualReturn ?? bet.value.potentialReturn, locale.value);
|
||||
});
|
||||
|
||||
const profitAmount = computed(() => {
|
||||
if (!bet.value || statusKey.value !== 'won') return '';
|
||||
const profit = parseAmount(bet.value.actualReturn) - parseAmount(bet.value.stake);
|
||||
return `+${formatMoney(profit, locale.value)}`;
|
||||
});
|
||||
|
||||
const heroAmount = computed(() => {
|
||||
if (statusKey.value === 'won') return profitAmount.value;
|
||||
return returnAmount.value;
|
||||
});
|
||||
|
||||
const heroTitle = computed(() => {
|
||||
if (statusKey.value === 'won') return t('history.profit');
|
||||
if (statusKey.value === 'pending') return t('history.est_return');
|
||||
return statusLabel.value;
|
||||
});
|
||||
|
||||
const formulaText = computed(() => {
|
||||
if (!bet.value || !oddsText.value || statusKey.value === 'pending') return '';
|
||||
return t('history.stake_to_return', {
|
||||
stake: stakeAmount.value,
|
||||
odds: oddsText.value,
|
||||
amount: returnAmount.value,
|
||||
});
|
||||
});
|
||||
|
||||
const stakeAmount = computed(() =>
|
||||
bet.value ? formatMoney(bet.value.stake, locale.value) : '',
|
||||
);
|
||||
|
||||
const oddsText = computed(() => {
|
||||
const o = bet.value?.totalOdds;
|
||||
if (o == null || o === '' || o === 0) return '';
|
||||
const n = parseFloat(String(o));
|
||||
return Number.isFinite(n) ? n.toFixed(2) : String(o);
|
||||
});
|
||||
|
||||
const betTypeLabel = computed(() => {
|
||||
if (!bet.value) return '';
|
||||
if (bet.value.isParlay) return t('bet.parlay');
|
||||
return bet.value.betType || '';
|
||||
});
|
||||
|
||||
function formatOdds(v: unknown): string {
|
||||
const n = parseFloat(String(v));
|
||||
return isNaN(n) || n <= 0 ? '-' : n.toFixed(2);
|
||||
@@ -116,13 +161,20 @@ const matchTitle = computed(() => {
|
||||
return bet.value.matchTitle;
|
||||
});
|
||||
|
||||
const myPick = computed(() => {
|
||||
const pickMarket = computed(() => {
|
||||
if (!bet.value || bet.value.isParlay) return '';
|
||||
const raw = bet.value.pickLabel ?? '';
|
||||
if (locale.value === 'zh-CN' || !raw) return raw;
|
||||
const ci = raw.indexOf(': ');
|
||||
if (ci < 0) return raw;
|
||||
return raw.slice(0, ci + 2) + translateSel(raw.slice(ci + 2));
|
||||
return ci >= 0 ? raw.slice(0, ci) : raw;
|
||||
});
|
||||
|
||||
const pickSelection = computed(() => {
|
||||
if (!bet.value || bet.value.isParlay) return '';
|
||||
const raw = bet.value.pickLabel ?? '';
|
||||
const ci = raw.indexOf(': ');
|
||||
if (ci < 0) return '';
|
||||
const sel = raw.slice(ci + 2);
|
||||
return locale.value === 'zh-CN' ? sel : translateSel(sel);
|
||||
});
|
||||
|
||||
const matchPhase = computed(
|
||||
@@ -130,20 +182,20 @@ const matchPhase = computed(
|
||||
);
|
||||
|
||||
const matchPhaseText = computed(() => matchPhaseLabel(t, matchPhase.value));
|
||||
|
||||
const showPhaseWatermark = computed(
|
||||
() => !isSettled.value && matchPhase.value && matchPhase.value !== 'open',
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="detail-page">
|
||||
<div
|
||||
class="pull-indicator"
|
||||
:style="pullIndicatorStyle()"
|
||||
>
|
||||
<div class="pull-indicator" :style="pullIndicatorStyle()">
|
||||
<GoldSpinner v-if="spinning" :size="28" :progress="progress" :active="spinning" />
|
||||
</div>
|
||||
|
||||
<!-- back bar -->
|
||||
<div class="top-bar">
|
||||
<button class="back-btn" @click="router.back()">‹ {{ t('history.back') }}</button>
|
||||
<button type="button" class="back-btn" @click="router.back()">‹ {{ t('history.back') }}</button>
|
||||
</div>
|
||||
|
||||
<div v-if="loading" class="state">
|
||||
@@ -151,113 +203,131 @@ const matchPhaseText = computed(() => matchPhaseLabel(t, matchPhase.value));
|
||||
</div>
|
||||
<div v-else-if="notFound || !bet" class="state">{{ t('history.not_found') }}</div>
|
||||
|
||||
<template v-else>
|
||||
<!-- status hero -->
|
||||
<div class="hero" :class="statusKey">
|
||||
<span class="hero-status">{{ statusLabel }}</span>
|
||||
<span class="hero-return">{{ returnAmount }}</span>
|
||||
<span class="hero-return-label">
|
||||
{{ statusKey === 'pending' ? t('history.est_return') : t('history.return') }}
|
||||
</span>
|
||||
<article v-else class="receipt">
|
||||
<!-- result strip -->
|
||||
<div class="receipt-result" :class="statusKey">
|
||||
<div class="result-icon" :class="statusKey">
|
||||
<svg v-if="statusKey === 'won'" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="11" fill="none" stroke="currentColor" stroke-width="1.5" />
|
||||
<path d="M7 12.5l3 3 7-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg v-else-if="statusKey === 'lost'" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="11" fill="none" stroke="currentColor" stroke-width="1.5" />
|
||||
<path d="M8 8l8 8M16 8l-8 8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
<svg v-else-if="statusKey === 'pending'" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="11" fill="none" stroke="currentColor" stroke-width="1.5" />
|
||||
<path d="M12 7v5l3 2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
<svg v-else viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="11" fill="none" stroke="currentColor" stroke-width="1.5" />
|
||||
<path d="M8 12h8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="result-text">
|
||||
<span class="result-label">{{ heroTitle }}</span>
|
||||
<span class="result-amount">{{ heroAmount }}</span>
|
||||
<span v-if="statusKey === 'won'" class="result-sub">
|
||||
{{ t('history.return_incl_stake', { amount: returnAmount }) }}
|
||||
</span>
|
||||
<span v-else-if="formulaText && statusKey !== 'pending'" class="result-sub">{{ formulaText }}</span>
|
||||
<span v-else-if="statusKey === 'pending' && oddsText" class="result-sub">
|
||||
{{ stakeAmount }} × {{ oddsText }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- match / parlay title -->
|
||||
<section class="section">
|
||||
<div class="section-head">
|
||||
<span class="league-tag">
|
||||
{{ bet.isParlay ? t('history.parlay_league') : (bet.leagueName || t('history.league_default')) }}
|
||||
</span>
|
||||
<span class="placed-time">{{ placedDateTime }}</span>
|
||||
</div>
|
||||
<div class="match-name">{{ matchTitle }}</div>
|
||||
<div class="receipt-perforation" aria-hidden="true" />
|
||||
|
||||
<!-- single bet: score comparison -->
|
||||
<div v-if="!bet.isParlay" class="score-block" :class="{ 'score-block--phase': matchPhase && matchPhase !== 'open' }">
|
||||
<!-- body -->
|
||||
<div class="receipt-body">
|
||||
<div class="receipt-meta">
|
||||
<div class="meta-tags">
|
||||
<span v-if="betTypeLabel" class="meta-tag">{{ betTypeLabel }}</span>
|
||||
<span v-if="oddsText" class="meta-tag dim">@{{ oddsText }}</span>
|
||||
<span v-if="bet.isCashbacked" class="meta-tag cashback">{{ t('history.cashbacked') }}</span>
|
||||
</div>
|
||||
<span class="meta-time">{{ placedDateTime }}</span>
|
||||
</div>
|
||||
|
||||
<h2 class="match-title">{{ matchTitle }}</h2>
|
||||
|
||||
<!-- single pick -->
|
||||
<div v-if="!bet.isParlay" class="pick-block">
|
||||
<StatusWatermark
|
||||
v-if="matchPhase && matchPhase !== 'open'"
|
||||
v-if="showPhaseWatermark"
|
||||
:label="matchPhaseText"
|
||||
:variant="matchPhaseVariant(matchPhase)"
|
||||
:variant="matchPhaseVariant(matchPhase!)"
|
||||
size="md"
|
||||
/>
|
||||
<!-- my pick row -->
|
||||
<div class="row-label-val">
|
||||
<span class="row-label">{{ t('history.my_pick') }}</span>
|
||||
<span class="row-val pick">{{ myPick }}</span>
|
||||
<span class="pick-market">{{ pickMarket }}</span>
|
||||
<div class="pick-line">
|
||||
<span class="pick-selection">{{ pickSelection }}</span>
|
||||
<span v-if="oddsText" class="pick-odds">@{{ oddsText }}</span>
|
||||
</div>
|
||||
<!-- scores -->
|
||||
<div v-if="bet.matchScore?.ft || bet.matchScore?.ht" class="score-chips">
|
||||
<div v-if="bet.matchScore.ft" class="score-item">
|
||||
<span class="score-period">{{ t('history.ft') }}</span>
|
||||
<span class="score-value">{{ bet.matchScore.ft }}</span>
|
||||
</div>
|
||||
<div v-if="bet.matchScore.ht" class="score-item">
|
||||
<span class="score-period">{{ t('history.ht') }}</span>
|
||||
<span class="score-value muted">{{ bet.matchScore.ht }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="statusKey === 'pending'" class="no-score">{{ t('history.awaiting_result') }}</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- parlay legs -->
|
||||
<section v-if="bet.isParlay && bet.legs?.length" class="section">
|
||||
<div class="section-title">{{ t('history.legs') }}</div>
|
||||
<div class="legs-list">
|
||||
<div v-for="(leg, i) in bet.legs" :key="i" class="leg-row" :class="legStatusKey(leg.resultStatus)">
|
||||
<div class="leg-left">
|
||||
<span class="leg-num" :class="legStatusKey(leg.resultStatus)">{{ i + 1 }}</span>
|
||||
<div class="leg-body">
|
||||
<span class="leg-match">{{ leg.matchTitle }}</span>
|
||||
<span class="leg-pick-line">
|
||||
{{ leg.marketLabel }}: {{ translateSel(leg.selectionName) }}
|
||||
</span>
|
||||
<div v-if="leg.score?.ft || leg.score?.ht" class="leg-scores">
|
||||
<span v-if="leg.score.ft">{{ t('history.ft') }} {{ leg.score.ft }}</span>
|
||||
<span v-if="leg.score.ht" class="muted-score">{{ t('history.ht') }} {{ leg.score.ht }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leg-right">
|
||||
<span class="leg-odds-val">{{ formatOdds(leg.odds) }}</span>
|
||||
<span v-if="leg.resultStatus" class="leg-result-badge" :class="legStatusKey(leg.resultStatus)">
|
||||
{{ t(`history.status_${legStatusKey(leg.resultStatus)}`) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- bet summary -->
|
||||
<section class="section">
|
||||
<div class="section-title">{{ t('history.summary') }}</div>
|
||||
<div class="summary-rows">
|
||||
<div class="sum-row">
|
||||
<span>{{ t('history.stake') }}</span>
|
||||
<span>{{ formatMoney(bet.stake, locale) }}</span>
|
||||
</div>
|
||||
<div v-if="bet.totalOdds" class="sum-row">
|
||||
<span>{{ t('history.odds') }}</span>
|
||||
<span class="odds-val">{{ formatOdds(bet.totalOdds) }}</span>
|
||||
</div>
|
||||
<div class="sum-row">
|
||||
<span>{{ statusKey === 'pending' ? t('history.est_return') : t('history.return') }}</span>
|
||||
<span :class="{ 'amt-won': statusKey === 'won', 'amt-pending': statusKey === 'pending', 'amt-lost': statusKey === 'lost' }">
|
||||
{{ returnAmount }}
|
||||
<div v-if="bet.matchScore?.ft || bet.matchScore?.ht" class="score-row">
|
||||
<span v-if="bet.matchScore.ft" class="score-pill">
|
||||
<em>{{ t('history.ft') }}</em>{{ bet.matchScore.ft }}
|
||||
</span>
|
||||
<span v-if="bet.matchScore.ht" class="score-pill dim">
|
||||
<em>{{ t('history.ht') }}</em>{{ bet.matchScore.ht }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="sum-row muted">
|
||||
<span>{{ t('history.bet_no') }}</span>
|
||||
<span class="bet-no-val">{{ bet.betNo }}</span>
|
||||
<p v-else-if="statusKey === 'pending'" class="awaiting">{{ t('history.awaiting_result') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- parlay legs -->
|
||||
<div v-if="bet.isParlay && bet.legs?.length" class="legs-list">
|
||||
<div
|
||||
v-for="(leg, i) in bet.legs"
|
||||
:key="i"
|
||||
class="leg-item"
|
||||
:class="legStatusKey(leg.resultStatus)"
|
||||
>
|
||||
<div class="leg-status-dot" :class="legStatusKey(leg.resultStatus)">
|
||||
<svg v-if="legStatusKey(leg.resultStatus) === 'won'" viewBox="0 0 12 12"><path d="M2 6l3 3 5-5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
||||
<svg v-else-if="legStatusKey(leg.resultStatus) === 'lost'" viewBox="0 0 12 12"><path d="M3 3l6 6M9 3l-6 6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" /></svg>
|
||||
<span v-else>{{ i + 1 }}</span>
|
||||
</div>
|
||||
<div class="leg-content">
|
||||
<div class="leg-head">
|
||||
<span class="leg-match">{{ leg.matchTitle }}</span>
|
||||
<span class="leg-odds">@{{ formatOdds(leg.odds) }}</span>
|
||||
</div>
|
||||
<span class="leg-pick">{{ leg.marketLabel }} · {{ translateSel(leg.selectionName) }}</span>
|
||||
<div v-if="leg.score?.ft || leg.score?.ht" class="score-row compact">
|
||||
<span v-if="leg.score.ft" class="score-pill sm"><em>{{ t('history.ft') }}</em>{{ leg.score.ft }}</span>
|
||||
<span v-if="leg.score.ht" class="score-pill sm dim"><em>{{ t('history.ht') }}</em>{{ leg.score.ht }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="receipt-perforation" aria-hidden="true" />
|
||||
|
||||
<!-- footer -->
|
||||
<div class="receipt-foot">
|
||||
<div class="foot-row">
|
||||
<span>{{ t('history.stake') }}</span>
|
||||
<span>{{ stakeAmount }}</span>
|
||||
</div>
|
||||
<div v-if="bet.totalOdds" class="foot-row">
|
||||
<span>{{ t('history.odds') }}</span>
|
||||
<span class="gold">{{ formatOdds(bet.totalOdds) }}</span>
|
||||
</div>
|
||||
<div class="foot-row id">
|
||||
<span>{{ t('history.bet_no') }}</span>
|
||||
<span class="mono">{{ bet.betNo }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.detail-page {
|
||||
padding-bottom: 32px;
|
||||
padding-bottom: 36px;
|
||||
}
|
||||
|
||||
.pull-indicator {
|
||||
@@ -269,360 +339,396 @@ const matchPhaseText = computed(() => matchPhaseLabel(t, matchPhase.value));
|
||||
}
|
||||
|
||||
.top-bar {
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--primary-light, #d4af37);
|
||||
color: var(--primary-light);
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
padding: 4px 0 8px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.state {
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
color: #666;
|
||||
color: var(--text-muted);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ── hero ── */
|
||||
.hero {
|
||||
border-radius: 14px;
|
||||
padding: 20px 20px 18px;
|
||||
/* ── receipt ticket ── */
|
||||
.receipt {
|
||||
position: relative;
|
||||
border-radius: var(--radius);
|
||||
background: rgba(18, 18, 18, 0.96);
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: var(--shadow);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* result strip */
|
||||
.receipt-result {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 20px 18px 18px;
|
||||
}
|
||||
|
||||
.receipt-result.won {
|
||||
background: linear-gradient(135deg, rgba(52, 199, 89, 0.1) 0%, transparent 70%);
|
||||
}
|
||||
|
||||
.receipt-result.lost {
|
||||
background: linear-gradient(135deg, rgba(255, 69, 58, 0.08) 0%, transparent 70%);
|
||||
}
|
||||
|
||||
.receipt-result.pending {
|
||||
background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
|
||||
}
|
||||
|
||||
.result-icon {
|
||||
flex-shrink: 0;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.result-icon svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.result-icon.won { color: #34c759; }
|
||||
.result-icon.lost { color: var(--danger); }
|
||||
.result-icon.pending { color: var(--primary-light); }
|
||||
.result-icon.push { color: var(--text-muted); }
|
||||
|
||||
.result-text {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-bottom: 12px;
|
||||
text-align: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.hero.won { background: linear-gradient(135deg, rgba(61,184,101,0.15), rgba(61,184,101,0.06)); border: 1px solid rgba(61,184,101,0.25); }
|
||||
.hero.lost { background: linear-gradient(135deg, rgba(224,80,80,0.12), rgba(224,80,80,0.05)); border: 1px solid rgba(224,80,80,0.2); }
|
||||
.hero.pending { background: linear-gradient(135deg, rgba(232,200,74,0.1), rgba(232,200,74,0.04)); border: 1px solid rgba(232,200,74,0.2); }
|
||||
.hero.push { background: #181818; border: 1px solid #2a2a2a; }
|
||||
|
||||
.hero-status {
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.1em;
|
||||
.result-label {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.hero.won .hero-status { color: #3db865; }
|
||||
.hero.lost .hero-status { color: #e05050; }
|
||||
.hero.pending .hero-status { color: #e8c84a; }
|
||||
.hero.push .hero-status { color: #888; }
|
||||
|
||||
.hero-return {
|
||||
font-size: 36px;
|
||||
.result-amount {
|
||||
font-size: 32px;
|
||||
font-weight: 900;
|
||||
letter-spacing: -0.01em;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
.hero.won .hero-return { color: #3db865; text-shadow: 0 0 24px rgba(61,184,101,0.3); }
|
||||
.hero.lost .hero-return { color: #e05050; }
|
||||
.hero.pending .hero-return { color: #e8c84a; }
|
||||
.hero.push .hero-return { color: #777; }
|
||||
|
||||
.hero-return-label {
|
||||
font-size: 10.5px;
|
||||
color: #555;
|
||||
.receipt-result.won .result-amount { color: #34c759; }
|
||||
.receipt-result.lost .result-amount { color: var(--danger); }
|
||||
.receipt-result.pending .result-amount { color: var(--primary-light); }
|
||||
.receipt-result.push .result-amount { color: var(--text-muted); }
|
||||
|
||||
.result-sub {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* ── sections ── */
|
||||
.section {
|
||||
background: #141414;
|
||||
border: 1px solid #222;
|
||||
border-radius: 12px;
|
||||
padding: 14px 16px;
|
||||
/* perforated divider */
|
||||
.receipt-perforation {
|
||||
height: 1px;
|
||||
margin: 0 14px;
|
||||
background: repeating-linear-gradient(
|
||||
90deg,
|
||||
transparent 0,
|
||||
transparent 4px,
|
||||
rgba(255, 255, 255, 0.08) 4px,
|
||||
rgba(255, 255, 255, 0.08) 8px
|
||||
);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.receipt-perforation::before,
|
||||
.receipt-perforation::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
background: var(--bg-body, #000);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.receipt-perforation::before { left: -20px; }
|
||||
.receipt-perforation::after { right: -20px; }
|
||||
|
||||
/* body */
|
||||
.receipt-body {
|
||||
padding: 16px 18px;
|
||||
}
|
||||
|
||||
.receipt-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
.meta-tags {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.meta-tag {
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
padding: 3px 8px;
|
||||
border-radius: 4px;
|
||||
color: var(--primary-light);
|
||||
background: rgba(212, 175, 55, 0.1);
|
||||
border: 1px solid var(--border-gold-soft);
|
||||
}
|
||||
|
||||
.meta-tag.dim {
|
||||
color: var(--text-muted);
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
.meta-tag.cashback {
|
||||
color: #f0b90b;
|
||||
background: rgba(240, 185, 11, 0.1);
|
||||
border-color: rgba(240, 185, 11, 0.25);
|
||||
}
|
||||
|
||||
.meta-time {
|
||||
flex-shrink: 0;
|
||||
font-size: 11px;
|
||||
color: #555;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.match-title {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: var(--text);
|
||||
line-height: 1.35;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
/* pick block */
|
||||
.pick-block {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: 14px;
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.pick-market {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
letter-spacing: 0.04em;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.league-tag {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.placed-time {
|
||||
font-size: 11px;
|
||||
color: #555;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.match-name {
|
||||
font-size: 17px;
|
||||
font-weight: 900;
|
||||
color: #f0f0f0;
|
||||
line-height: 1.3;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* score block */
|
||||
.score-block {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.score-block--phase {
|
||||
padding: 8px 0 4px;
|
||||
}
|
||||
|
||||
.row-label-val {
|
||||
.pick-line {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.row-label {
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.row-val {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #c8c8c8;
|
||||
}
|
||||
|
||||
.row-val.pick {
|
||||
color: #d4af37;
|
||||
}
|
||||
|
||||
.score-chips {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.score-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #2a2a2a;
|
||||
border-radius: 7px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.score-period {
|
||||
font-size: 10px;
|
||||
color: #666;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.score-value {
|
||||
.pick-selection {
|
||||
font-size: 16px;
|
||||
font-weight: 900;
|
||||
color: #e8e8e8;
|
||||
}
|
||||
|
||||
.score-value.muted {
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.no-score {
|
||||
font-size: 11.5px;
|
||||
color: #555;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* section title */
|
||||
.section-title {
|
||||
font-size: 10.5px;
|
||||
color: #555;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.08em;
|
||||
color: var(--primary-light);
|
||||
}
|
||||
|
||||
.pick-odds {
|
||||
font-size: 14px;
|
||||
font-weight: 900;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.score-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.score-row.compact {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.score-pill {
|
||||
font-size: 13px;
|
||||
font-weight: 800;
|
||||
color: var(--text);
|
||||
padding: 5px 10px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.score-pill em {
|
||||
font-style: normal;
|
||||
font-size: 9px;
|
||||
font-weight: 800;
|
||||
color: var(--text-muted);
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.score-pill.dim { color: var(--text-muted); }
|
||||
.score-pill.sm { font-size: 11px; padding: 3px 8px; }
|
||||
|
||||
.awaiting {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* parlay legs */
|
||||
.legs-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.leg-row {
|
||||
.leg-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #252525;
|
||||
border-radius: 9px;
|
||||
padding: 10px 12px;
|
||||
gap: 12px;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.leg-row.won { border-color: rgba(61,184,101,0.2); }
|
||||
.leg-row.lost { border-color: rgba(224,80,80,0.18); }
|
||||
.leg-item:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.leg-left {
|
||||
.leg-status-dot {
|
||||
flex-shrink: 0;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
font-weight: 900;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1.5px solid var(--border);
|
||||
color: var(--text-muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.leg-status-dot svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.leg-status-dot.won {
|
||||
background: rgba(52, 199, 89, 0.12);
|
||||
border-color: rgba(52, 199, 89, 0.45);
|
||||
color: #34c759;
|
||||
}
|
||||
|
||||
.leg-status-dot.lost {
|
||||
background: rgba(255, 69, 58, 0.1);
|
||||
border-color: rgba(255, 69, 58, 0.35);
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.leg-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.leg-num {
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background: #2a2a2a;
|
||||
color: #666;
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
.leg-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.leg-num.won { background: rgba(61,184,101,0.18); color: #3db865; }
|
||||
.leg-num.lost { background: rgba(224,80,80,0.18); color: #e05050; }
|
||||
|
||||
.leg-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
min-width: 0;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.leg-match {
|
||||
font-size: 12.5px;
|
||||
font-size: 13px;
|
||||
font-weight: 800;
|
||||
color: #d0d0d0;
|
||||
color: var(--text);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.leg-pick-line {
|
||||
font-size: 11.5px;
|
||||
color: #888;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.leg-scores {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.leg-scores span {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: #c8c8c8;
|
||||
}
|
||||
|
||||
.leg-scores .muted-score {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.leg-right {
|
||||
.leg-odds {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.leg-odds-val {
|
||||
font-size: 15px;
|
||||
font-size: 13px;
|
||||
font-weight: 900;
|
||||
color: #b8a04a;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.leg-result-badge {
|
||||
font-size: 9px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
.leg-pick {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.leg-result-badge.won { color: #3db865; background: rgba(61,184,101,0.12); }
|
||||
.leg-result-badge.lost { color: #e05050; background: rgba(224,80,80,0.1); }
|
||||
.leg-result-badge.push { color: #888; background: #222; }
|
||||
.leg-result-badge.pending { color: #666; background: #1e1e1e; }
|
||||
|
||||
/* summary */
|
||||
.summary-rows {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
/* footer */
|
||||
.receipt-foot {
|
||||
padding: 14px 18px 16px;
|
||||
}
|
||||
|
||||
.sum-row {
|
||||
.foot-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #1c1c1c;
|
||||
padding: 7px 0;
|
||||
font-size: 13px;
|
||||
color: #b0b0b0;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sum-row:last-child {
|
||||
border-bottom: none;
|
||||
.foot-row span:last-child {
|
||||
color: var(--text);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sum-row.muted {
|
||||
color: #444;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.odds-val {
|
||||
color: #b8a04a;
|
||||
.foot-row .gold {
|
||||
color: var(--primary-light);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.amt-won {
|
||||
color: #3db865;
|
||||
font-weight: 900;
|
||||
font-size: 15px;
|
||||
.foot-row.id {
|
||||
margin-top: 4px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.amt-pending {
|
||||
color: #e8c84a;
|
||||
font-weight: 900;
|
||||
.foot-row.id span:last-child {
|
||||
color: #555;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.amt-lost {
|
||||
color: #e05050;
|
||||
font-weight: 900;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.bet-no-val {
|
||||
font-family: monospace;
|
||||
letter-spacing: 0.04em;
|
||||
.mono {
|
||||
font-family: ui-monospace, monospace;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user