From da3312ba17c5845afa1fa9e84ff2bf25059931de Mon Sep 17 00:00:00 2001
From: Doxa Life
Date: Thu, 1 Oct 2026 22:11:17 +0000
Subject: [PATCH] Restore the regions and country pages to upstream
The regions index, the region and country pages, their map and the /regions and /countries rules are the same as upstream again; the map slot no longer carries the country-map bundle they no longer use.
---
app/components/DoxaMapSlot.vue | 7 +++----
app/components/public/CountryDetail.vue | 23 -----------------------
app/components/public/CountryMap.vue | 4 ++--
app/components/public/RegionDetail.vue | 25 -------------------------
app/composables/useDoxaMap.ts | 9 +++------
app/pages/regions/index.vue | 13 -------------
modules/region-routes.ts | 4 +---
nuxt.config.ts | 14 ++------------
8 files changed, 11 insertions(+), 88 deletions(-)
diff --git a/app/components/DoxaMapSlot.vue b/app/components/DoxaMapSlot.vue
index 356c05e6..5acd7c25 100644
--- a/app/components/DoxaMapSlot.vue
+++ b/app/components/DoxaMapSlot.vue
@@ -6,7 +6,7 @@ interface Props {
/** Which IIFE bundle to load. Defaults to 'simple-map' to preserve
* existing call-sites (home, pray, adopt). Pass 'research-map' on the
* research page to load the 5-tab research-mfe bundle instead. */
- bundle?: 'simple-map' | 'research-map' | 'country-map'
+ bundle?: 'simple-map' | 'research-map'
}
const props = withDefaults(defineProps(), { bundle: 'simple-map' })
@@ -19,7 +19,7 @@ useDoxaMap(props.bundle)
* overwritten by the next one. Using a distinct tag per bundle eliminates
* the "Profile not found" error that occurred when /research had loaded
* its IIFE first and then the user navigated to /, /pray, or /adopt. */
-const TAGS = { 'simple-map': 'doxa-map', 'research-map': 'doxa-research-map', 'country-map': 'doxa-country-map' } as const
+const TAGS = { 'simple-map': 'doxa-map', 'research-map': 'doxa-research-map' } as const
const tagName = TAGS[props.bundle]
const isSimple = props.bundle === 'simple-map'
@@ -142,8 +142,7 @@ const effectiveConfig = computed(() => {
}
.doxa-map-slot :deep(doxa-map),
-.doxa-map-slot :deep(doxa-research-map),
-.doxa-map-slot :deep(doxa-country-map) {
+.doxa-map-slot :deep(doxa-research-map) {
display: block;
position: absolute;
/* inset inside the rounded frame; the map keeps its stacking to itself so its legend and search
diff --git a/app/components/public/CountryDetail.vue b/app/components/public/CountryDetail.vue
index 67d3e82a..24c56831 100644
--- a/app/components/public/CountryDetail.vue
+++ b/app/components/public/CountryDetail.vue
@@ -9,10 +9,6 @@ import { regionSlug, type CountrySummary } from '~~/config/countries-meta'
const props = defineProps<{ country: CountrySummary }>()
-// The country map is dx-maps' (MapLibre by default, Mapbox by NUXT_PUBLIC_MAP_PROVIDER).
-// DX-life's own CountryMap (Mapbox-only, blank without a token) is kept, switched off: set true to bring it back.
-const USE_LEGACY_COUNTRY_MAP = false
-
const { t, locale } = useI18n()
const localePath = useLocalePath()
@@ -20,17 +16,6 @@ const translations = computed(() => buildUupgListTranslations(t))
const regionLink = computed(() => localePath(`/regions/${regionSlug(props.country.region.value)}`))
const regionLabel = computed(() => props.country.region.label || t('Other'))
-// The element fetches its own people groups (pins) from DX-life's campaign server; its locale comes from
-// DoxaMapSlot, like every map.
-const mapPrayBaseUrl = (useRuntimeConfig().public.prayBaseUrl as string) || 'https://pray.doxa.life'
-const countryMapConfig = computed(() => JSON.stringify({
- profile: 'country-map',
- prayBaseUrl: mapPrayBaseUrl,
- countryCodes: [props.country.code],
- center: props.country.center,
- zoom: props.country.zoom,
- researchUrl: localePath('/research') + '/'
-}))
// Map note. Placeholders are substituted manually with %count%/%country%
// tokens rather than vue-i18n's {0}/{1} slots: vue-i18n empties brace slots
@@ -62,15 +47,7 @@ const mapNote = computed(() =>
{{ mapNote }}
-