fix: export tribeAccessDeniedView e inviteRequiredView en main_views

Backend 0.7.6 destructura ambas funciones para usarlas en rutas de
control de acceso a sub-tribes (1274, 2415, 2458, 2509, 2517). Sin
estos exports, esas rutas lanzarían TypeError al invocarlas.

Verificación: server local arrancado como 0.7.6, las 26 rutas
testeadas devuelven 200, incluyendo /graphos (nuevo módulo) y
/pads /chats (que pueden invocar tribeAccessDeniedView).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
SITO 2026-05-15 20:29:23 +02:00
parent 8189a3ab32
commit eb73e87a54

View file

@ -1095,6 +1095,38 @@ const template = (titlePrefix, ...elements) => {
exports.template = template;
exports.tribeAccessDeniedView = (tribe) => {
const tribeName = tribe && !tribe.isAnonymous ? tribe.title : "";
return template(
i18n.tribeContentAccessDenied,
div({ class: "div-center" },
h2(i18n.tribeContentAccessDenied),
p(i18n.tribeContentAccessDeniedMsg),
tribeName ? p({ class: "tribe-access-name" }, tribeName) : null,
div({ class: "visit-btn-centered" },
a({ href: "/tribes", class: "filter-btn" }, i18n.tribeViewTribes)
)
)
);
};
exports.inviteRequiredView = (kind, tribe) => {
const msg = kind === 'pad' ? (i18n.tribePadInviteRequired || 'You do not have access to the pad. Ask for an invitation to access the content.')
: kind === 'chat' ? (i18n.tribeChatInviteRequired || 'You do not have access to the chat. Ask for an invitation to access the content.')
: (i18n.tribeContentAccessDeniedMsg);
const backHref = tribe ? `/tribe/${encodeURIComponent(tribe.id)}?section=${kind === 'chat' ? 'chats' : 'pads'}` : (kind === 'chat' ? '/chats' : '/pads');
return template(
i18n.tribeContentAccessDenied,
div({ class: "div-center" },
h2(i18n.tribeContentAccessDenied),
p(msg),
div({ class: "visit-btn-centered" },
a({ href: backHref, class: "filter-btn" }, i18n.walletBack || "Back")
)
)
);
};
const thread = (messages) => {
let lookingForTarget = true;
let shallowest = Infinity;