mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
refactor(editor): Standardize components sections order (no-changelog) (#10540)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user