feat: add status in linear search item
This commit is contained in:
@@ -100,6 +100,8 @@ const shouldShowEmptyState = computed(() => {
|
||||
:key="item.id"
|
||||
:is-active="isFilterActive(item.id)"
|
||||
:button-text="item.name"
|
||||
:left-icon="item.leftIcon"
|
||||
:left-icon-color="item.leftIconColor"
|
||||
@click="$emit('click', item)"
|
||||
/>
|
||||
</slot>
|
||||
|
||||
@@ -8,6 +8,14 @@ defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
leftIcon: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
leftIconColor: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
@@ -18,7 +26,13 @@ defineProps({
|
||||
@mouseleave="$emit('mouseleave')"
|
||||
@focus="$emit('focus')"
|
||||
>
|
||||
<div class="inline-flex items-center gap-3 overflow-hidden">
|
||||
<div class="inline-flex items-center gap-2 overflow-hidden">
|
||||
<fluent-icon
|
||||
v-if="leftIcon"
|
||||
icon="status"
|
||||
size="18"
|
||||
:style="{ color: leftIconColor }"
|
||||
/>
|
||||
<span
|
||||
class="text-sm font-medium truncate text-slate-900 dark:text-slate-50"
|
||||
>
|
||||
|
||||
@@ -109,6 +109,8 @@ const onSearch = async value => {
|
||||
issues.value = response.data.map(issue => ({
|
||||
id: issue.id,
|
||||
name: `${issue.identifier} ${issue.title}`,
|
||||
leftIcon: 'status',
|
||||
leftIconColor: issue.state.color,
|
||||
}));
|
||||
} catch (error) {
|
||||
const errorMessage = parseLinearAPIErrorResponse(
|
||||
|
||||
@@ -54,6 +54,10 @@ module Linear::Queries
|
||||
title
|
||||
description
|
||||
identifier
|
||||
state {
|
||||
name
|
||||
color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user