fix(editor): Fix workflow card open action (#8839)

This commit is contained in:
Csaba Tuncsik
2024-03-12 11:32:34 +01:00
committed by GitHub
parent 11173a0114
commit dd40570056
2 changed files with 101 additions and 11 deletions

View File

@@ -29,7 +29,7 @@
</n8n-text>
</div>
<template #append>
<div ref="cardActions" :class="$style.cardActions">
<div :class="$style.cardActions" @click.stop>
<enterprise-edition :features="[EnterpriseEditionFeature.Sharing]">
<n8n-badge v-if="workflowPermissions.isOwner" class="mr-xs" theme="tertiary" bold>
{{ $locale.baseText('workflows.item.owner') }}
@@ -48,7 +48,6 @@
theme="dark"
data-test-id="workflow-card-actions"
@action="onAction"
@click.stop
/>
</div>
</template>
@@ -169,15 +168,8 @@ export default defineComponent({
},
},
methods: {
async onClick(event: Event) {
if (
this.$refs.cardActions === event.target ||
this.$refs.cardActions?.contains(event.target)
) {
return;
}
if (event.metaKey || event.ctrlKey) {
async onClick(event?: KeyboardEvent | PointerEvent) {
if (event?.ctrlKey || event?.metaKey) {
const route = this.$router.resolve({
name: VIEWS.WORKFLOW,
params: { name: this.data.id },