add trigger warning disabled

This commit is contained in:
Mutasem 2022-04-06 08:07:38 +02:00
parent 9572a3b900
commit cf563e567d
2 changed files with 18 additions and 9 deletions

View file

@ -6,12 +6,14 @@
custom-class="data-display-wrapper" custom-class="data-display-wrapper"
width="85%" width="85%"
append-to-body append-to-body
@opened="showDocumentHelp = true"
> >
<div :class="$style.backToCanvas"> <n8n-tooltip placement="bottom-start" :disabled="!triggerWaitingWarningEnabled">
<n8n-icon icon="arrow-left" color="text-xlight" size="small" /> <div slot="content" :class="$style.triggerWarning">{{ $locale.baseText('node.backToCanvas.waitingForTriggerWarning') }}</div>
<n8n-text color="text-xlight" size="small">{{ $locale.baseText('node.backToCanvas') }}</n8n-text> <div :class="$style.backToCanvas" @click="close">
</div> <n8n-icon icon="arrow-left" color="text-xlight" size="small" />
<n8n-text color="text-xlight" size="small">{{ $locale.baseText('node.backToCanvas') }}</n8n-text>
</div>
</n8n-tooltip>
<div class="data-display" v-if="node" > <div class="data-display" v-if="node" >
<NodeSettings :eventBus="settingsEventBus" @valueChanged="valueChanged" /> <NodeSettings :eventBus="settingsEventBus" @valueChanged="valueChanged" />
@ -47,9 +49,8 @@ export default mixins(externalHooks, nodeHelpers, workflowHelpers).extend({
}, },
data () { data () {
return { return {
basePath: this.$store.getters.getBaseUrl,
showDocumentHelp: false,
settingsEventBus: new Vue(), settingsEventBus: new Vue(),
triggerWaitingWarningEnabled: false,
}; };
}, },
computed: { computed: {
@ -86,7 +87,7 @@ export default mixins(externalHooks, nodeHelpers, workflowHelpers).extend({
}, },
close () { close () {
this.$externalHooks().run('dataDisplay.nodeEditingFinished'); this.$externalHooks().run('dataDisplay.nodeEditingFinished');
this.showDocumentHelp = false; this.triggerWaitingWarningEnabled = false;
this.$store.commit('setActiveNode', null); this.$store.commit('setActiveNode', null);
}, },
}, },
@ -130,10 +131,17 @@ export default mixins(externalHooks, nodeHelpers, workflowHelpers).extend({
</style> </style>
<style lang="scss" module> <style lang="scss" module>
.triggerWarning {
max-width: 180px;
}
.backToCanvas { .backToCanvas {
position: absolute; position: absolute;
top: -24px; top: -24px;
pointer-events: none;
&:hover {
cursor: pointer;
}
> * { > * {
margin-right: var(--spacing-3xs); margin-right: var(--spacing-3xs);

View file

@ -1161,6 +1161,7 @@
"node.output.emptyInput": "This input item is empty. {name} will still execute when it recieves an empty item.", "node.output.emptyInput": "This input item is empty. {name} will still execute when it recieves an empty item.",
"node.output.staleDataWarning": "Node parameters have changed. <br /> Execute node again to refresh output.", "node.output.staleDataWarning": "Node parameters have changed. <br /> Execute node again to refresh output.",
"node.backToCanvas": "Back to canvas", "node.backToCanvas": "Back to canvas",
"node.backToCanvas.waitingForTriggerWarning": "Waiting for a Trigger node to execute. Close this view to see the Workflow Canvas.",
"openWorkflow.workflowImportError": "Could not import workflow", "openWorkflow.workflowImportError": "Could not import workflow",
"openWorkflow.workflowNotFoundError": "Could not find workflow", "openWorkflow.workflowNotFoundError": "Could not find workflow",
"settings": "Settings", "settings": "Settings",