+ | {{ index + 1 }} |
![]()
@@ -87,7 +87,7 @@
-
+
![]()
@@ -96,7 +96,7 @@
{{ secondaryName(row) }}
- #{{ row.playerId }}
+ #{{ index + 1 }}
@@ -152,6 +152,7 @@
diff --git a/frontend/src/constants/i18n.js b/frontend/src/constants/i18n.js
index eab9f5f..4ee084b 100644
--- a/frontend/src/constants/i18n.js
+++ b/frontend/src/constants/i18n.js
@@ -4,6 +4,7 @@ export const I18N = {
subtitle: 'فئة المسدس · مسافات: 15م ← 20م ← 25م',
viewMode: 'وضع العرض',
adminMode: 'لوحة الإدارة',
+ liveMode: 'الوضع الحي',
adminLogin: 'تسجيل دخول الإدارة',
adminLoginDesc: 'أدخل بيانات الإدارة للتحكم الكامل في البطولة.',
adminPanel: 'لوحة التحكم الإدارية',
@@ -30,6 +31,26 @@ export const I18N = {
tieSlots: 'عدد المقاعد المتاحة من كسر التعادل',
waiting: 'بانتظار النتيجة',
viewProofInView: 'إظهار صور إثبات النتيجة في وضع العرض',
+ liveModeVisibility: 'إعدادات شاشة الوضع الحي',
+ activeLiveView: 'العرض النشط في الوضع الحي',
+ rotationIntervalSec: 'مدة التدوير (ثانية)',
+ rotationPlayerCount: 'عدد اللاعبين لكل صفحة تدوير',
+ liveViewGroup: 'شاشة المجموعات الحية',
+ liveViewPrelimTie: 'كسر تعادل التمهيدي',
+ liveViewPrelimOverall: 'الترتيب العام للتمهيدي',
+ liveViewFinalGroups: 'شاشة مجموعات النهائي',
+ liveViewFinalTie: 'كسر تعادل النهائي',
+ liveViewPodium: 'منصة التتويج',
+ showGroupLive: 'إظهار شاشة المجموعات الحية',
+ showPrelimTie: 'إظهار كسر تعادل التمهيدي',
+ showPrelimOverall: 'إظهار ترتيب التمهيدي العام',
+ showFinalGroups: 'إظهار مجموعات النهائي',
+ showFinalTie: 'إظهار كسر تعادل النهائي',
+ showPodium: 'إظهار منصة التتويج',
+ groupDisplayMode: 'عرض المجموعات',
+ finalDisplayMode: 'عرض مجموعات النهائي',
+ fixedGroup: 'مجموعة ثابتة',
+ fixedFinalGroup: 'المجموعة النهائية الثابتة',
sortBy: 'الترتيب',
zoom: 'التكبير',
currentScore: 'النتيجة الحالية',
@@ -62,12 +83,20 @@ export const I18N = {
profileCropTitle: 'تعديل صورة اللاعب',
profileCropSubtitle: 'حرّك وكبّر الصورة لتناسب الإطار الدائري قبل الحفظ.',
aiAdvisorTitle: 'مساعد الذكاء الاصطناعي للنتيجة',
+ liveModeTitle: 'شاشة البطولة المباشرة',
+ liveModeSubtitle: 'عرض مخصص للشاشات أثناء الفعالية مع تحديث لحظي.',
+ prelimRoundsTitle: 'الجولات التمهيدية',
+ finalRoundsTitle: 'جولات النهائي',
},
table: {
competitor: 'اللاعب',
group: 'المجموعة',
rank: 'الترتيب',
score: 'النتيجة',
+ total: 'المجموع',
+ round1: 'جولة 1',
+ round2: 'جولة 2',
+ round3: 'جولة 3',
tieScore: 'نتيجة كسر التعادل',
verification: 'التحقق',
status: 'الحالة',
@@ -108,6 +137,8 @@ export const I18N = {
applySuggestedScore: 'اعتماد النتيجة المقترحة',
applyCrop: 'تطبيق القص',
resetPosition: 'إعادة الضبط',
+ liveModeRotate: 'تدوير تلقائي',
+ liveModeFixed: 'ثابت',
},
auth: {
username: 'اسم المستخدم',
@@ -123,6 +154,7 @@ export const I18N = {
preliminary: 'التمهيدي',
prelimTie: 'كسر تعادل التأهل',
finalTie: 'كسر تعادل التتويج',
+ liveModeAdmin: 'إعدادات الوضع الحي',
},
messages: {
saved: 'تم الحفظ بنجاح.',
@@ -148,6 +180,7 @@ export const I18N = {
subtitle: 'Pistol class · Distances: 15m ← 20m ← 25m',
viewMode: 'View Mode',
adminMode: 'Admin Panel',
+ liveMode: 'Live Mode',
adminLogin: 'Admin Login',
adminLoginDesc: 'Enter admin credentials for full tournament control.',
adminPanel: 'Admin Control Panel',
@@ -174,6 +207,26 @@ export const I18N = {
tieSlots: 'Tie-break slots',
waiting: 'Waiting',
viewProofInView: 'Allow proof images in view mode',
+ liveModeVisibility: 'Live mode screen controls',
+ activeLiveView: 'Active live view',
+ rotationIntervalSec: 'Rotation interval (sec)',
+ rotationPlayerCount: 'Players per rotation page',
+ liveViewGroup: 'Live group board',
+ liveViewPrelimTie: 'Preliminary tie-break',
+ liveViewPrelimOverall: 'Preliminary overall',
+ liveViewFinalGroups: 'Final groups board',
+ liveViewFinalTie: 'Final tie-break',
+ liveViewPodium: 'Podium',
+ showGroupLive: 'Show live group board',
+ showPrelimTie: 'Show preliminary tie-break',
+ showPrelimOverall: 'Show preliminary overall ranking',
+ showFinalGroups: 'Show final groups board',
+ showFinalTie: 'Show final tie-break',
+ showPodium: 'Show podium',
+ groupDisplayMode: 'Group board mode',
+ finalDisplayMode: 'Final board mode',
+ fixedGroup: 'Fixed group',
+ fixedFinalGroup: 'Fixed final group',
sortBy: 'Sort by',
zoom: 'Zoom',
currentScore: 'Current score',
@@ -206,12 +259,20 @@ export const I18N = {
profileCropTitle: 'Adjust Player Photo',
profileCropSubtitle: 'Move and zoom to fit the circular avatar before saving.',
aiAdvisorTitle: 'AI Score Advisor',
+ liveModeTitle: 'Event Live Screen',
+ liveModeSubtitle: 'Monitor-ready display with real-time updates.',
+ prelimRoundsTitle: 'Preliminary Rounds',
+ finalRoundsTitle: 'Final Rounds',
},
table: {
competitor: 'Player',
group: 'Group',
rank: 'Rank',
score: 'Score',
+ total: 'Total',
+ round1: 'Round 1',
+ round2: 'Round 2',
+ round3: 'Round 3',
tieScore: 'Tie-Break Score',
verification: 'Verification',
status: 'Status',
@@ -252,6 +313,8 @@ export const I18N = {
applySuggestedScore: 'Apply suggested score',
applyCrop: 'Apply crop',
resetPosition: 'Reset position',
+ liveModeRotate: 'Auto rotate',
+ liveModeFixed: 'Fixed',
},
auth: {
username: 'Username',
@@ -267,6 +330,7 @@ export const I18N = {
preliminary: 'Preliminary',
prelimTie: 'Prelim Tie-Break',
finalTie: 'Final Tie-Break',
+ liveModeAdmin: 'Live Mode Settings',
},
messages: {
saved: 'Saved successfully.',
@@ -294,13 +358,33 @@ export function createInitialState() {
competition: { titleAr: '', titleEn: '' },
players: [],
scores: {
- preliminary: {},
+ prelim_r1: {},
+ prelim_r2: {},
+ prelim_r3: {},
prelim_tiebreak: {},
- final: {},
+ final_r1: {},
+ final_r2: {},
final_tiebreak: {},
},
scoreProofs: {},
- settings: { viewProofInView: false },
+ settings: {
+ viewProofInView: false,
+ liveMode: {
+ activeView: 'group_live',
+ showGroupLive: true,
+ groupDisplayMode: 'rotate',
+ groupFixedCode: '',
+ showPrelimTie: true,
+ showPrelimOverall: true,
+ showFinalGroups: true,
+ finalDisplayMode: 'rotate',
+ finalFixedGroup: 1,
+ showFinalTie: true,
+ showPodium: true,
+ rotationIntervalSec: 5,
+ rotationPlayerCount: 12,
+ },
+ },
derived: {
preliminaryRanking: { rows: [], tieBreak: { required: false, resolved: true, slots: 0, playerIds: [] } },
finalists: [],
diff --git a/frontend/src/style.css b/frontend/src/style.css
index dc44dd7..333bddb 100644
--- a/frontend/src/style.css
+++ b/frontend/src/style.css
@@ -71,6 +71,18 @@ body {
padding: 24px 28px 26px;
}
+.masthead-brand {
+ display: grid;
+ gap: 8px;
+}
+
+.masthead-logo {
+ display: block;
+ width: min(420px, 68vw);
+ height: auto;
+ object-fit: contain;
+}
+
.masthead-title {
margin: 0;
font-size: clamp(30px, 5vw, 44px);
@@ -97,6 +109,65 @@ body {
gap: 8px;
}
+.controls-popup-anchor {
+ position: relative;
+ width: fit-content;
+}
+
+.control-toggle-row {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.control-toggle-btn {
+ border: 1px solid #cfd6e7;
+ background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
+ border-radius: 12px;
+ padding: 6px 10px;
+ display: inline-flex;
+ align-items: center;
+ gap: 10px;
+ color: #445478;
+ font-size: 12px;
+ font-weight: 700;
+ cursor: pointer;
+ box-shadow: 0 4px 12px rgba(27, 31, 64, 0.08);
+}
+
+.control-toggle-btn:hover {
+ background: linear-gradient(180deg, #f0f6ff 0%, #e6f0ff 100%);
+}
+
+.control-toggle-meta {
+ font-family: "IBM Plex Mono", monospace;
+ color: #6c7a97;
+ font-size: 11px;
+}
+
+.controls-popover {
+ position: absolute;
+ top: calc(100% + 8px);
+ inset-inline-end: 0;
+ min-width: 270px;
+ z-index: 30;
+ border: 1px solid var(--border);
+ border-radius: 12px;
+ background: #fff;
+ padding: 10px;
+ box-shadow: 0 14px 28px rgba(27, 31, 64, 0.12);
+}
+
+.controls-reveal-enter-active,
+.controls-reveal-leave-active {
+ transition: opacity 0.2s ease, transform 0.2s ease;
+}
+
+.controls-reveal-enter-from,
+.controls-reveal-leave-to {
+ opacity: 0;
+ transform: translateY(-6px) scale(0.98);
+}
+
.control-box {
display: grid;
gap: 4px;
@@ -256,6 +327,35 @@ body {
margin-top: 10px;
}
+.live-settings-card {
+ margin-top: 12px;
+ border: 1px solid var(--border);
+ border-radius: 14px;
+ background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
+ padding: 12px;
+}
+
+.live-settings-head h3 {
+ margin: 0 0 10px;
+ font-size: 15px;
+}
+
+.live-settings-grid {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 8px;
+}
+
+.live-settings-row {
+ margin-top: 10px;
+}
+
+.inline-settings {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 8px;
+}
+
.switch-row {
display: inline-flex;
align-items: center;
@@ -537,6 +637,15 @@ body {
background: rgba(154, 166, 194, 0.08);
}
+.score-group-row {
+ background: linear-gradient(90deg, var(--score-group-soft, rgba(127, 140, 168, 0.08)) 0%, rgba(255, 255, 255, 0) 100%);
+}
+
+.score-group-row td:first-child {
+ box-shadow: inset 4px 0 0 var(--score-group-accent, #7f8ca8);
+ font-weight: 800;
+}
+
.qualified-row {
background: linear-gradient(90deg, rgba(0, 140, 168, 0.09), rgba(0, 140, 168, 0.02));
}
@@ -1014,6 +1123,330 @@ select.name-input {
color: var(--ok);
}
+.live-mode-shell {
+ position: relative;
+ min-height: 72vh;
+ border-radius: 18px;
+ overflow: hidden;
+ background-image: url('/bg_live.png');
+ background-size: contain;
+ background-position: center;
+ background-repeat: no-repeat;
+ border: 1px solid rgba(255, 255, 255, 0.25);
+ box-shadow: 0 16px 38px rgba(7, 19, 42, 0.24);
+}
+
+.live-mode-overlay {
+ min-height: 72vh;
+ padding: 16px;
+ background: linear-gradient(135deg, rgba(7, 18, 43, 0.72) 0%, rgba(9, 27, 56, 0.6) 45%, rgba(12, 30, 68, 0.66) 100%);
+}
+
+.live-mode-header h2 {
+ margin: 0;
+ color: #f8d78b;
+ font-size: clamp(22px, 3vw, 34px);
+}
+
+.live-mode-header p {
+ margin: 6px 0 12px;
+ color: rgba(240, 248, 255, 0.84);
+ font-weight: 600;
+}
+
+.live-mode-grid {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 12px;
+}
+
+.live-mode-grid.single {
+ grid-template-columns: 1fr;
+}
+
+.live-screen-card {
+ border: 1px solid rgba(200, 223, 255, 0.28);
+ border-radius: 14px;
+ background: rgba(8, 16, 38, 0.62);
+ box-shadow: 0 8px 18px rgba(7, 19, 42, 0.18);
+ backdrop-filter: blur(3px);
+ padding: 10px;
+ animation: fade-up 0.32s ease both;
+}
+
+.live-screen-card.wide {
+ grid-column: span 2;
+}
+
+.live-swap-block {
+ display: grid;
+ gap: 10px;
+}
+
+.live-focus-banner {
+ border: 1px solid rgba(168, 205, 242, 0.4);
+ border-radius: 14px;
+ background: linear-gradient(135deg, rgba(16, 32, 72, 0.86) 0%, rgba(11, 27, 60, 0.84) 100%);
+ padding: 10px 14px;
+ display: grid;
+ gap: 2px;
+ text-align: center;
+ box-shadow: 0 8px 18px rgba(7, 19, 42, 0.28);
+}
+
+.live-focus-label {
+ font-size: 11px;
+ font-weight: 800;
+ letter-spacing: 0.9px;
+ color: rgba(201, 224, 248, 0.82);
+ text-transform: uppercase;
+}
+
+.live-focus-title {
+ font-family: "Bebas Neue", "Cairo", sans-serif;
+ font-size: clamp(34px, 6vw, 58px);
+ line-height: 0.95;
+ letter-spacing: 1.2px;
+ color: #f6d68a;
+ text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
+}
+
+.live-focus-banner.focus-a .live-focus-title {
+ color: #98c4ff;
+}
+
+.live-focus-banner.focus-b .live-focus-title {
+ color: #8de6ff;
+}
+
+.live-focus-banner.focus-c .live-focus-title {
+ color: #ffad9d;
+}
+
+.live-focus-banner.focus-d .live-focus-title {
+ color: #ffd98f;
+}
+
+.live-focus-banner.focus-u .live-focus-title {
+ color: #d9e3f2;
+}
+
+.live-focus-banner.focus-final .live-focus-title {
+ color: #f9e3a1;
+}
+
+.live-screen-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 8px;
+ margin-bottom: 8px;
+}
+
+.live-head-selection {
+ margin-bottom: 10px;
+}
+
+.live-screen-head h3 {
+ margin: 0;
+ color: #eaf4ff;
+ font-size: 17px;
+}
+
+.live-chip-row {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ flex-wrap: wrap;
+}
+
+.live-chip {
+ padding: 4px 8px;
+ border-radius: 999px;
+ border: 1px solid rgba(130, 187, 230, 0.38);
+ background: rgba(27, 39, 75, 0.72);
+ color: #cae9ff;
+ font-size: 11px;
+ font-weight: 700;
+ letter-spacing: 0.4px;
+}
+
+.live-chip.strong {
+ border-color: rgba(255, 214, 124, 0.4);
+ color: #ffd67c;
+}
+
+.live-swap-enter-active,
+.live-swap-leave-active {
+ transition: opacity 0.34s ease, transform 0.34s ease, filter 0.34s ease;
+}
+
+.live-swap-enter-from {
+ opacity: 0;
+ transform: translateY(10px) scale(0.985);
+ filter: blur(2px);
+}
+
+.live-swap-leave-to {
+ opacity: 0;
+ transform: translateY(-8px) scale(0.99);
+ filter: blur(1px);
+}
+
+.multi-round-cell {
+ min-width: 98px;
+}
+
+.score-input-compact {
+ width: 84px;
+ min-height: 36px;
+ padding: 7px 8px;
+ font-size: 14px;
+}
+
+.mobile-round-grid {
+ display: grid;
+ grid-template-columns: 1fr;
+ gap: 8px;
+ margin-top: 8px;
+}
+
+.mobile-round-item {
+ display: grid;
+ gap: 4px;
+}
+
+.mobile-total-line {
+ margin-top: 10px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.verify-round-cell {
+ min-width: 210px;
+ vertical-align: top;
+}
+
+.verify-round-list {
+ display: grid;
+ gap: 6px;
+}
+
+.verify-round-item {
+ display: grid;
+ grid-template-columns: auto 1fr auto;
+ align-items: center;
+ gap: 6px;
+}
+
+.verify-round-label {
+ font-family: "IBM Plex Mono", monospace;
+ font-size: 11px;
+ font-weight: 700;
+ color: var(--muted);
+}
+
+.mobile-verify-block {
+ margin-top: 10px;
+ border-top: 1px dashed #d8e1f2;
+ padding-top: 8px;
+}
+
+.mobile-verify-title {
+ margin: 0 0 6px;
+ font-size: 12px;
+ font-weight: 700;
+ color: var(--muted);
+}
+
+.verify-round-list.mobile .verify-round-item {
+ grid-template-columns: 1fr;
+ justify-items: stretch;
+}
+
+.verify-round-list.mobile .btn,
+.verify-round-list.mobile .proof-thumb {
+ width: 100%;
+}
+
+.verify-round-list.mobile .proof-thumb {
+ height: auto;
+ aspect-ratio: 16 / 10;
+}
+
+.live-score-table thead th {
+ background: linear-gradient(90deg, #11254a 0%, #124665 100%);
+}
+
+.live-screen-card .score-table td {
+ color: #f2f8ff;
+ border-top-color: rgba(158, 186, 216, 0.22);
+}
+
+.live-screen-card .name-sub,
+.live-screen-card .muted {
+ color: rgba(213, 232, 255, 0.72);
+}
+
+.live-screen-card .table-wrap {
+ border-color: rgba(158, 186, 216, 0.28);
+ background: rgba(11, 24, 49, 0.65);
+}
+
+.live-screen-card .qualified-row {
+ background: linear-gradient(90deg, rgba(16, 160, 194, 0.24), rgba(16, 160, 194, 0.06));
+}
+
+.live-podium {
+ margin-top: 60px;
+ height: 390px;
+}
+
+.podium-live-card .podium-col {
+ background: linear-gradient(180deg, rgba(12, 23, 52, 0.95) 0%, rgba(9, 19, 43, 0.95) 100%);
+ border: 1px solid rgba(177, 205, 236, 0.26);
+ box-shadow: 0 16px 30px rgba(2, 10, 25, 0.45);
+ min-width: 0;
+}
+
+.podium-live-card .podium-col.pos-1 {
+ border-top: 8px solid #e7c45f;
+ background: linear-gradient(180deg, rgba(48, 38, 15, 0.95) 0%, rgba(18, 24, 48, 0.96) 100%);
+ height: 330px;
+}
+
+.podium-live-card .podium-col.pos-2 {
+ border-top: 8px solid #b8c3d7;
+ background: linear-gradient(180deg, rgba(37, 44, 62, 0.95) 0%, rgba(12, 20, 43, 0.96) 100%);
+ height: 260px;
+}
+
+.podium-live-card .podium-col.pos-3 {
+ border-top: 8px solid #cf8b45;
+ background: linear-gradient(180deg, rgba(59, 36, 23, 0.95) 0%, rgba(14, 22, 45, 0.96) 100%);
+ height: 240px;
+}
+
+.podium-live-card .podium-name {
+ color: #f2f8ff;
+}
+
+.podium-live-card .podium-name.empty {
+ color: rgba(204, 220, 240, 0.78);
+}
+
+.podium-live-card .podium-score {
+ background: rgba(255, 255, 255, 0.08);
+ color: #ffd888;
+ border-color: rgba(255, 255, 255, 0.18);
+ margin-bottom: 0;
+}
+
+.podium-live-card .podium-medal-icon {
+ filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
+}
+
.podium-panel {
background: #f0f2f8;
}
@@ -1137,17 +1570,47 @@ select.name-input {
}
.podium-score {
- margin-top: auto;
- margin-bottom: 25px;
+ margin: 0;
background: rgba(0, 0, 0, 0.04);
- padding: 8px 20px;
+ padding: 8px 12px;
border-radius: 20px;
font-family: "IBM Plex Mono", monospace;
font-size: 13px;
font-weight: 700;
color: var(--red);
border: 1px solid rgba(0, 0, 0, 0.05);
- white-space: nowrap;
+ max-width: 100%;
+ width: fit-content;
+ white-space: normal;
+ overflow-wrap: anywhere;
+ word-break: break-word;
+ text-align: center;
+ line-height: 1.2;
+}
+
+.podium-score-wrap {
+ margin-top: auto;
+ margin-bottom: 12px;
+ width: calc(100% - 16px);
+ display: grid;
+ gap: 4px;
+ justify-items: center;
+}
+
+.podium-score-sub {
+ margin: 0;
+ max-width: 100%;
+ text-align: center;
+ font-size: 11px;
+ font-weight: 600;
+ line-height: 1.2;
+ color: var(--muted);
+ overflow-wrap: anywhere;
+ word-break: break-word;
+}
+
+.podium-live-card .podium-score-sub {
+ color: rgba(220, 234, 252, 0.86);
}
.toast {
@@ -1259,6 +1722,22 @@ select.name-input {
margin-bottom: 10px;
}
+.score-group-card {
+ border-color: var(--score-group-border, var(--border));
+ background: linear-gradient(140deg, var(--score-group-soft, rgba(127, 140, 168, 0.08)) 0%, #ffffff 72%);
+ box-shadow: 0 8px 18px rgba(27, 31, 64, 0.08);
+}
+
+.score-group-card .score-card-head {
+ border-bottom: 1px dashed var(--score-group-border, #d2daec);
+ padding-bottom: 8px;
+ margin-bottom: 8px;
+}
+
+.score-group-card .score-card-meta {
+ margin-top: 0;
+}
+
.score-card-head {
display: flex;
align-items: center;
@@ -1605,12 +2084,37 @@ select.name-input {
padding: 16px;
}
+ .masthead-logo {
+ width: min(360px, 86vw);
+ }
+
.masthead-controls {
justify-items: start;
min-width: 0;
width: 100%;
}
+ .control-toggle-row {
+ width: 100%;
+ justify-content: flex-start;
+ }
+
+ .controls-popup-anchor {
+ width: 100%;
+ }
+
+ .controls-popover {
+ inset-inline-start: 0;
+ inset-inline-end: auto;
+ width: 100%;
+ min-width: 0;
+ }
+
+ .control-toggle-btn {
+ width: 100%;
+ justify-content: space-between;
+ }
+
.tab-bar {
grid-auto-columns: minmax(126px, 1fr);
}
@@ -1649,6 +2153,11 @@ select.name-input {
grid-template-columns: 1fr;
}
+ .live-settings-grid,
+ .inline-settings {
+ grid-template-columns: 1fr;
+ }
+
.view-group-grid {
grid-template-columns: 1fr;
}
@@ -1661,6 +2170,29 @@ select.name-input {
grid-template-columns: 1fr;
}
+ .live-mode-shell {
+ border-radius: 12px;
+ min-height: 0;
+ }
+
+ .live-mode-overlay {
+ padding: 10px;
+ min-height: 0;
+ }
+
+ .live-mode-grid {
+ grid-template-columns: 1fr;
+ }
+
+ .live-screen-card.wide {
+ grid-column: span 1;
+ }
+
+ .live-screen-head {
+ flex-direction: column;
+ align-items: flex-start;
+ }
+
.status-row {
justify-content: flex-start;
}
diff --git a/frontend/src/utils/scoreGroupTheme.js b/frontend/src/utils/scoreGroupTheme.js
new file mode 100644
index 0000000..62edbf6
--- /dev/null
+++ b/frontend/src/utils/scoreGroupTheme.js
@@ -0,0 +1,59 @@
+import { normalizedGroupCode } from './groups'
+
+const PRESET = {
+ A: { accent: '#2f4d9a', soft: 'rgba(47, 77, 154, 0.10)', border: 'rgba(47, 77, 154, 0.34)' },
+ B: { accent: '#0d8fa5', soft: 'rgba(13, 143, 165, 0.10)', border: 'rgba(13, 143, 165, 0.34)' },
+ C: { accent: '#d54a3f', soft: 'rgba(213, 74, 63, 0.10)', border: 'rgba(213, 74, 63, 0.34)' },
+ D: { accent: '#c2891f', soft: 'rgba(194, 137, 31, 0.12)', border: 'rgba(194, 137, 31, 0.36)' },
+ F1: { accent: '#5b4fc9', soft: 'rgba(91, 79, 201, 0.11)', border: 'rgba(91, 79, 201, 0.36)' },
+ F2: { accent: '#0f9f63', soft: 'rgba(15, 159, 99, 0.11)', border: 'rgba(15, 159, 99, 0.36)' },
+ U: { accent: '#7f8ca8', soft: 'rgba(127, 140, 168, 0.11)', border: 'rgba(127, 140, 168, 0.34)' },
+}
+
+export function scoreGroupToken(row) {
+ const finalGroup = Number(row?.finalGroup || 0)
+ if (finalGroup === 1) return 'F1'
+ if (finalGroup === 2) return 'F2'
+ const code = normalizedGroupCode(row?.groupCode || '')
+ if (code) return code
+ return 'U'
+}
+
+export function scoreGroupStyle(row) {
+ const token = scoreGroupToken(row)
+ const preset = PRESET[token]
+ if (preset) {
+ return {
+ '--score-group-accent': preset.accent,
+ '--score-group-soft': preset.soft,
+ '--score-group-border': preset.border,
+ }
+ }
+
+ const hue = hashToHue(token)
+ return {
+ '--score-group-accent': `hsl(${hue} 70% 38%)`,
+ '--score-group-soft': `hsla(${hue}, 72%, 46%, 0.10)`,
+ '--score-group-border': `hsla(${hue}, 70%, 38%, 0.34)`,
+ }
+}
+
+export function scoreValueStyle(scoreValue) {
+ const score = Number(scoreValue || 0)
+ const normalized = Number.isFinite(score) ? score : 0
+ const hue = hashToHue(`score:${normalized}`)
+ return {
+ '--score-group-accent': `hsl(${hue} 70% 38%)`,
+ '--score-group-soft': `hsla(${hue}, 72%, 46%, 0.10)`,
+ '--score-group-border': `hsla(${hue}, 70%, 38%, 0.34)`,
+ }
+}
+
+function hashToHue(value) {
+ const input = String(value || 'U')
+ let hash = 0
+ for (let i = 0; i < input.length; i += 1) {
+ hash = (hash * 31 + input.charCodeAt(i)) % 360
+ }
+ return (hash + 360) % 360
+}
|