feat: New theme + wire price adjustement
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user