From eecb04516ea072de2ff8bcbcf04221733aeeec87 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 1 Sep 2022 10:00:17 +0200 Subject: [PATCH] Add the map in search view Signed-off-by: Thomas Citharel --- js/package.json | 4 + js/src/components/Event/EventCard.vue | 2 +- .../components/Event/EventMetadataBlock.vue | 10 +- .../components/Event/EventMetadataSidebar.vue | 50 +- js/src/components/Group/GroupCard.vue | 4 +- js/src/components/Map/VueBottomSheet.vue | 370 +++++++++++++++ js/src/components/Search/EventMarkerMap.vue | 400 ++++++++++++++++ js/src/components/core/MaterialIcon.vue | 3 + js/src/graphql/search.ts | 6 + js/src/i18n/en_US.json | 17 +- js/src/i18n/fr_FR.json | 17 +- js/src/services/statistics/sentry.ts | 2 +- js/src/shims-vue.d.ts | 2 +- js/src/types/apollo.ts | 4 + js/src/types/event.model.ts | 5 +- js/src/views/Event/EventView.vue | 2 +- js/src/views/Group/GroupView.vue | 12 +- js/src/views/HomeView.vue | 5 +- js/src/views/SearchView.vue | 430 +++++++++++++----- js/yarn.lock | 335 +++++++------- lib/graphql/api/search.ex | 1 + lib/graphql/schema/search.ex | 6 + lib/mobilizon/actors/actors.ex | 54 ++- lib/mobilizon/events/events.ex | 51 ++- lib/service/global_search/event_result.ex | 3 +- lib/service/global_search/search_mobilizon.ex | 41 +- 26 files changed, 1507 insertions(+), 329 deletions(-) create mode 100644 js/src/components/Map/VueBottomSheet.vue create mode 100644 js/src/components/Search/EventMarkerMap.vue diff --git a/js/package.json b/js/package.json index 94dc34c15..8a0add4a1 100644 --- a/js/package.json +++ b/js/package.json @@ -65,10 +65,12 @@ "floating-vue": "^2.0.0-beta.17", "graphql": "^15.8.0", "graphql-tag": "^2.10.3", + "hammerjs": "^2.0.8", "intersection-observer": "^0.12.0", "jwt-decode": "^3.1.2", "leaflet": "^1.4.0", "leaflet.locatecontrol": "^0.76.0", + "leaflet.markercluster": "^1.5.3", "lodash": "^4.17.11", "ngeohash": "^0.6.3", "p-debounce": "^4.0.0", @@ -98,8 +100,10 @@ "@rushstack/eslint-patch": "^1.1.4", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.4", + "@types/hammerjs": "^2.0.41", "@types/leaflet": "^1.5.2", "@types/leaflet.locatecontrol": "^0.74", + "@types/leaflet.markercluster": "^1.5.1", "@types/lodash": "^4.14.141", "@types/ngeohash": "^0.6.2", "@types/phoenix": "^1.5.2", diff --git a/js/src/components/Event/EventCard.vue b/js/src/components/Event/EventCard.vue index 1d595f24a..d2aa8bf7a 100644 --- a/js/src/components/Event/EventCard.vue +++ b/js/src/components/Event/EventCard.vue @@ -3,7 +3,7 @@ class="mbz-card snap-center dark:bg-mbz-purple" :class="{ 'sm:flex sm:items-start': mode === 'row', - 'max-w-xs w-[18rem] shrink-0 flex flex-col': mode === 'column', + 'sm:max-w-xs sm:w-[18rem] shrink-0 flex flex-col': mode === 'column', }" :to="to" :isInternal="isInternal" diff --git a/js/src/components/Event/EventMetadataBlock.vue b/js/src/components/Event/EventMetadataBlock.vue index 8a8fa3161..baadec234 100644 --- a/js/src/components/Event/EventMetadataBlock.vue +++ b/js/src/components/Event/EventMetadataBlock.vue @@ -1,6 +1,6 @@