feat: New theme + wire price adjustement

This commit is contained in:
gauvainboiche
2026-10-08 12:25:45 +02:00
parent aa9721ac2a
commit 1734487f1e
19 changed files with 348 additions and 88 deletions
+6 -1
View File
@@ -6,6 +6,7 @@ import { t } from '../services/i18n.js';
import { $, h, icon, refreshStaticIcons } from './dom.js';
const SLIDER_STEPS = 1000;
const TREND = { '-1': '▼', 1: '▲' }; // last move of the material price
function setText(node, text) {
if (node.textContent !== text) node.textContent = text;
@@ -218,7 +219,11 @@ export function createView(actions) {
el.make.disabled = state.material < d.materialPerUnit;
setText(
el.buyMaterialInfo,
t('ui.batchInfo', { amount: fmt.number(d.batchSize), cost: money(d.batchCost) }),
t('ui.batchInfo', {
amount: fmt.number(d.batchSize),
cost: money(d.batchCost),
trend: TREND[state.materialTrend] ?? '',
}),
);
el.buyMaterial.disabled = state.funds < d.batchCost;