PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.0.5
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.0.5
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 / data / pluginData.ts
hostinger-reach / frontend / vue / data Last commit date
repositories 9 months ago faq.ts 9 months ago pluginData.ts 9 months ago
pluginData.ts
67 lines
1 import contactForm7PluginIcon from '@/assets/images/icons/contact-form-7-plugin.svg';
2 import emailReachPluginIcon from '@/assets/images/icons/email-reach-plugin.svg';
3 import wpFormsLitePluginIcon from '@/assets/images/icons/wp-forms-lite-plugin.svg';
4 import type { Integration } from '@/types/models';
5
6 export const PLUGIN_IDS = {
7 HOSTINGER_REACH: 'hostinger-reach',
8 CONTACT_FORM_7: 'contact-form-7',
9 WP_FORMS_LITE: 'wp-forms-lite'
10 } as const;
11
12 export const INTEGRATION_TO_FORM_TYPE_MAP: Record<string, string> = {
13 hostingerReach: 'hostinger-reach',
14 'contactForm-7': 'contact-form-7',
15 wpformsLite: 'wpforms-lite'
16 } as const;
17
18 export const PLUGIN_TITLES = {
19 HOSTINGER_REACH: 'hostinger_reach_plugin_titles_hostinger_reach',
20 CONTACT_FORM_7: 'hostinger_reach_plugin_titles_contact_form_7',
21 WP_FORMS_LITE: 'hostinger_reach_plugin_titles_wp_forms_lite'
22 } as const;
23
24 export const PLUGIN_STATUSES = {
25 ACTIVE: 'active',
26 INACTIVE: 'inactive'
27 } as const;
28
29 export type PluginId = (typeof PLUGIN_IDS)[keyof typeof PLUGIN_IDS];
30 export type PluginStatus = (typeof PLUGIN_STATUSES)[keyof typeof PLUGIN_STATUSES];
31
32 export interface PluginInfo {
33 id: string;
34 title: string;
35 icon: string;
36 }
37
38 export const DEFAULT_PLUGIN_DATA: Record<string, PluginInfo> = {
39 hostingerReach: {
40 id: 'hostingerReach',
41 title: PLUGIN_TITLES.HOSTINGER_REACH,
42 icon: emailReachPluginIcon
43 },
44 'contactForm-7': {
45 id: 'contactForm-7',
46 title: PLUGIN_TITLES.CONTACT_FORM_7,
47 icon: contactForm7PluginIcon
48 },
49 wpformsLite: {
50 id: 'wpformsLite',
51 title: PLUGIN_TITLES.WP_FORMS_LITE,
52 icon: wpFormsLitePluginIcon
53 }
54 } as const;
55
56 export const PLUGIN_DATA = DEFAULT_PLUGIN_DATA;
57
58 export const getPluginInfo = (integration: Integration): PluginInfo => {
59 const defaultInfo = DEFAULT_PLUGIN_DATA[integration.id];
60
61 return {
62 id: integration.id,
63 title: defaultInfo?.title || integration.title,
64 icon: defaultInfo?.icon || ''
65 };
66 };
67