ci: Enforce code formatting on editor-ui (no-changelog) (#5022)

* ci: Enforce code formatting on editor-ui (no-changelog)

* pnpm format on all frontend code
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-12-23 13:37:32 +01:00
committed by GitHub
parent ff810794ef
commit a12606828e
13 changed files with 55 additions and 33 deletions

View File

@@ -273,7 +273,12 @@ import WorkflowActivator from '@/components/WorkflowActivator.vue';
import Modal from '@/components/Modal.vue';
import { externalHooks } from '@/mixins/externalHooks';
import { WAIT_TIME_UNLIMITED, EXECUTIONS_MODAL_KEY, VIEWS, PLACEHOLDER_EMPTY_WORKFLOW_ID } from '@/constants';
import {
WAIT_TIME_UNLIMITED,
EXECUTIONS_MODAL_KEY,
VIEWS,
PLACEHOLDER_EMPTY_WORKFLOW_ID,
} from '@/constants';
import { restApi } from '@/mixins/restApi';
import { genericHelpers } from '@/mixins/genericHelpers';
@@ -435,8 +440,14 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
},
convertToDisplayDate,
displayExecution(execution: IExecutionsSummary, e: PointerEvent) {
if (!this.workflowsStore.workflowId || this.workflowsStore.workflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID || execution.workflowId !== this.workflowsStore.workflowId) {
const workflowExecutions: IExecutionsSummary[] = this.combinedExecutions.filter(ex => ex.workflowId === execution.workflowId);
if (
!this.workflowsStore.workflowId ||
this.workflowsStore.workflowId === PLACEHOLDER_EMPTY_WORKFLOW_ID ||
execution.workflowId !== this.workflowsStore.workflowId
) {
const workflowExecutions: IExecutionsSummary[] = this.combinedExecutions.filter(
(ex) => ex.workflowId === execution.workflowId,
);
this.workflowsStore.currentWorkflowExecutions = workflowExecutions;
this.workflowsStore.activeWorkflowExecution = execution;
}

View File

@@ -211,7 +211,9 @@ export default Vue.extend({
},
scrollToActiveCard(): void {
const executionsList = this.$refs.executionList as HTMLElement;
const currentExecutionCard = this.$refs[`execution-${this.workflowsStore.activeWorkflowExecution?.id}`] as Vue[];
const currentExecutionCard = this.$refs[
`execution-${this.workflowsStore.activeWorkflowExecution?.id}`
] as Vue[];
if (executionsList && currentExecutionCard && this.workflowsStore.activeWorkflowExecution) {
const cardElement = currentExecutionCard[0].$el as HTMLElement;

View File

@@ -192,7 +192,7 @@ export default mixins(
}
await this.openWorkflow(this.$route.params.name);
this.uiStore.nodeViewInitialized = false;
if(this.workflowsStore.currentWorkflowExecutions.length === 0) {
if (this.workflowsStore.currentWorkflowExecutions.length === 0) {
this.setExecutions();
}
if (this.activeExecution) {

View File

@@ -7,7 +7,6 @@ type Props = {
withDefaults(defineProps<Props>(), {
canDrop: false,
});
</script>
<template>

View File

@@ -18,7 +18,7 @@
@dragend="onDragEnd"
>
<template #preview="{ canDrop, el }">
<MappingPill v-if="el" :html="getShortKey(el)" :can-drop="canDrop" />
<MappingPill v-if="el" :html="getShortKey(el)" :can-drop="canDrop" />
</template>
<template>
<vue-json-pretty
@@ -251,7 +251,6 @@ export default mixins(externalHooks).extend({
background-color: var(--color-primary-tint-2);
}
}
</style>
<style lang="scss">

View File

@@ -84,7 +84,7 @@ const onDragEnd = (el: HTMLElement) => {
@dragend="onDragEnd"
>
<template #preview="{ canDrop, el }">
<MappingPill v-if="el" :html="el.outerHTML" :can-drop="canDrop" />
<MappingPill v-if="el" :html="el.outerHTML" :can-drop="canDrop" />
</template>
<template>
<div :class="$style.schema">
@@ -127,5 +127,4 @@ const onDragEnd = (el: HTMLElement) => {
display: inline-block;
padding: 0 var(--spacing-s) var(--spacing-s);
}
</style>

View File

@@ -40,7 +40,7 @@
@dragend="(column) => onDragEnd(column, 'column')"
>
<template #preview="{ canDrop }">
<MappingPill :html="shorten(column, 16, 2)" :can-drop="canDrop" />
<MappingPill :html="shorten(column, 16, 2)" :can-drop="canDrop" />
</template>
<template #default="{ isDragging }">
<div
@@ -97,7 +97,10 @@
ref="draggable"
>
<template #preview="{ canDrop, el }">
<MappingPill :html="shorten(getPathNameFromTarget(el) || '', 16, 2)" :can-drop="canDrop" />
<MappingPill
:html="shorten(getPathNameFromTarget(el) || '', 16, 2)"
:can-drop="canDrop"
/>
</template>
<template>
<tr