|
|
@@ -1,9 +1,22 @@
|
|
|
+<!--
|
|
|
+Page cible du callback après authentification via la mire d'autorisation HelloAsso
|
|
|
+
|
|
|
+@see https://dev.helloasso.com/docs/mire-authorisation
|
|
|
+-->
|
|
|
<template>
|
|
|
<NuxtLayout name="blank">
|
|
|
<v-app>
|
|
|
- <div class="d-flex flex-column align-center justify-center fill-height">
|
|
|
+ <div
|
|
|
+ v-if="!error"
|
|
|
+ class="d-flex flex-column align-center justify-center fill-height theme-secondary"
|
|
|
+ >
|
|
|
<v-progress-circular indeterminate size="64" />
|
|
|
- <span class="mt-3">{{ $t('please_wait') }}</span>
|
|
|
+ <span class="mt-3"> {{ $t('please_wait') }}... </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-else class="ma-4">
|
|
|
+ <div>{{ $t('an_error_occured')}}</div>
|
|
|
+ <div>{{ $t('please_contact_support')}}</div>
|
|
|
</div>
|
|
|
</v-app>
|
|
|
</NuxtLayout>
|
|
|
@@ -44,9 +57,15 @@ const connectionRequest: ConnectionRequest = em.newInstance(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
+const error: Ref<boolean> = ref(false)
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
- await em.persist(connectionRequest)
|
|
|
- console.log('Connection request created')
|
|
|
+ try {
|
|
|
+ await em.persist(connectionRequest)
|
|
|
+ } catch (e) {
|
|
|
+ error.value = true
|
|
|
+ throw e
|
|
|
+ }
|
|
|
|
|
|
// Send a event to the parent window to notify the connection request has been created (in case SSE is not available)
|
|
|
window.opener?.postMessage(
|
|
|
@@ -57,7 +76,10 @@ onMounted(async () => {
|
|
|
// Close the popup
|
|
|
window.close()
|
|
|
})
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss"></style>
|
|
|
+<style scoped lang="scss">
|
|
|
+.background {
|
|
|
+ background-color: var(--v-theme-secondary);
|
|
|
+}
|
|
|
+</style>
|