From e4694770c1d482b4cfd4d150b3e6cea1261a966c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 31 Jan 2023 15:07:20 +0100 Subject: [PATCH] Move map style buttons into an own component --- webapp/components/Map/MapStylesButtons.vue | 39 +++++++++++++++++ webapp/pages/map.vue | 51 +++++++--------------- 2 files changed, 55 insertions(+), 35 deletions(-) create mode 100644 webapp/components/Map/MapStylesButtons.vue diff --git a/webapp/components/Map/MapStylesButtons.vue b/webapp/components/Map/MapStylesButtons.vue new file mode 100644 index 000000000..be77a5344 --- /dev/null +++ b/webapp/components/Map/MapStylesButtons.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index b0754f13a..d41d8fcf4 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -6,18 +6,12 @@ -
- - {{ style.title }} - -
+ -
- - {{ style.title }} - -
+ @@ -63,12 +51,16 @@ import { objectValuesToArray } from '~/utils/utils' import { profileUserQuery, mapUserQuery } from '~/graphql/User' import { groupQuery } from '~/graphql/groups' import mobile from '~/mixins/mobile' +import MapStylesButtons from '~/components/Map/MapStylesButtons' const maxMobileWidth = 639 // on this width and smaller the mapbox 'MapboxGeocoder' search gets bigger export default { name: 'Map', mixins: [mobile(maxMobileWidth)], + components: { + MapStylesButtons, + }, head() { return { title: this.$t('map.pageTitle'), @@ -474,15 +466,4 @@ export default { .mgl-map-wrapper { height: 70vh; } -.map-style-button { - position: relative; - margin-left: 6px; - margin-top: 6px; - margin-bottom: 6px; - - &.--deactivated { - color: $text-color-base; - background-color: $background-color-softer; - } -}