mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +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:
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<div v-if="executionUIDetails && executionUIDetails.name === 'running'" :class="$style.runningInfo">
|
||||
<div
|
||||
v-if="executionUIDetails && executionUIDetails.name === 'running'"
|
||||
:class="$style.runningInfo"
|
||||
>
|
||||
<div :class="$style.spinner">
|
||||
<n8n-spinner type="ring" />
|
||||
</div>
|
||||
@@ -11,32 +14,66 @@
|
||||
</n8n-button>
|
||||
</div>
|
||||
<div v-else :class="$style.previewContainer">
|
||||
<div :class="{[$style.executionDetails]: true, [$style.sidebarCollapsed]: sidebarCollapsed }" v-if="activeExecution">
|
||||
<div
|
||||
:class="{ [$style.executionDetails]: true, [$style.sidebarCollapsed]: sidebarCollapsed }"
|
||||
v-if="activeExecution"
|
||||
>
|
||||
<div>
|
||||
<n8n-text size="large" color="text-base" :bold="true">{{ executionUIDetails.startTime }}</n8n-text><br>
|
||||
<n8n-spinner v-if="executionUIDetails.name === 'running'" size="small" :class="[$style.spinner, 'mr-4xs']"/>
|
||||
<n8n-text size="medium" :class="[$style.status, $style[executionUIDetails.name]]">{{ executionUIDetails.label }}</n8n-text>
|
||||
<n8n-text size="large" color="text-base" :bold="true">{{
|
||||
executionUIDetails.startTime
|
||||
}}</n8n-text
|
||||
><br />
|
||||
<n8n-spinner
|
||||
v-if="executionUIDetails.name === 'running'"
|
||||
size="small"
|
||||
:class="[$style.spinner, 'mr-4xs']"
|
||||
/>
|
||||
<n8n-text size="medium" :class="[$style.status, $style[executionUIDetails.name]]">{{
|
||||
executionUIDetails.label
|
||||
}}</n8n-text>
|
||||
<n8n-text v-if="executionUIDetails.name === 'running'" color="text-base" size="medium">
|
||||
{{ $locale.baseText('executionDetails.runningTimeRunning', { interpolate: { time: executionUIDetails.runningTime } }) }} | ID#{{ activeExecution.id }}
|
||||
{{
|
||||
$locale.baseText('executionDetails.runningTimeRunning', {
|
||||
interpolate: { time: executionUIDetails.runningTime },
|
||||
})
|
||||
}}
|
||||
| ID#{{ activeExecution.id }}
|
||||
</n8n-text>
|
||||
<n8n-text v-else-if="executionUIDetails.name !== 'waiting'" color="text-base" size="medium">
|
||||
{{ $locale.baseText('executionDetails.runningTimeFinished', { interpolate: { time: executionUIDetails.runningTime } }) }} | ID#{{ activeExecution.id }}
|
||||
{{
|
||||
$locale.baseText('executionDetails.runningTimeFinished', {
|
||||
interpolate: { time: executionUIDetails.runningTime },
|
||||
})
|
||||
}}
|
||||
| ID#{{ activeExecution.id }}
|
||||
</n8n-text>
|
||||
<n8n-text v-else-if="executionUIDetails.name === 'waiting'" color="text-base" size="medium">
|
||||
| ID#{{ activeExecution.id }}
|
||||
</n8n-text>
|
||||
<br><n8n-text v-if="activeExecution.mode === 'retry'" color="text-base" size= "medium">
|
||||
<br /><n8n-text v-if="activeExecution.mode === 'retry'" color="text-base" size="medium">
|
||||
{{ $locale.baseText('executionDetails.retry') }}
|
||||
<router-link
|
||||
:class="$style.executionLink"
|
||||
:to="{ name: VIEWS.EXECUTION_PREVIEW, params: { workflowId: activeExecution.workflowId, executionId: activeExecution.retryOf }}"
|
||||
:to="{
|
||||
name: VIEWS.EXECUTION_PREVIEW,
|
||||
params: {
|
||||
workflowId: activeExecution.workflowId,
|
||||
executionId: activeExecution.retryOf,
|
||||
},
|
||||
}"
|
||||
>
|
||||
#{{ activeExecution.retryOf }}
|
||||
</router-link>
|
||||
</n8n-text>
|
||||
</div>
|
||||
<div>
|
||||
<el-dropdown v-if="executionUIDetails.name === 'error'" trigger="click" class="mr-xs" @command="handleRetryClick" ref="retryDropdown">
|
||||
<el-dropdown
|
||||
v-if="executionUIDetails.name === 'error'"
|
||||
trigger="click"
|
||||
class="mr-xs"
|
||||
@command="handleRetryClick"
|
||||
ref="retryDropdown"
|
||||
>
|
||||
<span class="retry-button">
|
||||
<n8n-icon-button
|
||||
size="large"
|
||||
@@ -57,10 +94,21 @@
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<n8n-icon-button :title="$locale.baseText('executionDetails.deleteExecution')" icon="trash" size="large" type="tertiary" @click="onDeleteExecution" />
|
||||
<n8n-icon-button
|
||||
:title="$locale.baseText('executionDetails.deleteExecution')"
|
||||
icon="trash"
|
||||
size="large"
|
||||
type="tertiary"
|
||||
@click="onDeleteExecution"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<workflow-preview mode="execution" loaderType="spinner" :executionId="executionId" :executionMode="executionMode"/>
|
||||
<workflow-preview
|
||||
mode="execution"
|
||||
loaderType="spinner"
|
||||
:executionId="executionId"
|
||||
:executionMode="executionMode"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -87,9 +135,7 @@ export default mixins(restApi, showMessage, executionHelpers).extend({
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(
|
||||
useUIStore,
|
||||
),
|
||||
...mapStores(useUIStore),
|
||||
executionUIDetails(): IExecutionUIData | null {
|
||||
return this.activeExecution ? this.getExecutionUIDetails(this.activeExecution) : null;
|
||||
},
|
||||
@@ -122,7 +168,7 @@ export default mixins(restApi, showMessage, executionHelpers).extend({
|
||||
},
|
||||
onRetryButtonBlur(event: FocusEvent): void {
|
||||
// Hide dropdown when clicking outside of current document
|
||||
const retryDropdown = this.$refs.retryDropdown as Vue & { hide: () => void } | undefined;
|
||||
const retryDropdown = this.$refs.retryDropdown as (Vue & { hide: () => void }) | undefined;
|
||||
if (retryDropdown && event.relatedTarget === null) {
|
||||
retryDropdown.hide();
|
||||
}
|
||||
@@ -132,7 +178,6 @@ export default mixins(restApi, showMessage, executionHelpers).extend({
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
|
||||
.previewContainer {
|
||||
height: calc(100% - $header-height);
|
||||
overflow: hidden;
|
||||
@@ -148,7 +193,9 @@ export default mixins(restApi, showMessage, executionHelpers).extend({
|
||||
transition: all 150ms ease-in-out;
|
||||
pointer-events: none;
|
||||
|
||||
& * { pointer-events: all; }
|
||||
& * {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
&.sidebarCollapsed {
|
||||
width: calc(100% - 375px);
|
||||
@@ -163,10 +210,19 @@ export default mixins(restApi, showMessage, executionHelpers).extend({
|
||||
}
|
||||
}
|
||||
|
||||
.running, .spinner { color: var(--color-warning); }
|
||||
.waiting { color: var(--color-secondary); }
|
||||
.success { color: var(--color-success); }
|
||||
.error { color: var(--color-danger); }
|
||||
.running,
|
||||
.spinner {
|
||||
color: var(--color-warning);
|
||||
}
|
||||
.waiting {
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
.success {
|
||||
color: var(--color-success);
|
||||
}
|
||||
.error {
|
||||
color: var(--color-danger);
|
||||
}
|
||||
|
||||
.runningInfo {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user