From fb6710e341e65727ea6b82f348c8fe49830e2f61 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 15 Dec 2025 14:54:12 +0800 Subject: [PATCH] feat: display `hidden` iconset (#384) --- scripts/prepare.ts | 7 ++++-- src/components/CollectionEntry.vue | 10 ++++++-- src/components/Drawer.vue | 1 + src/components/IconSet.vue | 40 ++++++++++++++++-------------- src/data/index.ts | 5 ++++ src/pages/index.vue | 15 ++++++----- src/store/localstorage.ts | 1 + unocss.config.ts | 2 +- 8 files changed, 52 insertions(+), 29 deletions(-) diff --git a/scripts/prepare.ts b/scripts/prepare.ts index 8be0665..0f587ad 100644 --- a/scripts/prepare.ts +++ b/scripts/prepare.ts @@ -27,8 +27,11 @@ async function prepareJSON() { const collections = Object .entries(raw) - .map(([id, v]) => ({ ...(v as any), id })) - .filter(v => v.hidden !== true) + .map(([id, v]) => ({ + ...(v as any), + id, + category: (v as any).hidden ? 'Deprecated / Unavailable' : (v as any).category, + })) const collectionsMeta = [] diff --git a/src/components/CollectionEntry.vue b/src/components/CollectionEntry.vue index 2ff6c72..fb51d36 100644 --- a/src/components/CollectionEntry.vue +++ b/src/components/CollectionEntry.vue @@ -13,14 +13,18 @@ defineProps<{ :key="collection.id" p3 relative border="~ base" + :class="{ 'border-dashed': collection.hidden }" class="grid grid-cols-[1fr_90px] gap2 items-center color-base transition-all translate-z-0 group" hover="text-primary !border-primary shadow" :to="`/collection/${collection.id}`" >
-
+
{{ collection.name }} - + +
+
+
{{ collection.author?.name }} @@ -46,6 +50,7 @@ defineProps<{