doxa-maps/library/components/map-controls/HelpButton.vue
Doxa Maps 726b11ae79 A lazy view that fails to load says so and offers Retry; map controls carry data-control
retryableAsyncComponent: after the three retries the pane rendered blank. It now shows
"This view couldn't load." with a Retry button (messages keys, 11 locales). Retry swaps in a
fresh async component, since Vue keeps a rejected load for the life of the page.

Each map control wrapper passes data-control (zoom-in, zoom-out, fullscreen, theme, location,
help, share) to its button: an untranslated hook for probes, where title and aria-label are
localised.
2026-09-28 11:42:54 +00:00

30 lines
837 B
Vue

<!--
HelpButton.vue — Opens the "About this map" help modal.
Service logic extension point: swap the `open-help` emit for an inline
tooltip, an external link, a Pinia help-store action, etc.
Props:
isDark — theme flag forwarded from parent
Emits:
open-help — fires on click; parent decides how to display help content
-->
<script setup>
import { useI18n } from 'vue-i18n'
import MapControlButton from './MapControlButton.vue'
const { t } = useI18n()
defineProps({
isDark: { type: Boolean, default: false }
})
defineEmits(['open-help'])
</script>
<template>
<MapControlButton data-control="help" :is-dark="isDark" :title="t('buttons.aboutThisMap')" @click="$emit('open-help')">
<span style="font-size:15px;font-weight:700;font-family:serif;line-height:1;">?</span>
</MapControlButton>
</template>