From c096a616ba77b67bccb18a1b86722b43a2b6b215 Mon Sep 17 00:00:00 2001 From: sedum Date: Fri, 2 Dec 2022 11:25:43 +0100 Subject: [PATCH] add filter by countrycodes, and allow to change geolocation providers --- components/Map.vue | 4 +- components/admin/Geolocation.vue | 157 +++++ components/admin/Settings.vue | 17 +- locales/en.json | 15 +- locales/it.json | 15 +- server/api/controller/place.js | 13 +- server/api/controller/settings.js | 6 +- server/helpers.js | 6 +- server/helpers/geolocation.js | 987 ++++++++++++++++++++++++++++++ store/index.js | 6 +- 10 files changed, 1210 insertions(+), 16 deletions(-) create mode 100644 components/admin/Geolocation.vue create mode 100644 server/helpers/geolocation.js diff --git a/components/Map.vue b/components/Map.vue index 38ef097c..4cd0b778 100644 --- a/components/Map.vue +++ b/components/Map.vue @@ -50,8 +50,8 @@ export default { data ({ $store }) { return { mdiWalk, mdiBike, mdiCar, mdiMapMarker, - url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', - attribution: 'OpenStreetMap contributors', + url: $store.state.settings.tilelayer_provider || 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', + attribution: $store.state.settings.tilelayer_provider_attribution || "OpenStreetMap contributors", zoom: 14, center: [this.event.place.latitude, this.event.place.longitude], marker: { diff --git a/components/admin/Geolocation.vue b/components/admin/Geolocation.vue new file mode 100644 index 00000000..f96f9cd9 --- /dev/null +++ b/components/admin/Geolocation.vue @@ -0,0 +1,157 @@ + + diff --git a/components/admin/Settings.vue b/components/admin/Settings.vue index 938609b4..82eb3fd0 100644 --- a/components/admin/Settings.vue +++ b/components/admin/Settings.vue @@ -57,32 +57,41 @@ v-container v-card-actions v-btn(text @click='showSMTP=true') - {{$t('admin.show_smtp_setup')}} + {{$t('admin.show_smtp_setup')}} v-btn(text @click='$emit("complete")' color='primary' v-if='setup') {{$t('common.next')}} v-icon(v-text='mdiArrowRight') + v-dialog(v-model='showGeolocationConfigs' destroy-on-close max-width='700px' :fullscreen='$vuetify.breakpoint.xsOnly') + Geolocation(@close='showGeolocationConfigs = false') + + v-card-actions + v-btn(text @click='showGeolocationConfigs=true') + {{$t('admin.show_geolocation_setup')}} +