mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Make node title non-editable in executions view (#5046)
🐛 Fix node title non-editable in executions
This commit is contained in:
parent
d9b98fc8be
commit
2f40a7f98a
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<span :class="$style.container" data-test-id="node-title-container" @click="onEdit">
|
<span :class="$style.container" data-test-id="node-title-container" @click="onEdit">
|
||||||
<span :class="$style.iconWrapper"><NodeIcon :nodeType="nodeType" :size="18" /></span>
|
<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
|
<div
|
||||||
:class="$style.editContainer"
|
:class="$style.editContainer"
|
||||||
@keydown.enter="onRename"
|
@keydown.enter="onRename"
|
||||||
|
@ -28,10 +28,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #reference>
|
<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 }}
|
{{ value }}
|
||||||
<div :class="$style.editIconContainer">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -60,6 +60,11 @@ export default Vue.extend({
|
||||||
newName: '',
|
newName: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
editable(): boolean {
|
||||||
|
return !this.readOnly && window === window.parent;
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onEdit() {
|
onEdit() {
|
||||||
this.newName = this.value;
|
this.newName = this.value;
|
||||||
|
|
Loading…
Reference in a new issue