From 1c58658012c13cceb416061363497c2ad52f433b Mon Sep 17 00:00:00 2001 From: Dan Griffiths Date: Tue, 7 Jan 2025 16:02:36 -0600 Subject: [PATCH] Redesign platform indicators on dispatch board Signed-off-by: Dan Griffiths --- src/components/DispatchTable/DispatchTable.js | 2 +- .../DispatchTable/DispatchTable.module.scss | 50 ++++++++++++------- src/components/DispatchTable/RescueRow.js | 41 ++++++++++++--- src/data/platformList.js | 8 +-- src/util/fontawesome/library.js | 3 ++ 5 files changed, 73 insertions(+), 31 deletions(-) diff --git a/src/components/DispatchTable/DispatchTable.js b/src/components/DispatchTable/DispatchTable.js index 0d6be528..39efdc09 100644 --- a/src/components/DispatchTable/DispatchTable.js +++ b/src/components/DispatchTable/DispatchTable.js @@ -26,7 +26,7 @@ function DispatchTable (props) { {'#'} {'CMDR'} - {'Plat'} + {'Platform'} {'Lang'} {'System'} {'Rats'} diff --git a/src/components/DispatchTable/DispatchTable.module.scss b/src/components/DispatchTable/DispatchTable.module.scss index 3e3f53cc..fab8c33a 100644 --- a/src/components/DispatchTable/DispatchTable.module.scss +++ b/src/components/DispatchTable/DispatchTable.module.scss @@ -80,41 +80,55 @@ .cmdrName { flex-grow: 1; } +} - .expansionBadge { +.platform { + .platformBadge { order: 1; color: $white; - padding: 0 0.5rem; + text-align: center; + + width: 100%; + + > .platformBadgeIcon { + background-color: $black-lightened; + + display: inline-block; - margin-left: 0.8rem; + width: 27px; - &.horizons3 { + > svg { + height: 12px; + } + } + + > .platformBadgeLabel { + display: inline-block; + + width: calc( 100% - 27px ); + } + + &.horizons3 > .platformBadgeLabel { background-color: $magenta-dark3; } - &.horizons4 { + &.horizons4 > .platformBadgeLabel { background-color: $blue-dark3; } - &.odyssey { + &.odyssey > .platformBadgeLabel { background-color: $gold-dark2; } - } -} -.platform { - &.ps { - color: $playstation-blue-light3 - } - - &.xb { - color: $xbox-green-light - } + &.ps > .platformBadgeLabel { + background-color: $xbox-green-light; + } - &.pc { - color: $magenta-dark + &.xb > .platformBadgeLabel { + background-color: $playstation-blue-light3; + } } } diff --git a/src/components/DispatchTable/RescueRow.js b/src/components/DispatchTable/RescueRow.js index e6f164bd..20f3ff71 100644 --- a/src/components/DispatchTable/RescueRow.js +++ b/src/components/DispatchTable/RescueRow.js @@ -113,19 +113,44 @@ function RescueRow (props) { {client ?? '?'} - { - platform === 'pc' && expansion && ( - - {expansionNameMap[expansion]} - - ) - } - {rescuePlatform.short} + { + platform === 'pc' && expansion && ( + + + + + + {expansionNameMap[expansion]} + + + ) + } + { + platform !== 'pc' && ( + + + { + platform === 'ps' && ( + + ) + } + { + platform === 'xb' && ( + + ) + } + + + {rescuePlatform.short} + + + ) + }