feat: Simplification of UI and icons creation
This commit is contained in:
+3
-4
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user