diff --git a/.env.sample b/.env.sample
index 73338d8d4..5950dd0f6 100644
--- a/.env.sample
+++ b/.env.sample
@@ -1,3 +1,3 @@
CONFIG=vidos-config.json
-NUXT_PUBLIC_SENTRY_DSN=
-NUXT_PUBLIC_SENTRY_ENVIRONMENT=production
+SENTRY_DSN=
+SENTRY_ENVIRONMENT=production
diff --git a/README.md b/README.md
index 164a6c303..080d20b86 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,7 @@ Full entry points documentation available on [api.yml](public/api.yaml) and on s
* Full page: `/`, `/{poi_Id}`, `/{category_ids}/` and `/{category_ids}/{poi_id}`.
* Parameters:
* `boundary`: an alternative boundary key from settings `polygons_extra`.
+ * `clipingPolygonSlug`: POI filtering by polygon (key from settings `polygons_extra`).
* Embedded: `/embedded/`, same subpath and parameters as full page.
* POI:
* details: `/poi/{id}/details`.
@@ -82,7 +83,7 @@ yarn start
```
cp .env.sample .env
docker compose build
-docker-compose -f docker compose.yml run --rm vido yarn build-config
+docker compose run --rm vido yarn build-config
docker compose up -d
```
@@ -108,7 +109,23 @@ Header set Content-Security-Policy "frame-ancestors *"
Vido is mainly building using:
- [MapLibre GL JS](https://maplibre.org/maplibre-gl-js-docs/api/map/)
-- [Nxut3](https://nuxt.com/) and [Vue3](https://vuejs.org/), using the Options API
+- [Nuxt 3](https://nuxt.com/) and [Vue 3](https://vuejs.org/), using both Options API / Composition API
+
+### Setup hooks
+
+Ensure that `core.hooksPath` is properly setup !
+
+From your project root run:
+
+```bash
+git config core.hooksPath .git/hooks/
+```
+
+Then update your hooks with the following command:
+
+```bash
+yarn dlx simple-git-hooks
+```
```
# serve with hot reload at localhost:3000
diff --git a/components/Fields/Coordinates.vue b/components/Fields/Coordinates.vue
index 2706e443b..8f1e04934 100644
--- a/components/Fields/Coordinates.vue
+++ b/components/Fields/Coordinates.vue
@@ -5,7 +5,6 @@ import type { PropType } from 'vue'
import { defineNuxtComponent } from '#app'
import ExternalLink from '~/components/UI/ExternalLink.vue'
import { coordinatesHref } from '~/lib/coordinates'
-import { isIOS } from '~/utils/isIOS'
export function isCoordinatesEmpty(geom: GeoJSON.Geometry): boolean {
return !(geom && geom.type === 'Point' && geom.coordinates)
@@ -30,9 +29,7 @@ export default defineNuxtComponent({
},
mounted() {
- // isOS is client side only
- this.href
- = isIOS !== undefined ? coordinatesHref(this.geom, isIOS()) : undefined
+ this.href = coordinatesHref(this.geom)
},
})
diff --git a/components/Fields/Field.vue b/components/Fields/Field.vue
index 7eee6309d..f5d164b0c 100644
--- a/components/Fields/Field.vue
+++ b/components/Fields/Field.vue
@@ -10,7 +10,8 @@ import DateRange, { isDateRangeEmpty } from '~/components/Fields/DateRange.vue'
import Facebook from '~/components/Fields/Facebook.vue'
import LinkedIn from '~/components/Fields/LinkedIn.vue'
import Instagram from '~/components/Fields/Instagram.vue'
-import OpeningHours, { isOpeningHoursSupportedOsmTags } from '~/components/Fields/OpeningHours.vue'
+import OpeningHours from '~/components/Fields/OpeningHours.vue'
+import { isOpeningHoursSupportedOsmTags } from '~/composables/useOpeningHours'
import Phone from '~/components/Fields/Phone.vue'
import RoutesField from '~/components/Fields/RoutesField.vue'
import Stars from '~/components/Fields/Stars.vue'
@@ -313,7 +314,7 @@ export default defineNuxtComponent({
"
:href="properties[field.field]"
class="d-inline-block pa-2 rounded-lg"
- :style="{ backgroundColor: colorfill, color: '#ffffff' }"
+ :style="{ color: '#ffffff' }"
>
- {{ $t('openingHours.next') }}
+ {{ t('openingHours.next') }}
{{ $t('openingHours.variableWeek') }}
+{{ t('openingHours.variableWeek') }}
diff --git a/components/Home/Embedded.vue b/components/Home/Embedded.vue index b2a616904..34eb352a0 100644 --- a/components/Home/Embedded.vue +++ b/components/Home/Embedded.vue @@ -22,7 +22,6 @@ import { flattenFeatures } from '~/utils/utilities' const props = defineProps<{ boundaryArea?: Polygon | MultiPolygon initialCategoryIds?: number[] - initialPoi?: ApiPoi }>() // @@ -60,8 +59,7 @@ onMounted(() => { } menuStore.setSelectedCategoryIds(enabledCategories) } - if (props.initialPoi) - mapStore.setSelectedFeature(props.initialPoi) + if (props.boundaryArea) { initialBbox.value = getBBoxFeature(props.boundaryArea) } @@ -132,6 +130,7 @@ watch(selectedCategoryIds, (a, b) => { menuStore.fetchFeatures({ vidoConfig: config!, categoryIds: selectedCategoryIds.value, + clipingPolygonSlug: route.query.clipingPolygonSlug?.toString(), }) } } diff --git a/components/Home/ExplorerOrFavoritesBack.vue b/components/Home/ExplorerOrFavoritesBack.vue index 3dc3553ae..c5c9be7ca 100644 --- a/components/Home/ExplorerOrFavoritesBack.vue +++ b/components/Home/ExplorerOrFavoritesBack.vue @@ -1,37 +1,30 @@ - @@ -40,22 +33,12 @@ export default defineNuxtComponent({- {{ - $t( - device.smallScreen - ? isModeFavorites - ? 'headerMenu.backToMenuFavorites' - : 'headerMenu.backToMenuExplorer' - : isModeFavorites - ? 'headerMenu.backToMenuFavoritesMobile' - : 'headerMenu.backToMenuExplorerMobile', - ) - }} + {{ t(label) }}
diff --git a/components/Home/Home.vue b/components/Home/Home.vue index 6c6c3b068..5f002a16d 100644 --- a/components/Home/Home.vue +++ b/components/Home/Home.vue @@ -1,5 +1,5 @@ @@ -481,11 +465,11 @@ function handlePoiCardClose() {