@@ -4,7 +4,8 @@ import type { PropType } from 'vue'
44import { computed } from ' vue'
55import { Image } from ' @unpic/vue'
66import { titleCase } from ' scule'
7- import { COLOR_STATUS_MAP } from ' ../../../utils/draft'
7+ import { COLOR_UI_STATUS_MAP } from ' ../../../utils/draft'
8+ import { DraftStatus } from ' ../../../types/draft'
89
910const props = defineProps ({
1011 item: {
@@ -36,20 +37,21 @@ const imageSrc = computed(() => {
3637 return ' https://placehold.co/1920x1080/f9fafc/f9fafc'
3738})
3839
39- const statusRingColor = computed (() => props .item .status ? ` ring-${COLOR_STATUS_MAP [props .item .status ]}-200 hover:ring-${COLOR_STATUS_MAP [props .item .status ]}-300 hover:dark:ring-${COLOR_STATUS_MAP [props .item .status ]}-700 ` : ' ring-gray-200 hover:ring-gray-300 hover:dark:ring-gray-700' )
40+ // ring-(--ui-success) ring-(--ui-info) ring-(--ui-warning) ring-(--ui-error) ring-(--ui-neutral)
41+ const statusRingColor = computed (() => props .item .status ? ` ring-(--ui-${COLOR_UI_STATUS_MAP [props .item .status ]}) ` : ' ring-(--ui-border) hover:ring-(--ui-border-accented)' )
4042 </script >
4143
4244<template >
4345 <UPageCard
4446 reverse
45- class =" cursor-pointer hover:bg-white relative w-full min-w-0 overflow-hidden"
47+ class =" cursor-pointer hover:bg-muted relative w-full min-w-0 overflow-hidden"
4648 :class =" statusRingColor"
4749 >
4850 <div
4951 v-if =" item.type === 'file'"
5052 class =" relative"
5153 >
52- <div class =" bg-[#f7f9fa] bg-[linear-gradient(45deg,#e6e9ea_25%,transparent_0),linear-gradient(-45deg,#e6e9ea_25%,transparent_0),linear-gradient(45deg,transparent_75%,#e6e9ea_0),linear-gradient(-45deg,transparent_75%,#e6e9ea_0)] bg-size-[24px_24px] bg-position-[0_0,0_12px,12px_-12px,-12px_0]" >
54+ <div class =" bg-default bg-[linear-gradient(45deg,#e6e9ea_25%,transparent_0),linear-gradient(-45deg,#e6e9ea_25%,transparent_0),linear-gradient(45deg,transparent_75%,#e6e9ea_0),linear-gradient(-45deg,transparent_75%,#e6e9ea_0)] bg-size-[24px_24px] bg-position-[0_0,0_12px,12px_-12px,-12px_0]" >
5355 <Image
5456 :src =" imageSrc"
5557 width =" 426"
@@ -63,12 +65,12 @@ const statusRingColor = computed(() => props.item.status ? `ring-${COLOR_STATUS_
6365 >
6466 <UIcon
6567 :name =" itemExtensionIcon"
66- class =" w-8 h-8 text-gray-400 dark:text-gray-500 "
68+ class =" w-8 h-8 text-muted "
6769 />
6870 </div >
6971 </div >
7072 <ItemBadge
71- v-if =" item.status"
73+ v-if =" item.status && item.status !== DraftStatus.Opened "
7274 :status =" item.status"
7375 class =" absolute top-2 right-2"
7476 />
@@ -81,15 +83,15 @@ const statusRingColor = computed(() => props.item.status ? `ring-${COLOR_STATUS_
8183 <UIcon
8284 v-if =" isFolder"
8385 name =" i-lucide-folder"
84- class =" h-4 w-4 shrink-0"
86+ class =" h-4 w-4 shrink-0 text-muted "
8587 />
8688 <UIcon
8789 v-else-if =" name === 'Home'"
8890 name =" i-lucide-house"
89- class =" h-4 w-4 shrink-0"
91+ class =" h-4 w-4 shrink-0 text-muted "
9092 />
9193 <h3
92- class =" text-sm font-semibold truncate"
94+ class =" text-sm font-semibold truncate text-default "
9395 :class =" props.item.status === 'deleted' && 'line-through'"
9496 >
9597 {{ name }}
@@ -99,7 +101,7 @@ const statusRingColor = computed(() => props.item.status ? `ring-${COLOR_STATUS_
99101 </div >
100102
101103 <UTooltip :text =" item.routePath" >
102- <span class =" truncate leading-relaxed text-xs text-gray-400 dark:text-gray-500 block w-full" >
104+ <span class =" truncate leading-relaxed text-xs text-dimmed block w-full" >
103105 {{ item.routePath || item.fsPath }}
104106 </span >
105107 </UTooltip >
0 commit comments