mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
add rename modal
This commit is contained in:
parent
352583d3d6
commit
b4a49b2681
|
@ -29,6 +29,7 @@ import Loading from 'element-ui/lib/loading';
|
||||||
import MessageBox from 'element-ui/lib/message-box';
|
import MessageBox from 'element-ui/lib/message-box';
|
||||||
import Message from 'element-ui/lib/message';
|
import Message from 'element-ui/lib/message';
|
||||||
import Notification from 'element-ui/lib/notification';
|
import Notification from 'element-ui/lib/notification';
|
||||||
|
import Popover from 'element-ui/lib/popover';
|
||||||
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
|
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
|
||||||
|
|
||||||
import N8nActionBox from './N8nActionBox';
|
import N8nActionBox from './N8nActionBox';
|
||||||
|
@ -128,6 +129,7 @@ export {
|
||||||
Message,
|
Message,
|
||||||
Notification,
|
Notification,
|
||||||
CollapseTransition,
|
CollapseTransition,
|
||||||
|
Popover,
|
||||||
|
|
||||||
locale,
|
locale,
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
<n8n-button
|
<n8n-button
|
||||||
:title="$locale.baseText('runData.executesThisNodeAfterExecuting', { interpolate: { nodeName: node.name } })"
|
:title="$locale.baseText('runData.executesThisNodeAfterExecuting', { interpolate: { nodeName: node.name } })"
|
||||||
:loading="workflowRunning"
|
:loading="workflowRunning"
|
||||||
icon="play-circle"
|
|
||||||
:label="$locale.baseText('runData.executeNode')"
|
:label="$locale.baseText('runData.executeNode')"
|
||||||
@click.stop="runWorkflow(node.name, 'RunData.ExecuteNodeButton')"
|
@click.stop="runWorkflow(node.name, 'RunData.ExecuteNodeButton')"
|
||||||
/>
|
/>
|
||||||
|
@ -577,6 +576,7 @@ export default mixins(
|
||||||
> * {
|
> * {
|
||||||
padding: 0 var(--spacing-s) var(--spacing-2xs) var(--spacing-s);
|
padding: 0 var(--spacing-s) var(--spacing-2xs) var(--spacing-s);
|
||||||
padding-bottom: var(--spacing-2xs);
|
padding-bottom: var(--spacing-2xs);
|
||||||
|
font-size: var(--font-size-s);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
|
@ -623,7 +623,7 @@ export default mixins(
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-side-menu {
|
.header-side-menu {
|
||||||
padding: var(--spacing-s) var(--spacing-s) var(--spacing-l) var(--spacing-s);
|
padding: var(--spacing-s) var(--spacing-s) var(--spacing-2xs) var(--spacing-s);
|
||||||
font-size: var(--font-size-l);
|
font-size: var(--font-size-l);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<span :class="$style.container">
|
<span :class="$style.container" @click="onEdit">
|
||||||
<span :class="$style.iconWrapper"><NodeIcon :nodeType="nodeType" :size="18" /></span>
|
<span :class="$style.iconWrapper"><NodeIcon :nodeType="nodeType" :size="18" /></span>
|
||||||
{{name}}
|
<el-popover
|
||||||
|
placement="right"
|
||||||
|
width="200"
|
||||||
|
:value="editName"
|
||||||
|
>
|
||||||
|
<p>Rename node</p>
|
||||||
|
<n8n-input size="small" v-model="newName" />
|
||||||
|
<div :class="$style.editButtons">
|
||||||
|
<n8n-button type="outline" size="small" @click="editName = false" label="Cancel" />
|
||||||
|
<n8n-button type="primary" size="small" @click="onRename" label="Rename" />
|
||||||
|
</div>
|
||||||
|
<span :class="$style.title" slot="reference">
|
||||||
|
{{name}}
|
||||||
|
<font-awesome-icon :class="$style.editIcon" icon="pencil-alt" />
|
||||||
|
</span>
|
||||||
|
</el-popover>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -17,6 +32,22 @@ export default Vue.extend({
|
||||||
nodeType: {
|
nodeType: {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
editName: false,
|
||||||
|
newName: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onEdit() {
|
||||||
|
this.newName = this.name;
|
||||||
|
this.editName = true;
|
||||||
|
},
|
||||||
|
onRename() {
|
||||||
|
this.$emit('update', this.newName);
|
||||||
|
this.editName = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -26,10 +57,37 @@ export default Vue.extend({
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: var(--font-size-m);
|
font-size: var(--font-size-m);
|
||||||
line-height: var(--font-line-height-compact);
|
line-height: var(--font-line-height-compact);
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
height: 60px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.editIcon {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconWrapper {
|
.iconWrapper {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
margin-right: var(--spacing-2xs);
|
margin-right: var(--spacing-2xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editIcon {
|
||||||
|
display: none;
|
||||||
|
font-size: var(--font-size-2xs);
|
||||||
|
}
|
||||||
|
|
||||||
|
.editButtons {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: var(--spacing-s);
|
||||||
|
|
||||||
|
> * {
|
||||||
|
margin-left: var(--spacing-4xs);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -41,6 +41,7 @@ import {
|
||||||
Message,
|
Message,
|
||||||
Notification,
|
Notification,
|
||||||
CollapseTransition,
|
CollapseTransition,
|
||||||
|
Popover,
|
||||||
|
|
||||||
N8nActionBox,
|
N8nActionBox,
|
||||||
N8nAvatar,
|
N8nAvatar,
|
||||||
|
@ -130,6 +131,8 @@ Vue.use(Badge);
|
||||||
Vue.use(Card);
|
Vue.use(Card);
|
||||||
Vue.use(ColorPicker);
|
Vue.use(ColorPicker);
|
||||||
Vue.use(Container);
|
Vue.use(Container);
|
||||||
|
Vue.use(Popover);
|
||||||
|
|
||||||
Vue.use(VueAgile);
|
Vue.use(VueAgile);
|
||||||
|
|
||||||
Vue.component(CollapseTransition.name, CollapseTransition);
|
Vue.component(CollapseTransition.name, CollapseTransition);
|
||||||
|
|
|
@ -61,6 +61,7 @@ import {
|
||||||
faPause,
|
faPause,
|
||||||
faPauseCircle,
|
faPauseCircle,
|
||||||
faPen,
|
faPen,
|
||||||
|
faPencilAlt,
|
||||||
faPlay,
|
faPlay,
|
||||||
faPlayCircle,
|
faPlayCircle,
|
||||||
faPlus,
|
faPlus,
|
||||||
|
@ -158,6 +159,7 @@ addIcon(faNetworkWired);
|
||||||
addIcon(faPause);
|
addIcon(faPause);
|
||||||
addIcon(faPauseCircle);
|
addIcon(faPauseCircle);
|
||||||
addIcon(faPen);
|
addIcon(faPen);
|
||||||
|
addIcon(faPencilAlt);
|
||||||
addIcon(faPlay);
|
addIcon(faPlay);
|
||||||
addIcon(faPlayCircle);
|
addIcon(faPlayCircle);
|
||||||
addIcon(faPlus);
|
addIcon(faPlus);
|
||||||
|
|
Loading…
Reference in a new issue