feat: Simplification of UI and icons creation

This commit is contained in:
gauvainboiche
2026-10-08 16:52:21 +02:00
parent a88b8f5f14
commit 2f7c307f0e
22 changed files with 1099 additions and 408 deletions
+3 -4
View File
@@ -166,9 +166,6 @@ function announce(notice) {
case 'contract_failed':
showToast(t('toast.contractFailed'), { error: true });
break;
case 'event_opportunity':
showToast(t('toast.eventOpportunity', { title: t(`event.${notice.type}.title`) }));
break;
case 'event_incident':
showToast(t('toast.eventIncident', { title: t(`event.${notice.type}.title`) }), { error: true });
break;
@@ -221,9 +218,11 @@ function render() {
// ------------------------------------------------------------------- actions
/** Wrap an engine action: run it on the current state, refresh the screen, report if it happened. */
const act = (fn) => (...args) => {
fn(state, ctx, ...args);
const done = fn(state, ctx, ...args);
render();
return done;
};
const view = createView({