Posterverse: "Back to homepage" leads to the DOXA site by default, in the shell's language; a host's own home link still wins

This commit is contained in:
Doxa Maps 2026-10-02 02:15:28 +00:00
parent b3de39a39e
commit 68bcb28624

View file

@ -26,7 +26,7 @@
:title="headingText"
:nav-label="tr('sec.posters')"
:header="false"
:home-href="homeHref || cfg.homeHref || ''"
:home-href="homeHref || cfg.homeHref || defaultHomeHref"
:home-label="homeLabel || cfg.homeLabel || ''"
:groups="navGroups"
:active="activeKey"
@ -116,7 +116,8 @@ export default defineComponent({
// Which tab opens first, by row id (src/tabs.js). Also ?tab= on the page URL.
tab: { type: String, default: '' },
// The host's "Back to homepage" link, drawn by VerticalTabsLayout directly above Collapse (the top of
// the drawer on a phone). Also accepted as profile-config.homeHref / homeLabel. No URL, no link.
// the drawer on a phone). Also accepted as profile-config.homeHref / homeLabel. With no URL from the host,
// the link goes to the DOXA site in the shell's language (defaultHomeHref).
homeHref: { type: String, default: '' },
homeLabel: { type: String, default: '' },
},
@ -174,6 +175,9 @@ export default defineComponent({
return (this.hostLanguage || this.hostLang || 'en').split('-')[0].toLowerCase()
},
uiLocale() { return LOCALES.includes(this.effectiveLocale) ? this.effectiveLocale : 'en' },
// "Back to homepage" with no host to name one (a standalone page, the published tree): the DOXA site, in the
// shell's language. A host's home-href, or profile-config.homeHref, always wins.
defaultHomeHref() { return 'https://doxa.life' + (this.uiLocale && this.uiLocale !== 'en' ? '/' + this.uiLocale : '') },
uiDir() { return this.uiLocale === 'ar' ? 'rtl' : 'ltr' },
layoutLabels() {
const out = {}