Compare commits

...
Author SHA1 Message Date
Muhsin Keloth 8bc4c93f30 feat: add status in linear search item 2024-05-30 14:23:25 +05:30
4 changed files with 23 additions and 1 deletions
@@ -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(
+4
View File
@@ -54,6 +54,10 @@ module Linear::Queries
title
description
identifier
state {
name
color
}
}
}
}