feat(editor): Add user opened cred modal telemetry event (no-changelog) (#7927)

## Summary

Add `User opened Credential modal` telemetry event to the template
credential setup page, as specified
[here](https://www.notion.so/n8n/Handoff-a1150c38f6e042db91fdf61c56900967?pvs=4)
This commit is contained in:
Tomi Turtiainen
2023-12-07 16:05:43 +02:00
committed by GitHub
parent 42e828d5c6
commit b63f9cc533
2 changed files with 20 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ const props = defineProps({
const $emit = defineEmits({
credentialSelected: (_credentialId: string) => true,
credentialDeselected: () => true,
credentialModalOpened: () => true,
});
const uiStore = useUIStore();
@@ -47,10 +48,12 @@ const onCredentialSelected = (credentialId: string) => {
};
const createNewCredential = () => {
uiStore.openNewCredential(props.credentialType, true);
$emit('credentialModalOpened');
};
const editCredential = () => {
assert(props.selectedCredentialId);
uiStore.openExistingCredential(props.selectedCredentialId);
$emit('credentialModalOpened');
};
listenForCredentialChanges({