fix: export errorView en main_views (necesario para backend sendErrorPage)
El merge de backend.js 0.7.6 introdujo sendErrorPage(ctx, message) que destructura errorView de main_views.js. Nuestro main_views local no exportaba errorView (es nuevo en 0.7.6). Sin esto, cualquier ruta que invoque sendErrorPage (ej: errores 403 en AI nav, 404, etc) lanzaría TypeError: errorView is not a function. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
3a3563f2a0
commit
8189a3ab32
1 changed files with 17 additions and 0 deletions
|
|
@ -46,6 +46,23 @@ const userLink = (feedId, knownName) => {
|
|||
exports.userLink = userLink;
|
||||
exports.userLinkLabel = userLinkLabel;
|
||||
|
||||
const errorView = ({ title, message, backHref }) => {
|
||||
const heading = title || i18n.errorPageTitle || 'Error';
|
||||
return exports.template(
|
||||
heading,
|
||||
section(
|
||||
div({ class: 'tags-header' },
|
||||
h2(heading),
|
||||
message ? p({ class: 'error-page-message' }, String(message)) : null,
|
||||
div({ class: 'error-page-actions' },
|
||||
a({ href: backHref || '/', class: 'filter-btn' }, i18n.goBack || 'Go back')
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
exports.errorView = errorView;
|
||||
|
||||
const i18nBase = require("../client/assets/translations/i18n");
|
||||
let selectedLanguage = "en";
|
||||
let i18n = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue