refactor(editor): Standardize components sections order (no-changelog) (#10540)

This commit is contained in:
Ricardo Espinoza
2024-08-24 09:24:08 -04:00
committed by GitHub
parent 4d48f903af
commit 609bc4d97d
215 changed files with 10387 additions and 10376 deletions

View File

@@ -1,54 +1,3 @@
<template>
<div
:class="[
$style.card,
lastItem && $style.last,
firstItem && $style.first,
!loading && $style.loaded,
]"
data-test-id="template-card"
@click="onCardClick"
>
<div v-if="loading" :class="$style.loading">
<n8n-loading :rows="2" :shrink-last="false" :loading="loading" />
</div>
<div v-else-if="workflow">
<n8n-heading :bold="true" size="small">{{ workflow.name }}</n8n-heading>
<div v-if="!simpleView" :class="$style.content">
<span v-if="workflow.totalViews">
<n8n-text size="small" color="text-light">
<font-awesome-icon icon="eye" />
{{ abbreviateNumber(workflow.totalViews) }}
</n8n-text>
</span>
<div v-if="workflow.totalViews" :class="$style.line" v-text="'|'" />
<n8n-text size="small" color="text-light">
<TimeAgo :date="workflow.createdAt" />
</n8n-text>
<div v-if="workflow.user" :class="$style.line" v-text="'|'" />
<n8n-text v-if="workflow.user" size="small" color="text-light"
>By {{ workflow.user.username }}</n8n-text
>
</div>
</div>
<div
v-if="!loading && workflow"
:class="[$style.nodesContainer, useWorkflowButton && $style.hideOnHover]"
>
<NodeList v-if="workflow.nodes" :nodes="workflow.nodes" :limit="nodesToBeShown" size="md" />
</div>
<div v-if="useWorkflowButton" :class="$style.buttonContainer">
<n8n-button
v-if="useWorkflowButton"
outline
label="Use workflow"
data-test-id="use-workflow-button"
@click.stop="onUseWorkflowClick"
/>
</div>
</div>
</template>
<script lang="ts">
import { type PropType, defineComponent } from 'vue';
import { filterTemplateNodes } from '@/utils/nodeTypesUtils';
@@ -111,6 +60,57 @@ export default defineComponent({
});
</script>
<template>
<div
:class="[
$style.card,
lastItem && $style.last,
firstItem && $style.first,
!loading && $style.loaded,
]"
data-test-id="template-card"
@click="onCardClick"
>
<div v-if="loading" :class="$style.loading">
<n8n-loading :rows="2" :shrink-last="false" :loading="loading" />
</div>
<div v-else-if="workflow">
<n8n-heading :bold="true" size="small">{{ workflow.name }}</n8n-heading>
<div v-if="!simpleView" :class="$style.content">
<span v-if="workflow.totalViews">
<n8n-text size="small" color="text-light">
<font-awesome-icon icon="eye" />
{{ abbreviateNumber(workflow.totalViews) }}
</n8n-text>
</span>
<div v-if="workflow.totalViews" :class="$style.line" v-text="'|'" />
<n8n-text size="small" color="text-light">
<TimeAgo :date="workflow.createdAt" />
</n8n-text>
<div v-if="workflow.user" :class="$style.line" v-text="'|'" />
<n8n-text v-if="workflow.user" size="small" color="text-light"
>By {{ workflow.user.username }}</n8n-text
>
</div>
</div>
<div
v-if="!loading && workflow"
:class="[$style.nodesContainer, useWorkflowButton && $style.hideOnHover]"
>
<NodeList v-if="workflow.nodes" :nodes="workflow.nodes" :limit="nodesToBeShown" size="md" />
</div>
<div v-if="useWorkflowButton" :class="$style.buttonContainer">
<n8n-button
v-if="useWorkflowButton"
outline
label="Use workflow"
data-test-id="use-workflow-button"
@click.stop="onUseWorkflowClick"
/>
</div>
</div>
</template>
<style lang="scss" module>
.nodes {
display: flex;