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();
|
||||
|
||||
type IconDefinition = { icon: string; color: IconColor };
|
||||
type IconDefinition = { icon: string; color: IconColor; spin?: boolean };
|
||||
|
||||
const statusesColorDictionary: Record<TestRunRecord['status'], IconDefinition> = {
|
||||
new: {
|
||||
|
@ -25,6 +25,7 @@ const statusesColorDictionary: Record<TestRunRecord['status'], IconDefinition> =
|
|||
running: {
|
||||
icon: 'spinner',
|
||||
color: 'secondary',
|
||||
spin: true,
|
||||
},
|
||||
completed: {
|
||||
icon: 'exclamation-circle',
|
||||
|
@ -36,7 +37,7 @@ const statusesColorDictionary: Record<TestRunRecord['status'], IconDefinition> =
|
|||
},
|
||||
cancelled: {
|
||||
icon: 'minus-circle',
|
||||
color: 'success',
|
||||
color: 'foreground-xdark',
|
||||
},
|
||||
warning: {
|
||||
icon: 'exclamation-circle',
|
||||
|
@ -76,7 +77,7 @@ const statusRender = computed<IconDefinition & { label: string }>(() => {
|
|||
<div :class="$style.testCard">
|
||||
<div :class="$style.testCardContent">
|
||||
<div>
|
||||
<N8nText bold tag="div">{{ name }}</N8nText>
|
||||
<N8nText bold tag="div" :class="$style.name">{{ name }}</N8nText>
|
||||
<N8nText tag="div" color="text-base" size="small">
|
||||
{{
|
||||
locale.baseText('testDefinition.list.item.tests', {
|
||||
|
@ -87,12 +88,10 @@ const statusRender = computed<IconDefinition & { label: string }>(() => {
|
|||
</div>
|
||||
<div>
|
||||
<div :class="$style.status">
|
||||
<N8nIcon :icon="statusRender.icon" size="small" :color="statusRender.color"></N8nIcon>
|
||||
<div>
|
||||
<N8nText size="small" color="text-base">
|
||||
{{ statusRender.label }}
|
||||
</N8nText>
|
||||
</div>
|
||||
<N8nIcon v-bind="statusRender" size="small" />
|
||||
<N8nText size="small" color="text-base">
|
||||
{{ statusRender.label }}
|
||||
</N8nText>
|
||||
</div>
|
||||
|
||||
<N8nText v-if="errors?.length" tag="div" color="text-base" size="small" class="ml-m">
|
||||
|
|
|
@ -56,17 +56,11 @@ const listItems = computed(() =>
|
|||
|
||||
const commands = {
|
||||
delete: onDeleteTest,
|
||||
edit: onEditTest,
|
||||
} as const;
|
||||
|
||||
type Action = { label: string; value: keyof typeof commands; disabled: boolean };
|
||||
|
||||
const actions = computed<Action[]>(() => [
|
||||
{
|
||||
label: 'Edit test',
|
||||
value: 'edit',
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
value: 'delete',
|
||||
|
@ -252,7 +246,7 @@ async function onDeleteTest(testId: string) {
|
|||
.container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
max-width: var(--content-container-width);
|
||||
max-width: 1184px;
|
||||
margin: auto;
|
||||
padding: var(--spacing-xl) var(--spacing-l);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue