PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.8.0
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.8.0
1.8.0 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 / Integrations.vue
hostinger-reach / frontend / vue / components Last commit date
Modals 6 days ago skeletons 5 months ago ActionButton.vue 5 months ago ActionButtonsSection.vue 5 months ago Banner.vue 6 days ago FAQ.vue 5 months ago FormItem.vue 6 days ago FormsSection.vue 11 months ago Hero.vue 1 month ago Integrations.vue 6 days ago Pagination.vue 11 months ago PluginEntriesTable.vue 6 days ago PluginEntry.vue 6 days ago PluginExpansion.vue 8 months ago ReachContactsSummary.vue 1 month ago RecommendedPlugins.vue 6 days ago SyncStatusLabel.vue 7 months ago Tabs.vue 10 months ago Toggle.vue 10 months ago UsageCard.vue 10 months ago UsageCardsRow.vue 1 year ago UsageCardsSection.vue 1 year ago WooCommerce.vue 1 month ago WooCommerceEntriesTable.vue 5 months ago
Integrations.vue
77 lines
1 <script setup lang="ts">
2 import { computed } from 'vue';
3
4 import Banner from '@/components/Banner.vue';
5 import PluginEntriesTable from '@/components/PluginEntriesTable.vue';
6 import RecommendedPlugins from '@/components/RecommendedPlugins.vue';
7 import { TABS_KEYS } from '@/data/tabs';
8 import { useIntegrationsStore } from '@/stores/integrationsStore';
9 import type { Form, Integration } from '@/types/models';
10 import { translate } from '@/utils/translate';
11
12 type IntegrationsProps = {
13 onBannerButtonClick?: () => void;
14 };
15
16 const props = defineProps<IntegrationsProps>();
17
18 const emit = defineEmits({
19 goToPlugin: (_id: string) => true,
20 disconnectPlugin: (_id: string) => true,
21 toggleFormStatus: (_form: Form, _status: boolean) => true,
22 viewForm: (_form: Form) => true,
23 editForm: (_form: Form) => true,
24 addForm: (_id: string) => true
25 });
26
27 const integrationsStore = useIntegrationsStore();
28
29 const shouldShowTable = computed(
30 () =>
31 integrationsStore?.activeIntegrations?.filter((integration) => integration.type === TABS_KEYS.OVERVIEW_TAB_FORMS)
32 ?.length > 1 || integrationsStore.hasAnyForms(TABS_KEYS.OVERVIEW_TAB_FORMS)
33 );
34
35 const isBannerVisible = computed(() => !integrationsStore.isLoading && !shouldShowTable.value);
36 const isTableVisible = computed(() => integrationsStore.isLoading || shouldShowTable.value);
37 </script>
38
39 <template>
40 <div class="integrations">
41 <Banner
42 v-if="isBannerVisible"
43 :title="translate(`hostinger_reach_forms_banner_title`)"
44 :description="translate(`hostinger_reach_forms_banner_description`)"
45 :button-text="translate(`hostinger_reach_forms_banner_button_text`)"
46 :on-button-click="props.onBannerButtonClick"
47 :is-button-loading="integrationsStore.isLoading"
48 >
49 <template #extra>
50 <RecommendedPlugins />
51 </template>
52 </Banner>
53
54 <PluginEntriesTable
55 v-if="isTableVisible"
56 :integrations="integrationsStore.fromType(TABS_KEYS.OVERVIEW_TAB_FORMS) as Integration[]"
57 :is-loading="integrationsStore.isLoading"
58 @go-to-plugin="emit('goToPlugin', $event)"
59 @disconnect-plugin="emit('disconnectPlugin', $event)"
60 @toggle-form-status="(form, status) => emit('toggleFormStatus', form, status)"
61 @view-form="emit('viewForm', $event)"
62 @edit-form="emit('editForm', $event)"
63 @add-form="emit('addForm', $event)"
64 />
65 </div>
66 </template>
67
68 <style scoped lang="scss">
69 .integrations {
70 display: flex;
71 flex-direction: column;
72 align-self: stretch;
73 gap: 20px;
74 margin-bottom: 40px;
75 }
76 </style>
77