mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
feat(front): add image conversion option to FileShareDrawer and improve layout in ImageCompressResult
This commit is contained in:
@@ -15,6 +15,7 @@ import { cx } from 'class-variance-authority'
|
||||
import { isObject } from 'lodash-es'
|
||||
import showDrawer from '@/lib/showDrawer'
|
||||
import FileShareHandle from '@/components/Preprocessing/FileShareHandle.vue'
|
||||
import ImageConvertHandle from '@/components/Preprocessing/ImageConvertHandle.vue'
|
||||
import type { FileShareHandleProps } from '../Preprocessing/types'
|
||||
const { t } = useI18n()
|
||||
const props = defineProps<{
|
||||
@@ -52,6 +53,16 @@ const actions = [
|
||||
props.onFileHandle({ type: 'file-image-compress', config: {} })
|
||||
},
|
||||
},
|
||||
isImage.value && {
|
||||
label: t('page.upload.file.handleType.file-image-convert'),
|
||||
icon: LucideArrowRightLeft,
|
||||
className: 'bg-purple-300',
|
||||
onClick: () => {
|
||||
showDrawer({
|
||||
render: ({ hide }) => h(ImageConvertHandle, { ...props, hide }),
|
||||
})
|
||||
},
|
||||
},
|
||||
// isImage.value && {
|
||||
// label: '图片翻译', icon: LucideLanguages, className: 'bg-orange-300', onClick: () => {
|
||||
// console.log('复制链接')
|
||||
|
||||
@@ -158,7 +158,7 @@ watch(
|
||||
<div class="text-sm text-red-500 px-2 py-1 rounded-md bg-red-100">{{ t('page.result.imageCompress.failed') }}</div>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 items-center" v-if="taskResults?.[index]?.data?.status === 'success'">
|
||||
<div class="flex flex-col gap-1 items-center">
|
||||
<div class="flex flex-col gap-1 items-center shrink-0">
|
||||
<div class="rounded flex flex-row items-center bg-green-100 text-green-600 px-1 text-xs">
|
||||
<LucideArrowDown class="size-4" />
|
||||
{{
|
||||
|
||||
Reference in New Issue
Block a user