Skip to content

Commit

Permalink
fix(editor): Make node title non-editable in executions view (#5046)
Browse files Browse the repository at this point in the history
🐛 Fix node title non-editable in executions
  • Loading branch information
ivov authored Dec 29, 2022
1 parent d9b98fc commit 2f40a7f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/editor-ui/src/components/NodeTitle.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<span :class="$style.container" data-test-id="node-title-container" @click="onEdit">
<span :class="$style.iconWrapper"><NodeIcon :nodeType="nodeType" :size="18" /></span>
<n8n-popover placement="right" width="200" :value="editName" :disabled="readOnly">
<n8n-popover placement="right" width="200" :value="editName" :disabled="!editable">
<div
:class="$style.editContainer"
@keydown.enter="onRename"
Expand All @@ -28,10 +28,10 @@
</div>
</div>
<template #reference>
<div class="ph-no-capture" :class="{ [$style.title]: true, [$style.hoverable]: !readOnly }">
<div class="ph-no-capture" :class="{ [$style.title]: true, [$style.hoverable]: editable }">
{{ value }}
<div :class="$style.editIconContainer">
<font-awesome-icon :class="$style.editIcon" icon="pencil-alt" v-if="!readOnly" />
<font-awesome-icon :class="$style.editIcon" icon="pencil-alt" v-if="editable" />
</div>
</div>
</template>
Expand Down Expand Up @@ -60,6 +60,11 @@ export default Vue.extend({
newName: '',
};
},
computed: {
editable(): boolean {
return !this.readOnly && window === window.parent;
},
},
methods: {
onEdit() {
this.newName = this.value;
Expand Down

0 comments on commit 2f40a7f

Please sign in to comment.