Files
Febe/src/Febe.Web/wwwroot/js/pages/problems.js
T

23 lines
1.2 KiB
JavaScript

// The configuration error page (spec §8.2, §11): when GET /api/capabilities lists problems (missing FEBE_PASSWORD,
// Data folder not writable or on a network share, WebView2 missing) the engine does not start and the interface shows
// only this page: for each problem what is wrong, what Febe did and what to do.
import { h, icon, fill, brand } from '../core/dom.js';
import { t } from '../core/text.js';
export function showProblems(root, problems) {
document.title = t('app.titoloPagina', { pagina: t('problemi.titolo') });
fill(root, h('main.pagina-problemi', { id: 'contenuto' },
h('div.problemi-testa', h('span.marchio-piccolo', brand()), h('b', t('app.nome'))),
h('h1', t('problemi.titolo')),
h('p.aiuto', t('problemi.aiuto', { n: problems.length })),
problems.map((p) => h('section.pannello.problema', { 'data-codice': p.code },
h('h2', icon('octagon-alert', 'l'), h('span', p.title)),
h('h3', t('problemi.cosa')),
h('p', p.message),
h('h3', t('problemi.rimedio')),
h('p.rimedio', p.remedy))),
h('div.riga-azione', h('button.btn.primo', { type: 'button', onclick: () => location.reload() }, icon('refresh-cw', 's'), t('problemi.ricarica'))),
h('p.aiuto.piccolo', t('problemi.guida'))));
}