mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Ai 675 minor tweaks to tests list (#13467)
This commit is contained in:
parent
c850cca648
commit
5ad950f603
|
@ -15,7 +15,7 @@ const props = defineProps<{
|
||||||
|
|
||||||
const locale = useI18n();
|
const locale = useI18n();
|
||||||
|
|
||||||
type IconDefinition = { icon: string; color: IconColor };
|
type IconDefinition = { icon: string; color: IconColor; spin?: boolean };
|
||||||
|
|
||||||
const statusesColorDictionary: Record<TestRunRecord['status'], IconDefinition> = {
|
const statusesColorDictionary: Record<TestRunRecord['status'], IconDefinition> = {
|
||||||
new: {
|
new: {
|
||||||
|
@ -25,6 +25,7 @@ const statusesColorDictionary: Record<TestRunRecord['status'], IconDefinition> =
|
||||||
running: {
|
running: {
|
||||||
icon: 'spinner',
|
icon: 'spinner',
|
||||||
color: 'secondary',
|
color: 'secondary',
|
||||||
|
spin: true,
|
||||||
},
|
},
|
||||||
completed: {
|
completed: {
|
||||||
icon: 'exclamation-circle',
|
icon: 'exclamation-circle',
|
||||||
|
@ -36,7 +37,7 @@ const statusesColorDictionary: Record<TestRunRecord['status'], IconDefinition> =
|
||||||
},
|
},
|
||||||
cancelled: {
|
cancelled: {
|
||||||
icon: 'minus-circle',
|
icon: 'minus-circle',
|
||||||
color: 'success',
|
color: 'foreground-xdark',
|
||||||
},
|
},
|
||||||
warning: {
|
warning: {
|
||||||
icon: 'exclamation-circle',
|
icon: 'exclamation-circle',
|
||||||
|
@ -76,7 +77,7 @@ const statusRender = computed<IconDefinition & { label: string }>(() => {
|
||||||
<div :class="$style.testCard">
|
<div :class="$style.testCard">
|
||||||
<div :class="$style.testCardContent">
|
<div :class="$style.testCardContent">
|
||||||
<div>
|
<div>
|
||||||
<N8nText bold tag="div">{{ name }}</N8nText>
|
<N8nText bold tag="div" :class="$style.name">{{ name }}</N8nText>
|
||||||
<N8nText tag="div" color="text-base" size="small">
|
<N8nText tag="div" color="text-base" size="small">
|
||||||
{{
|
{{
|
||||||
locale.baseText('testDefinition.list.item.tests', {
|
locale.baseText('testDefinition.list.item.tests', {
|
||||||
|
@ -87,12 +88,10 @@ const statusRender = computed<IconDefinition & { label: string }>(() => {
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div :class="$style.status">
|
<div :class="$style.status">
|
||||||
<N8nIcon :icon="statusRender.icon" size="small" :color="statusRender.color"></N8nIcon>
|
<N8nIcon v-bind="statusRender" size="small" />
|
||||||
<div>
|
<N8nText size="small" color="text-base">
|
||||||
<N8nText size="small" color="text-base">
|
{{ statusRender.label }}
|
||||||
{{ statusRender.label }}
|
</N8nText>
|
||||||
</N8nText>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<N8nText v-if="errors?.length" tag="div" color="text-base" size="small" class="ml-m">
|
<N8nText v-if="errors?.length" tag="div" color="text-base" size="small" class="ml-m">
|
||||||
|
|
|
@ -56,17 +56,11 @@ const listItems = computed(() =>
|
||||||
|
|
||||||
const commands = {
|
const commands = {
|
||||||
delete: onDeleteTest,
|
delete: onDeleteTest,
|
||||||
edit: onEditTest,
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
type Action = { label: string; value: keyof typeof commands; disabled: boolean };
|
type Action = { label: string; value: keyof typeof commands; disabled: boolean };
|
||||||
|
|
||||||
const actions = computed<Action[]>(() => [
|
const actions = computed<Action[]>(() => [
|
||||||
{
|
|
||||||
label: 'Edit test',
|
|
||||||
value: 'edit',
|
|
||||||
disabled: false,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Delete',
|
label: 'Delete',
|
||||||
value: 'delete',
|
value: 'delete',
|
||||||
|
@ -252,7 +246,7 @@ async function onDeleteTest(testId: string) {
|
||||||
.container {
|
.container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: var(--content-container-width);
|
max-width: 1184px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
padding: var(--spacing-xl) var(--spacing-l);
|
padding: var(--spacing-xl) var(--spacing-l);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue