fix(front): fix ErrorComponent.vue sentry integration
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
51d43aa2d1
commit
00d8bc733d
|
@ -36,7 +36,7 @@
|
||||||
keypath="{instanceName} is an instance of {mobilizon_link}, a free software built with the community."
|
keypath="{instanceName} is an instance of {mobilizon_link}, a free software built with the community."
|
||||||
>
|
>
|
||||||
<template #instanceName>
|
<template #instanceName>
|
||||||
<b>{{ config?.name }}</b>
|
<b>{{ instanceName }}</b>
|
||||||
</template>
|
</template>
|
||||||
<template #mobilizon_link>
|
<template #mobilizon_link>
|
||||||
<a href="https://joinmobilizon.org">{{ t("Mobilizon") }}</a>
|
<a href="https://joinmobilizon.org">{{ t("Mobilizon") }}</a>
|
||||||
|
@ -57,7 +57,10 @@
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<SentryFeedback />
|
<SentryFeedback
|
||||||
|
v-if="sentryProvider"
|
||||||
|
:providerConfig="sentryProvider"
|
||||||
|
/>
|
||||||
|
|
||||||
<p class="prose dark:prose-invert" v-if="!sentryEnabled">
|
<p class="prose dark:prose-invert" v-if="!sentryEnabled">
|
||||||
{{
|
{{
|
||||||
|
@ -84,7 +87,7 @@
|
||||||
<div class="buttons" v-if="!sentryEnabled">
|
<div class="buttons" v-if="!sentryEnabled">
|
||||||
<o-tooltip
|
<o-tooltip
|
||||||
:label="tooltipConfig.label"
|
:label="tooltipConfig.label"
|
||||||
:type="tooltipConfig.type"
|
:variant="tooltipConfig.variant"
|
||||||
:active="copied !== false"
|
:active="copied !== false"
|
||||||
always
|
always
|
||||||
>
|
>
|
||||||
|
@ -101,12 +104,13 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { checkProviderConfig } from "@/services/statistics";
|
import { checkProviderConfig } from "@/services/statistics";
|
||||||
import { IAnalyticsConfig } from "@/types/config.model";
|
import { IAnalyticsConfig, IConfig } from "@/types/config.model";
|
||||||
import { computed, defineAsyncComponent, ref } from "vue";
|
import { computed, defineAsyncComponent, ref } from "vue";
|
||||||
import { useQueryLoading } from "@vue/apollo-composable";
|
import { useQuery, useQueryLoading } from "@vue/apollo-composable";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useHead } from "@unhead/vue";
|
import { useHead } from "@unhead/vue";
|
||||||
import { useAnalytics } from "@/composition/apollo/config";
|
import { useAnalytics } from "@/composition/apollo/config";
|
||||||
|
import { INSTANCE_NAME } from "@/graphql/config";
|
||||||
const SentryFeedback = defineAsyncComponent(
|
const SentryFeedback = defineAsyncComponent(
|
||||||
() => import("./Feedback/SentryFeedback.vue")
|
() => import("./Feedback/SentryFeedback.vue")
|
||||||
);
|
);
|
||||||
|
@ -126,6 +130,12 @@ useHead({
|
||||||
title: computed(() => t("Error")),
|
title: computed(() => t("Error")),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { result: instanceConfig } = useQuery<{ config: Pick<IConfig, "name"> }>(
|
||||||
|
INSTANCE_NAME
|
||||||
|
);
|
||||||
|
|
||||||
|
const instanceName = computed(() => instanceConfig.value?.config.name);
|
||||||
|
|
||||||
const copyErrorToClipboard = async (): Promise<void> => {
|
const copyErrorToClipboard = async (): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
if (window.isSecureContext && navigator.clipboard) {
|
if (window.isSecureContext && navigator.clipboard) {
|
||||||
|
|
Loading…
Reference in a new issue