fix: remove bing redirect, fix modal centering across all pages

- DemoDisclaimerModal: remove bing redirect on "稍后再说", just close
- App.tsx: remove will-change:transform from AnimatedRoute which created
  a new containing block and broke fixed positioning for all modals
- OnboardingGuide: add Portal as extra safety for centering

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chever John 2026-06-30 03:11:25 +08:00
parent 124d0e8ff7
commit ee8fc85516
No known key found for this signature in database
GPG Key ID: 2894D52ED1211DF0
3 changed files with 4 additions and 5 deletions

View File

@ -73,7 +73,6 @@ function AnimatedRoute({ children, pageName }: { children: React.ReactNode; page
initial="initial"
animate="animate"
exit="exit"
style={{ willChange: 'transform, opacity' }}
>
<PageErrorBoundary pageName={pageName}>
{children}

View File

@ -70,8 +70,6 @@ export function DemoDisclaimerModal() {
setTimeout(() => {
setIsOpen(false);
setIsClosing(false);
// 跳转到必应
window.location.href = 'https://www.bing.com';
}, 300);
};

View File

@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react';
import { createPortal } from 'react-dom';
import { motion, AnimatePresence } from 'framer-motion';
import { X, ChevronRight, ChevronLeft, CheckCircle, Factory, ClipboardList, Share2, Package } from 'lucide-react';
import { useNavigate } from 'react-router-dom';
@ -136,7 +137,7 @@ export function OnboardingGuide({ role, isOpen, onClose }: OnboardingGuideProps)
// 如果已完成引导或不显示返回null
if (!isOpen || isCompleted) return null;
return (
return createPortal(
<div className="fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-4">
<motion.div
initial={{ opacity: 0, scale: 0.95, y: 20 }}
@ -244,7 +245,8 @@ export function OnboardingGuide({ role, isOpen, onClose }: OnboardingGuideProps)
</div>
</div>
</motion.div>
</div>
</div>,
document.body
);
}