@@ -538,25 +538,7 @@ export default function ContentPage() {
538538 animate = { { opacity : 1 , y : 0 } }
539539 transition = { { duration : 0.25 } }
540540 >
541- < AnimatePresence >
542- { dragActive ? (
543- < motion . div
544- className = "absolute inset-0 z-40 flex items-center justify-center cursor-copy bg-black/10"
545- onDragOver = { ( e ) => { e . preventDefault ( ) ; e . stopPropagation ( ) ; try { e . dataTransfer . dropEffect = "copy" ; } catch { } } }
546- onDragEnter = { ( e ) => { e . preventDefault ( ) ; e . stopPropagation ( ) ; dragCounter . current ++ ; } }
547- onDragLeave = { ( e ) => { e . preventDefault ( ) ; e . stopPropagation ( ) ; dragCounter . current = Math . max ( 0 , dragCounter . current - 1 ) ; if ( dragCounter . current === 0 ) setDragActive ( false ) ; } }
548- onDrop = { ( e ) => e . preventDefault ( ) }
549- initial = { { opacity : 0 } }
550- animate = { { opacity : 1 } }
551- exit = { { opacity : 0 } }
552- transition = { { duration : 0.2 } }
553- >
554- < div className = "pointer-events-none text-primary-600 text-xl font-semibold drop-shadow-sm" >
555- { t ( "contentpage.drop_hint" , { defaultValue : "拖入 .mcworld/.mcpack/.mcaddon 以导入" } ) }
556- </ div >
557- </ motion . div >
558- ) : null }
559- </ AnimatePresence >
541+
560542 < Modal size = "sm" isOpen = { importing } hideCloseButton isDismissable = { false } >
561543 < ModalContent >
562544 { ( ) => ( < >
@@ -620,8 +602,23 @@ export default function ContentPage() {
620602 initial = { { opacity : 0 , y : 8 } }
621603 animate = { { opacity : 1 , y : 0 } }
622604 transition = { { duration : 0.25 } }
623- className = " rounded-2xl border border-default-200 bg-white/60 dark:bg-neutral-900/60 backdrop-blur-md p-5"
605+ className = { `relative overflow-hidden rounded-2xl border border-default-200 bg-white/60 dark:bg-neutral-900/60 backdrop-blur-md p-5 ${ dragActive ? "border-2 border-dashed border-primary" : "" } ` }
624606 >
607+ < AnimatePresence >
608+ { dragActive ? (
609+ < motion . div
610+ className = "pointer-events-none absolute inset-0 z-40 flex items-center justify-center bg-black/10 rounded-2xl"
611+ initial = { { opacity : 0 } }
612+ animate = { { opacity : 1 } }
613+ exit = { { opacity : 0 } }
614+ transition = { { duration : 0.2 } }
615+ >
616+ < div className = "text-primary-600 text-xl font-semibold" >
617+ { t ( "contentpage.drop_hint" , { defaultValue : "拖入 .mcworld/.mcpack/.mcaddon 以导入" } ) }
618+ </ div >
619+ </ motion . div >
620+ ) : null }
621+ </ AnimatePresence >
625622 < div className = "flex items-center justify-between" >
626623 < h1 className = "text-2xl font-bold" >
627624 { t ( "launcherpage.content_manage" , { defaultValue : "内容管理" } ) }
0 commit comments