mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(editor): Move editor-ui and design-system to frontend dir (no-changelog) (#13564)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import type { EnterpriseEditionFeatureValue } from '@/Interface';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
features: EnterpriseEditionFeatureValue[];
|
||||
}>(),
|
||||
{
|
||||
features: () => [],
|
||||
},
|
||||
);
|
||||
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
const canAccess = computed(() =>
|
||||
props.features.reduce(
|
||||
(acc: boolean, feature) => acc && !!settingsStore.isEnterpriseFeatureEnabled[feature],
|
||||
true,
|
||||
),
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<slot v-if="canAccess" />
|
||||
<slot v-else name="fallback" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user