Revert "fix: fix duplicate app lose custom image" (#19995)

This commit is contained in:
crazywoola 2025-05-20 18:42:59 +08:00 • committed by GitHub
commit d35d854259
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 19 deletions

View file

@ -111,16 +111,14 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => {
}
}, [app.id, mutateApps, notify, onRefresh, t])
const onCopy: DuplicateAppModalProps['onConfirm'] = async ({ name, icon_type, icon, icon_background, icon_url }) => {
const onCopy: DuplicateAppModalProps['onConfirm'] = async ({ name, icon_type, icon, icon_background }) => {
try {
console.log('icon_url', icon_url)
const newApp = await copyApp({
appID: app.id,
name,
icon_type,
icon,
icon_background,
icon_url,
mode: app.mode,
})
setShowDuplicateModal(false)

View file

@ -24,7 +24,6 @@ export type DuplicateAppModalProps = {
onConfirm: (info: {
name: string
icon_type: AppIconType
icon_url?: string | null
icon: string
icon_background?: string | null
}) => Promise<void>
@ -64,7 +63,6 @@ const DuplicateAppModal = ({
name,
icon_type: appIcon.type,
icon: appIcon.type === 'emoji' ? appIcon.icon : appIcon.fileId,
icon_url: appIcon.type === 'image' ? appIcon.url : undefined,
icon_background: appIcon.type === 'emoji' ? appIcon.background : undefined,
})
onHide()