mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(editor): Implement simple view for templates experiment (no-changelog) (#6637)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
parent
d6b2ae0255
commit
180ab8d7c2
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
<div v-else>
|
||||
<n8n-heading :bold="true" size="small">{{ workflow.name }}</n8n-heading>
|
||||
<div :class="$style.content">
|
||||
<div :class="$style.content" v-if="!simpleView">
|
||||
<span v-if="workflow.totalViews">
|
||||
<n8n-text size="small" color="text-light">
|
||||
<font-awesome-icon icon="eye" />
|
||||
|
@ -72,6 +72,10 @@ export default defineComponent({
|
|||
loading: {
|
||||
type: Boolean,
|
||||
},
|
||||
simpleView: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
TimeAgo,
|
||||
|
@ -122,6 +126,7 @@ export default defineComponent({
|
|||
background-color: var(--color-background-xlight);
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 var(--spacing-s) var(--spacing-s) var(--spacing-s);
|
||||
background-color: var(--color-background-xlight);
|
||||
cursor: pointer;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div :class="$style.list" v-if="loading || workflows.length">
|
||||
<div :class="$style.header" v-if="!hideHeader">
|
||||
<div :class="$style.header" v-if="!simpleView">
|
||||
<n8n-heading :bold="true" size="medium" color="text-light">
|
||||
{{ $locale.baseText('templates.workflows') }}
|
||||
<span v-if="!loading && totalWorkflows" v-text="`(${totalWorkflows})`" />
|
||||
|
@ -12,6 +12,7 @@
|
|||
:key="workflow.id"
|
||||
:workflow="workflow"
|
||||
:firstItem="index === 0"
|
||||
:simple-view="simpleView"
|
||||
:lastItem="index === workflows.length - 1 && !loading"
|
||||
:useWorkflowButton="useWorkflowButton"
|
||||
@click="(e) => onCardClick(e, workflow.id)"
|
||||
|
@ -57,7 +58,7 @@ export default defineComponent({
|
|||
totalWorkflows: {
|
||||
type: Number,
|
||||
},
|
||||
hideHeader: {
|
||||
simpleView: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
:loading="loadingWorkflows"
|
||||
:total-workflows="totalWorkflows"
|
||||
:workflows="isFixedListExperiment ? fixedTemplatesList : workflows"
|
||||
:hide-header="isFixedListExperiment"
|
||||
:simple-view="isFixedListExperiment"
|
||||
@loadMore="onLoadMore"
|
||||
@openTemplate="onOpenTemplate"
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue