feat: enhance About component with feature display and loading states, and refactor feature handling in share drawers for improved user experience

This commit is contained in:
keven1024
2026-04-05 09:46:56 +08:00
parent 28abd8d1a2
commit 7f74441f5d
7 changed files with 54 additions and 11 deletions

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
import { cx } from 'class-variance-authority'
import showDrawer from '@/lib/showDrawer'
import FileShareHandle from '@/components/Preprocessing/FileShareHandle.vue'
import ImageConvertHandle from '@/components/Preprocessing/ImageConvertHandle.vue'
@@ -84,7 +83,7 @@ const actions = computed(() =>
}
"
>
<div :class="cx('size-14 flex justify-center items-center rounded-full mx-3', item?.className)">
<div class="size-14 flex justify-center items-center rounded-full mx-3" :style="item?.style">
<component :is="item?.icon" />
</div>
<div class="text-xs truncate w-full text-center">{{ item?.label }}</div>

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
import { cx } from 'class-variance-authority'
import showDrawer from '@/lib/showDrawer'
import TextShareHandle from '@/components/Preprocessing/TextShareHandle.vue'
import { useFeatureMeta, type FeatureKey } from '@/composables/useFeatureMeta'
@@ -38,7 +37,8 @@ const actionHandlers: Partial<Record<FeatureKey, ActionHandler>> = {
const actions = computed(() =>
featureMeta.value
.filter((meta) => {
const handler = actionHandlers?.[meta.key]
const { key } = meta || {}
const handler = actionHandlers?.[key]
return handler && (!handler.condition || handler.condition())
})
.map((meta) => ({ ...meta, onClick: actionHandlers[meta.key]!.onClick }))
@@ -58,7 +58,7 @@ const actions = computed(() =>
}
"
>
<div :class="cx('size-14 flex justify-center items-center rounded-full mx-3', item?.className)">
<div class="size-14 flex justify-center items-center rounded-full mx-3" :style="item?.style">
<component :is="item?.icon" />
</div>
<div class="text-xs truncate w-full text-center">{{ item?.label }}</div>