Skip to content

Commit a2aa6e5

Browse files
committed
feat: add MutationCache base
1 parent 37a2651 commit a2aa6e5

File tree

5 files changed

+373
-178
lines changed

5 files changed

+373
-178
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<script setup lang="ts">
2+
import type { Mutation } from '@tanstack/vue-query'
3+
4+
defineProps<{
5+
item: Mutation
6+
}>()
7+
8+
defineEmits(['click'])
9+
</script>
10+
11+
<template>
12+
<div
13+
class="flex flex-col p-2 overflow-hidden hover-bg-active cursor-pointer border-b border-gray-100 dark:border-gray-800"
14+
@click="$emit('click')"
15+
>
16+
<div class="flex items-center gap-2">
17+
<span
18+
class="rounded whitespace-nowrap select-none mx-0.5 px-1.5 py-0.5"
19+
:style="{
20+
'background-color': `${getMutationBackgroundColor(item)}`,
21+
}"
22+
>
23+
{{ getMutationStatusLabel(item) }}
24+
</span>
25+
<div class="truncate font-mono text-sm opacity-75">
26+
{{ item.options.mutationKey || 'Anonymous' }}
27+
</div>
28+
</div>
29+
</div>
30+
</template>

client/app/components/QueryListItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defineProps<{
2020
'height': '1em',
2121
'border-radius': '10%',
2222
'align-self': 'center',
23-
'background-color': getBackgroundColor(item),
23+
'background-color': getQueryBackgroundColor(item),
2424
}"
2525
/>
2626
<div

0 commit comments

Comments
 (0)