From e5232c2af35e809ad6794030808c055222e02fe7 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 15 Oct 2026 23:22:15 +0200 Subject: [PATCH] fix(ui): clarify logistics and facility lead effects on cards, prevent line breaks in liquidation and buttons --- frontend/css/style.css | 44 ++++++++++++++++++++++++++------ frontend/js/ui/inspectorView.js | 10 ++++++-- frontend/js/ui/productionView.js | 32 ++++++++++++++--------- 3 files changed, 64 insertions(+), 22 deletions(-) diff --git a/frontend/css/style.css b/frontend/css/style.css index 05a50e1..7af0fdc 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -615,7 +615,7 @@ body { .production-grid { display: grid; - grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; } @@ -628,7 +628,7 @@ body { display: flex; flex-direction: column; justify-content: space-between; - min-height: 410px; + min-height: 420px; gap: 12px; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; @@ -879,6 +879,7 @@ body { font-size: 0.78rem; font-weight: 700; cursor: pointer; + white-space: nowrap; transition: background 0.15s, opacity 0.15s; } @@ -905,6 +906,7 @@ body { font-size: 0.78rem; font-weight: 700; cursor: pointer; + white-space: nowrap; } .btn-corp-action:hover { @@ -924,6 +926,7 @@ body { font-weight: 600; color: var(--text-primary); cursor: pointer; + white-space: nowrap; } .btn-corp-secondary:hover:not(:disabled) { @@ -945,6 +948,7 @@ body { font-weight: 700; padding: 6px 10px; border-radius: var(--radius-sm); + white-space: nowrap; } /* ========================================================================== @@ -1443,13 +1447,30 @@ body { .liquidation-buttons { display: flex; + flex-direction: column; gap: 8px; } .liquidation-buttons button { - flex: 1; - font-size: 0.75rem; - padding: 8px 6px; + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + font-size: 0.78rem; + padding: 8px 12px; + white-space: nowrap; +} + +.liquidation-btn-label { + display: inline-flex; + align-items: center; + gap: 6px; + font-weight: 700; +} + +.liquidation-btn-val { + font-family: var(--font-mono); + font-weight: 700; } .chain-box { @@ -1478,7 +1499,7 @@ body { .chain-items { display: flex; flex-direction: column; - gap: 4px; + gap: 6px; } .chain-item-row { @@ -1487,10 +1508,11 @@ body { align-items: center; background: var(--bg-surface); border: 1px solid var(--border-color); - padding: 6px 8px; + padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; + gap: 10px; } .chain-item-row:hover { @@ -1503,11 +1525,17 @@ body { gap: 6px; font-size: 0.78rem; font-weight: 600; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + min-width: 0; } .chain-item-ratio { - font-size: 0.7rem; + font-size: 0.72rem; color: var(--text-muted); + white-space: nowrap; + flex-shrink: 0; } .chain-badge { diff --git a/frontend/js/ui/inspectorView.js b/frontend/js/ui/inspectorView.js index cf6cadd..c70396e 100644 --- a/frontend/js/ui/inspectorView.js +++ b/frontend/js/ui/inspectorView.js @@ -60,10 +60,16 @@ export function mountInspector(container, state, onAction) {

Liquidate stockpiles immediately onto the wholesale spot market.

diff --git a/frontend/js/ui/productionView.js b/frontend/js/ui/productionView.js index 0812d52..e0a2939 100644 --- a/frontend/js/ui/productionView.js +++ b/frontend/js/ui/productionView.js @@ -267,7 +267,7 @@ export function mountProductionFloor(container, state, onAction, engine) { ${fmtNum(pState.stock, 0)} ${p.unit}
- Output Velocity: + Production Output: ${rates.isBottlenecked ? '0.0 (Paused)' : `${fmtNum(rates.prodRate, 1)}/s`} @@ -280,9 +280,9 @@ export function mountProductionFloor(container, state, onAction, engine) { Wholesale Price: ${fmtCurrency(p.basePrice)}
-
- Logistics Fleet: - ${pState.logistics || 0} fleets +
+ Logistics Auto-Sell: + ${pState.logistics || 0} fleets (${fmtNum((pState.logistics || 0) * 0.75, 2)}/s)
Milestone Eff: @@ -294,30 +294,30 @@ export function mountProductionFloor(container, state, onAction, engine) {
- - ${!pState.manager ? ` - ` : ` - - Auto + + Lead Active (Auto) `} -
@@ -474,7 +474,8 @@ export function updateProductionFloor(container, state, engine) { const elLogistics = document.getElementById(`logistics-${p.id}`); if (elLogistics) { - const logText = `${pState.logistics || 0} fleets`; + const count = pState.logistics || 0; + const logText = `${count} fleets (${fmtNum(count * 0.75, 2)}/s)`; if (elLogistics.textContent !== logText) { elLogistics.textContent = logText; } @@ -556,6 +557,13 @@ export function updateProductionFloor(container, state, engine) { if (elBtnLogistics.disabled !== !canAfford) { elBtnLogistics.disabled = !canAfford; } + const elBtnLogisticsText = document.getElementById(`btn-logistics-text-${p.id}`); + if (elBtnLogisticsText) { + const text = `+Fleet (${fmtCurrency(logisticsCost)})`; + if (elBtnLogisticsText.textContent !== text) { + elBtnLogisticsText.textContent = text; + } + } } // Selected Card class