From a7302310d8b10dbd6e5d363a4a75f0dc90e0169f Mon Sep 17 00:00:00 2001 From: Joel von Allmen Date: Tue, 30 Aug 2022 13:54:51 +0200 Subject: [PATCH] add option for html formatted search results --- components/map/search/Control.vue | 11 ++++++++++- config/defaults/setup.js | 3 +++ config/graubuenden/setup.js | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/components/map/search/Control.vue b/components/map/search/Control.vue index 95bb2f10..bd7d5769 100644 --- a/components/map/search/Control.vue +++ b/components/map/search/Control.vue @@ -35,6 +35,12 @@ @mousedown.prevent.stop="clearAll(props.search)" /> + + {{ $t('no_search_result') }} {{ $t('search_list_empty') }} @@ -46,11 +52,14 @@ import Multiselect from 'vue-multiselect' import { mapActions } from 'vuex' import { debounce } from 'lodash' import 'vue-multiselect/dist/vue-multiselect.min.css' +import { searchService } from '~/config/setup' export default { components: { Multiselect }, data() { - return {} + return { + isHtmlFormatted: searchService.isHtmlFormatted, + } }, mounted() { diff --git a/config/defaults/setup.js b/config/defaults/setup.js index f834b6e8..3d7d0cb4 100644 --- a/config/defaults/setup.js +++ b/config/defaults/setup.js @@ -66,6 +66,9 @@ export const searchService = { x: item.x, y: item.y, })), + + // search labels are formatted with html + isHtmlFormatted: false, } export const projectionDefinitions = { diff --git a/config/graubuenden/setup.js b/config/graubuenden/setup.js index 51bbc246..b6c012fe 100644 --- a/config/graubuenden/setup.js +++ b/config/graubuenden/setup.js @@ -71,6 +71,9 @@ export const searchService = { y: item.attrs.y, })), ], + + // search labels are formatted with html + isHtmlFormatted: true, } /**