mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(editor): Show template credential setup based on feature flag (#7989)
Replace the local storage based feature flag with posthog feature flag. Also: - Fix bunch of eslint warnings in posthog store
This commit is contained in:
@@ -66,10 +66,9 @@ import type {
|
||||
} from '@/Interface';
|
||||
|
||||
import { setPageTitle } from '@/utils/htmlUtils';
|
||||
import { VIEWS } from '@/constants';
|
||||
import { TEMPLATE_CREDENTIAL_SETUP_EXPERIMENT, VIEWS } from '@/constants';
|
||||
import { useTemplatesStore } from '@/stores/templates.store';
|
||||
import { usePostHog } from '@/stores/posthog.store';
|
||||
import { FeatureFlag, isFeatureFlagEnabled } from '@/utils/featureFlag';
|
||||
import { openTemplateCredentialSetup } from '@/utils/templates/templateActions';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
|
||||
@@ -129,7 +128,7 @@ export default defineComponent({
|
||||
this.navigateTo(event, VIEWS.TEMPLATE, id);
|
||||
},
|
||||
async onUseWorkflow({ event, id }: { event: MouseEvent; id: string }) {
|
||||
if (!isFeatureFlagEnabled(FeatureFlag.templateCredentialsSetup)) {
|
||||
if (this.posthogStore.isFeatureEnabled(TEMPLATE_CREDENTIAL_SETUP_EXPERIMENT)) {
|
||||
const telemetryPayload = {
|
||||
template_id: id,
|
||||
wf_template_repo_session_id: this.templatesStore.currentSessionId,
|
||||
@@ -142,6 +141,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
await openTemplateCredentialSetup({
|
||||
posthogStore: this.posthogStore,
|
||||
router: this.$router,
|
||||
templateId: id,
|
||||
inNewBrowserTab: event.metaKey || event.ctrlKey,
|
||||
|
||||
Reference in New Issue
Block a user