helloasso.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <LayoutContainer>
  3. <v-card>
  4. <v-row>
  5. <v-col cols="12" md="4" class="d-flex justify-center">
  6. <v-img src="/images/logos/Logo-HelloAsso.svg" class="logo" />
  7. </v-col>
  8. <v-col cols="12" md="8" class="presentation">
  9. {{ $t('helloasso_presentation') }}
  10. </v-col>
  11. </v-row>
  12. <v-row>
  13. <v-col cols="12" class="d-flex justify-center align-center w-100 mt-6">
  14. <UiButtonHelloAssoConnect
  15. :disabled="status !== 'success'"
  16. @click="onHelloAssoConnectClicked"
  17. />
  18. </v-col>
  19. </v-row>
  20. </v-card>
  21. <!-- <v-dialog-->
  22. <!-- v-model="showDialog"-->
  23. <!-- :width="900"-->
  24. <!-- class="authDialog"-->
  25. <!-- >-->
  26. <!-- <v-card>-->
  27. <!-- <iframe-->
  28. <!-- :src="authUrl!.authUrl"-->
  29. <!-- height="600"-->
  30. <!-- frameborder="0"-->
  31. <!-- />-->
  32. <!-- </v-card>-->
  33. <!-- </v-dialog>-->
  34. </LayoutContainer>
  35. </template>
  36. <script setup lang="ts">
  37. import { useEntityFetch } from '~/composables/data/useEntityFetch'
  38. import AuthUrl from '~/models/Custom/HelloAsso/AuthUrl'
  39. const { fetch } = useEntityFetch()
  40. const { data: authUrl, status } = fetch(AuthUrl)
  41. const showDialog: Ref<boolean> = ref(true)
  42. const onHelloAssoConnectClicked = () => {
  43. if (status.value !== 'success') {
  44. console.log('still pending')
  45. } else {
  46. console.log(authUrl)
  47. showDialog.value = true
  48. navigateTo(authUrl.value!.authUrl, { external: true })
  49. }
  50. }
  51. </script>
  52. <style scoped lang="scss">
  53. .v-card {
  54. padding: 48px;
  55. max-width: 70%;
  56. margin: 36px auto;
  57. @media (max-width: 600px) {
  58. max-width: 90%;
  59. }
  60. }
  61. .logo {
  62. max-width: 80%;
  63. }
  64. .presentation {
  65. border-left: 3px solid rgb(var(--v-theme-info));
  66. padding: 0 24px;
  67. color: rgb(var(--v-theme-on-neutral));
  68. }
  69. .authDialog {
  70. max-width: 90%;
  71. }
  72. </style>