PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.5.9
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.5.9
1.7.2 1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / frontend / vue / components / Modals / ConfirmDisconnectModal.vue
hostinger-reach / frontend / vue / components / Modals Last commit date
Base 10 months ago Types 1 month ago AddFormModal.vue 10 months ago ConfirmDisconnectModal.vue 10 months ago Modals.vue 9 months ago SelectPageModal.vue 10 months ago
ConfirmDisconnectModal.vue
93 lines
1 <script lang="ts" setup>
2 import BaseModal from '@/components/Modals/Base/BaseModal.vue';
3 import { useModal } from '@/composables';
4 import { useIntegrationsStore } from '@/stores';
5 import { translate } from '@/utils/translate';
6
7 interface Props {
8 data?: { integration: string; backButtonRedirectAction: (() => void) | undefined };
9 }
10
11 const { closeModal } = useModal();
12 const integrationsStore = useIntegrationsStore();
13 const props = defineProps<Props>();
14
15 const dismiss = () => {
16 const backButtonAction = props.data?.backButtonRedirectAction;
17 if (backButtonAction) {
18 backButtonAction();
19 } else {
20 closeModal();
21 }
22 };
23 const handleDisconnect = async (integrationId: string) => {
24 await integrationsStore.toggleIntegrationStatus(integrationId, false);
25 dismiss();
26 };
27 </script>
28
29 <template>
30 <BaseModal title-alignment="left" :title="translate('hostinger_reach_confirm_disconnect_modal_title')">
31 <template #title-icon>
32 <HIcon class="confirm-disconnect-modal__icon" name="ic-warning-circle-filled-24" color="danger--600" />
33 </template>
34
35 <div class="confirm-disconnect-modal">
36 <div class="confirm-disconnect-modal__content">
37 <HText variant="body-2" as="p" class="confirm-disconnect-modal__text">
38 {{ translate('hostinger_reach_confirm_disconnect_modal_text') }}
39 </HText>
40 </div>
41
42 <div class="confirm-disconnect-modal__footer">
43 <HButton variant="text" color="neutral" size="small" @click="dismiss">
44 {{ translate('hostinger_reach_confirm_disconnect_modal_cancel') }}
45 </HButton>
46 <HButton
47 color="danger"
48 size="small"
49 :is-disabled="integrationsStore.isIntegrationLoading(props.data?.integration)"
50 @click="handleDisconnect(props.data?.integration)"
51 >
52 {{ translate('hostinger_reach_confirm_disconnect_modal_disconnect') }}
53 </HButton>
54 </div>
55 </div>
56 </BaseModal>
57 </template>
58
59 <style lang="scss" scoped>
60 .confirm-disconnect-modal {
61 margin-top: 24px;
62
63 &__icon {
64 margin-right: 12px;
65 }
66
67 &__content {
68 display: flex;
69 flex-direction: column;
70 gap: 20px;
71 align-items: center;
72 margin-bottom: 24px;
73 }
74
75 &__footer {
76 display: flex;
77 justify-content: flex-end;
78 gap: 8px;
79 }
80
81 @media (max-width: 640px) {
82 &__footer {
83 flex-direction: column-reverse;
84 gap: 12px;
85
86 :deep(.h-button) {
87 width: 100%;
88 }
89 }
90 }
91 }
92 </style>
93