PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.7.1
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.7.1
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 / stores / modalStore.ts
hostinger-reach / frontend / vue / stores Last commit date
generalDataStore.ts 4 months ago index.ts 1 year ago integrationsStore.ts 4 months ago modalStore.ts 1 year ago pagesStore.ts 5 months ago
modalStore.ts
24 lines
1 import { defineStore } from 'pinia';
2 import { ref } from 'vue';
3
4 import type { ModalName } from '@/types/enums';
5 import type { ModalContent, ModalSettings } from '@/types/models';
6
7 export const useModalStore = defineStore('modalStore', () => {
8 interface Modal {
9 name: ModalName;
10 data?: ModalContent;
11 settings?: ModalSettings;
12 }
13
14 const activeModal = ref<Modal | null>(null);
15
16 const openModal = (name: ModalName, data?: ModalContent, settings?: ModalSettings) => {
17 activeModal.value = { name, data, settings };
18 };
19
20 const closeModal = () => (activeModal.value = null);
21
22 return { activeModal, openModal, closeModal };
23 });
24