mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
35 lines
683 B
Vue
35 lines
683 B
Vue
<script setup lang="ts">
|
|
import { useUIStore } from '@/stores/ui.store';
|
|
|
|
defineProps<{
|
|
name: string;
|
|
keepAlive?: boolean;
|
|
}>();
|
|
|
|
defineSlots<{
|
|
default: {
|
|
modalName: string;
|
|
active: boolean;
|
|
open: boolean;
|
|
activeId: string;
|
|
mode: string;
|
|
data: Record<string, unknown>;
|
|
};
|
|
}>();
|
|
|
|
const uiStore = useUIStore();
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="uiStore.modalsById[name].open || keepAlive">
|
|
<slot
|
|
:modal-name="name"
|
|
:active="uiStore.isModalActiveById[name]"
|
|
:open="uiStore.modalsById[name].open"
|
|
:active-id="uiStore.modalsById[name].activeId"
|
|
:mode="uiStore.modalsById[name].mode"
|
|
:data="uiStore.modalsById[name].data"
|
|
></slot>
|
|
</div>
|
|
</template>
|