mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -13,9 +13,8 @@
|
||||
<div v-if="!binaryData">
|
||||
{{ $locale.baseText('binaryDataDisplay.noDataFoundToDisplay') }}
|
||||
</div>
|
||||
<BinaryDataDisplayEmbed v-else :binaryData="binaryData"/>
|
||||
<BinaryDataDisplayEmbed v-else :binaryData="binaryData" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,62 +30,62 @@ import { restApi } from '@/mixins/restApi';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useWorkflowsStore } from '@/stores/workflows';
|
||||
|
||||
export default mixins(
|
||||
nodeHelpers,
|
||||
restApi,
|
||||
)
|
||||
.extend({
|
||||
name: 'BinaryDataDisplay',
|
||||
components: {
|
||||
BinaryDataDisplayEmbed,
|
||||
export default mixins(nodeHelpers, restApi).extend({
|
||||
name: 'BinaryDataDisplay',
|
||||
components: {
|
||||
BinaryDataDisplayEmbed,
|
||||
},
|
||||
props: [
|
||||
'displayData', // IBinaryData
|
||||
'windowVisible', // boolean
|
||||
],
|
||||
computed: {
|
||||
...mapStores(useWorkflowsStore),
|
||||
binaryData(): IBinaryData | null {
|
||||
const binaryData = this.getBinaryData(
|
||||
this.workflowRunData,
|
||||
this.displayData.node,
|
||||
this.displayData.runIndex,
|
||||
this.displayData.outputIndex,
|
||||
);
|
||||
|
||||
if (binaryData.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (
|
||||
this.displayData.index >= binaryData.length ||
|
||||
binaryData[this.displayData.index][this.displayData.key] === undefined
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const binaryDataItem: IBinaryData = binaryData[this.displayData.index][this.displayData.key];
|
||||
|
||||
return binaryDataItem;
|
||||
},
|
||||
props: [
|
||||
'displayData', // IBinaryData
|
||||
'windowVisible', // boolean
|
||||
],
|
||||
computed: {
|
||||
...mapStores(
|
||||
useWorkflowsStore,
|
||||
),
|
||||
binaryData (): IBinaryData | null {
|
||||
const binaryData = this.getBinaryData(this.workflowRunData, this.displayData.node, this.displayData.runIndex, this.displayData.outputIndex);
|
||||
|
||||
if (binaryData.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this.displayData.index >= binaryData.length || binaryData[this.displayData.index][this.displayData.key] === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const binaryDataItem: IBinaryData = binaryData[this.displayData.index][this.displayData.key];
|
||||
|
||||
return binaryDataItem;
|
||||
},
|
||||
|
||||
workflowRunData (): IRunData | null {
|
||||
const workflowExecution = this.workflowsStore.getWorkflowExecution;
|
||||
if (workflowExecution === null) {
|
||||
return null;
|
||||
}
|
||||
const executionData = workflowExecution.data;
|
||||
return executionData? executionData.resultData.runData : null;
|
||||
},
|
||||
|
||||
workflowRunData(): IRunData | null {
|
||||
const workflowExecution = this.workflowsStore.getWorkflowExecution;
|
||||
if (workflowExecution === null) {
|
||||
return null;
|
||||
}
|
||||
const executionData = workflowExecution.data;
|
||||
return executionData ? executionData.resultData.runData : null;
|
||||
},
|
||||
methods: {
|
||||
closeWindow () {
|
||||
// Handle the close externally as the visible parameter is an external prop
|
||||
// and is so not allowed to be changed here.
|
||||
this.$emit('close');
|
||||
return false;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
closeWindow() {
|
||||
// Handle the close externally as the visible parameter is an external prop
|
||||
// and is so not allowed to be changed here.
|
||||
this.$emit('close');
|
||||
return false;
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.binary-data-window {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
@@ -103,7 +102,7 @@ export default mixins(
|
||||
}
|
||||
|
||||
.binary-data-window-wrapper {
|
||||
margin-top: .5em;
|
||||
margin-top: 0.5em;
|
||||
padding: 0 1em;
|
||||
height: calc(100% - 50px);
|
||||
|
||||
@@ -126,7 +125,5 @@ export default mixins(
|
||||
width: calc(100% - 1em);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user