mirror of
https://github.com/keven1024/015.git
synced 2026-06-08 13:24:33 +00:00
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:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user