Merge branch 'sentry-ci' into 'main'

Send sourcemaps to our sentry instance

See merge request framasoft/mobilizon!1322
This commit is contained in:
Thomas Citharel 2022-11-04 18:30:50 +00:00
commit dbb19a5e01
6 changed files with 118 additions and 89 deletions

View file

@ -4,6 +4,7 @@ stages:
- install - install
- check - check
- build-js - build-js
- sentry
- test - test
- docker - docker
- package - package
@ -94,6 +95,21 @@ build-frontend:
needs: needs:
- lint-front - lint-front
sentry-commit:
stage: sentry
image: getsentry/sentry-cli
script:
- echo "Create a new release $CI_COMMIT_TAG"
- sentry-cli releases new $CI_COMMIT_TAG
- sentry-cli releases set-commits $CI_COMMIT_TAG --auto
- sentry-cli releases files $CI_COMMIT_TAG upload-sourcemaps priv/static/assets/
- sentry-cli releases finalize $CI_COMMIT_TAG
- echo "Finalized release for $CI_COMMIT_TAG"
needs:
- build-frontend
only:
- tags@framasoft/mobilizon
deps: deps:
stage: check stage: check
before_script: before_script:

View file

@ -1,76 +1,88 @@
<template> <template>
<div class="modal-card"> <div class="">
<header class="modal-card-head"> <div class="text-end">
<button type="button" class="delete" @click="$emit('close')" /> <button @click="emit('close')">
</header> <Close />
<div class="modal-card-body"> <span class="sr-only">{{ t("Close map") }}</span>
<section class="map"> </button>
<map-leaflet
v-if="physicalAddress?.geom"
:coords="physicalAddress.geom"
:marker="{
text: physicalAddress.fullName,
icon: physicalAddress.poiInfos.poiIcon.icon,
}"
/>
</section>
<section class="columns is-centered map-footer">
<div class="column is-half has-text-centered">
<p class="address" v-if="physicalAddress?.fullName">
<i class="mdi mdi-map-marker"></i>
{{ physicalAddress.fullName }}
</p>
<p class="getting-there">{{ $t("Getting there") }}</p>
<div
class="buttons"
v-if="
addressLinkToRouteByCar ||
addressLinkToRouteByBike ||
addressLinkToRouteByFeet
"
>
<a
class="button"
target="_blank"
v-if="addressLinkToRouteByFeet"
:href="addressLinkToRouteByFeet"
>
<i class="mdi mdi-walk"></i
></a>
<a
class="button"
target="_blank"
v-if="addressLinkToRouteByBike"
:href="addressLinkToRouteByBike"
>
<i class="mdi mdi-bike"></i
></a>
<a
class="button"
target="_blank"
v-if="addressLinkToRouteByTransit"
:href="addressLinkToRouteByTransit"
>
<i class="mdi mdi-bus"></i
></a>
<a
class="button"
target="_blank"
v-if="addressLinkToRouteByCar"
:href="addressLinkToRouteByCar"
>
<i class="mdi mdi-car"></i>
</a>
</div>
</div>
</section>
</div> </div>
<section class="map">
<map-leaflet
v-if="physicalAddress?.geom"
:coords="physicalAddress.geom"
:marker="{
text: physicalAddress.fullName,
icon: physicalAddress.poiInfos.poiIcon.icon,
}"
/>
</section>
<section class="flex flex-col items-center mt-4">
<p v-if="physicalAddress?.fullName" class="flex gap-2 text-xl font-bold">
<MapMarker />
{{ physicalAddress.fullName }}
</p>
<p class="mt-4">{{ t("Getting there") }}</p>
<div
class="flex gap-2"
v-if="
addressLinkToRouteByCar ||
addressLinkToRouteByBike ||
addressLinkToRouteByFeet
"
>
<o-button
tag="a"
target="_blank"
v-if="addressLinkToRouteByFeet"
:href="addressLinkToRouteByFeet"
>
<Walk />
<span class="sr-only">{{ t("On foot") }}</span>
</o-button>
<o-button
tag="a"
target="_blank"
v-if="addressLinkToRouteByBike"
:href="addressLinkToRouteByBike"
>
<Bike />
<span class="sr-only">{{ t("By bike") }}</span>
</o-button>
<o-button
tag="a"
target="_blank"
v-if="addressLinkToRouteByTransit"
:href="addressLinkToRouteByTransit"
>
<Bus />
<span class="sr-only">{{ t("By transit") }}</span>
</o-button>
<o-button
tag="a"
target="_blank"
v-if="addressLinkToRouteByCar"
:href="addressLinkToRouteByCar"
>
<Car />
<span class="sr-only">{{ t("By car") }}</span>
</o-button>
</div>
</section>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Address, IAddress } from "@/types/address.model"; import { Address, IAddress } from "@/types/address.model";
import { RoutingTransportationType, RoutingType } from "@/types/enums"; import { RoutingTransportationType, RoutingType } from "@/types/enums";
import { computed, defineAsyncComponent } from "vue"; import { computed, defineAsyncComponent } from "vue";
import { useI18n } from "vue-i18n";
import Car from "vue-material-design-icons/Car.vue";
import Bike from "vue-material-design-icons/Bike.vue";
import Bus from "vue-material-design-icons/Bus.vue";
import Walk from "vue-material-design-icons/Walk.vue";
import MapMarker from "vue-material-design-icons/MapMarker.vue";
import Close from "vue-material-design-icons/Close.vue";
const { t } = useI18n({ useScope: "global" });
const RoutingParamType = { const RoutingParamType = {
[RoutingType.OPENSTREETMAP]: { [RoutingType.OPENSTREETMAP]: {
@ -96,6 +108,8 @@ const props = defineProps<{
routingType: RoutingType; routingType: RoutingType;
}>(); }>();
const emit = defineEmits(["close"]);
const physicalAddress = computed((): Address | null => { const physicalAddress = computed((): Address | null => {
if (!props.address) return null; if (!props.address) return null;
@ -150,25 +164,8 @@ const addressLinkToRouteByTransit = computed((): undefined | string => {
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@use "@/styles/_mixins" as *;
.modal-card-head {
justify-content: flex-end;
// button.delete {
// @include margin-right(1rem);
// }
}
section.map { section.map {
height: calc(100% - 8rem); height: 75vh;
width: calc(100% - 20px); width: 100%;
}
section.map-footer {
p.address {
margin: 1rem auto;
}
div.buttons {
justify-content: center;
}
} }
</style> </style>

View file

@ -428,7 +428,7 @@ uploadMediaDone(({ data }) => {
.focus() .focus()
.setImage({ .setImage({
src: data.uploadMedia.url, src: data.uploadMedia.url,
alt: '', alt: "",
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
"data-media-id": data.uploadMedia.id, "data-media-id": data.uploadMedia.id,

View file

@ -1438,5 +1438,13 @@
"No event found at this address": "No event found at this address", "No event found at this address": "No event found at this address",
"I have an account on {instance}.": "I have an account on {instance}.", "I have an account on {instance}.": "I have an account on {instance}.",
"profile{\\'@\\'}instance": "profile{\\'@\\'}instance", "profile{\\'@\\'}instance": "profile{\\'@\\'}instance",
"My federated identity ends in {domain}": "My federated identity ends in {domain}" "My federated identity ends in {domain}": "My federated identity ends in {domain}",
"Close map": "Close map",
"On foot": "On foot",
"By bike": "By bike",
"By transit": "By transit",
"By car": "By car",
"Select all resources": "Select all resources",
"Select this resource": "Select this resource",
"You can add resources by using the button above.": "You can add resources by using the button above."
} }

View file

@ -1435,5 +1435,13 @@
"{timezoneLongName} ({timezoneShortName})": "{timezoneLongName} ({timezoneShortName})", "{timezoneLongName} ({timezoneShortName})": "{timezoneLongName} ({timezoneShortName})",
"{title} ({count} todos)": "{title} ({count} todos)", "{title} ({count} todos)": "{title} ({count} todos)",
"{username} was invited to {group}": "{username} a été invité à {group}", "{username} was invited to {group}": "{username} a été invité à {group}",
"© The OpenStreetMap Contributors": "© Les Contributeur⋅ices OpenStreetMap" "© The OpenStreetMap Contributors": "© Les Contributeur⋅ices OpenStreetMap",
"Close map": "Fermer la carte",
"On foot": "À pied",
"By bike": "En vélo",
"By transit": "En transports en commun",
"By car": "En voiture",
"Select all resources": "Sélectionner toutes les ressources",
"Select this resource": "Sélectionner cette ressource",
"You can add resources by using the button above.": "Vous pouvez ajouter des ressources en utilisant le bouton au dessus."
} }

View file

@ -205,11 +205,11 @@
full-screen full-screen
:can-cancel="['escape', 'outside']" :can-cancel="['escape', 'outside']"
> >
<template #default="props"> <template #default>
<event-map <event-map
:routingType="routingType ?? RoutingType.OPENSTREETMAP" :routingType="routingType ?? RoutingType.OPENSTREETMAP"
:address="event.physicalAddress" :address="event.physicalAddress"
@close="props.close" @close="showMap = false"
/> />
</template> </template>
</o-modal> </o-modal>