fix: fix workflow saving and grabber notch

This commit is contained in:
Alex Grozav 2023-07-18 14:51:44 +03:00
parent feb45664a8
commit d24dbaf9e9
7 changed files with 12 additions and 17 deletions

View file

@ -1,5 +1,5 @@
<template> <template>
<Card :loading="loading" :title="collection.name" @click="onClick"> <Card :loading="loading" :title="collection.name">
<template #footer> <template #footer>
<n8n-text size="small" color="text-light"> <n8n-text size="small" color="text-light">
{{ collection.workflows.length }} {{ collection.workflows.length }}
@ -31,11 +31,6 @@ export default defineComponent({
Card, Card,
NodeList, NodeList,
}, },
methods: {
onClick(e: MouseEvent) {
this.$emit('click', e);
},
},
}); });
</script> </script>

View file

@ -197,10 +197,8 @@ export default defineComponent({
}, },
}, },
setup() { setup() {
const loadingService = useLoadingService();
return { return {
loadingService, ...useLoadingService(),
...useTitleChange(), ...useTitleChange(),
...useToast(), ...useToast(),
...useMessage(), ...useMessage(),

View file

@ -694,7 +694,7 @@ export default defineComponent({
<style lang="scss"> <style lang="scss">
.ndv-wrapper { .ndv-wrapper {
overflow: hidden; overflow: visible;
} }
.data-display-wrapper { .data-display-wrapper {
@ -711,7 +711,7 @@ export default defineComponent({
padding: 0 !important; padding: 0 !important;
height: 100%; height: 100%;
min-height: 400px; min-height: 400px;
overflow: hidden; overflow: visible;
border-radius: 8px; border-radius: 8px;
} }
} }

View file

@ -291,10 +291,10 @@ export default defineComponent({
return this.ndvStore.outputPanelEditMode; return this.ndvStore.outputPanelEditMode;
}, },
isCommunityNode(): boolean { isCommunityNode(): boolean {
return isCommunityPackageName(this.node.type); return isCommunityPackageName(this.node?.type);
}, },
isTriggerNode(): boolean { isTriggerNode(): boolean {
return this.nodeTypesStore.isTriggerNode(this.node.type); return this.nodeTypesStore.isTriggerNode(this.node?.type);
}, },
workflowOwnerName(): string { workflowOwnerName(): string {
return this.workflowsEEStore.getWorkflowOwnerName(`${this.workflowsStore.workflowId}`); return this.workflowsEEStore.getWorkflowOwnerName(`${this.workflowsStore.workflowId}`);
@ -614,7 +614,7 @@ export default defineComponent({
} }
// Save the node name before we commit the change because // Save the node name before we commit the change because
// we need the old name to rename the node properly // we need the old name to rename the node properly
const nodeNameBefore = parameterData.node || this.node.name; const nodeNameBefore = parameterData.node || this.node?.name;
const node = this.workflowsStore.getNodeByName(nodeNameBefore); const node = this.workflowsStore.getNodeByName(nodeNameBefore);
if (node === null) { if (node === null) {
@ -935,8 +935,8 @@ export default defineComponent({
onMissingNodeLearnMoreLinkClick() { onMissingNodeLearnMoreLinkClick() {
this.$telemetry.track('user clicked cnr docs link', { this.$telemetry.track('user clicked cnr docs link', {
source: 'missing node modal source', source: 'missing node modal source',
package_name: this.node.type.split('.')[0], package_name: this.node?.type.split('.')[0],
node_type: this.node.type, node_type: this.node?.type,
}); });
}, },
onStopExecution() { onStopExecution() {

View file

@ -8,7 +8,6 @@
:disabled="disabled" :disabled="disabled"
:class="$style.button" :class="$style.button"
:type="type" :type="type"
@click="$emit('click')"
/> />
</span> </span>
</template> </template>

View file

@ -38,6 +38,7 @@ export function useLoadingService() {
} }
return { return {
loadingService,
startLoading, startLoading,
setLoadingText, setLoadingText,
stopLoading, stopLoading,

View file

@ -748,6 +748,8 @@ export const workflowHelpers = defineComponent({
return true; return true;
} catch (error) { } catch (error) {
console.error(error);
this.uiStore.removeActiveAction('workflowSaving'); this.uiStore.removeActiveAction('workflowSaving');
if (error.errorCode === 100) { if (error.errorCode === 100) {