diff --git a/components/home/lovart-home.tsx b/components/home/lovart-home.tsx index 60671a2e7..beeb7f2ad 100644 --- a/components/home/lovart-home.tsx +++ b/components/home/lovart-home.tsx @@ -467,6 +467,9 @@ export function LovartHome({ const [deletingProjectId, setDeletingProjectId] = useState(null); const [typedPreviewText, setTypedPreviewText] = useState(""); const [previewCursorVisible, setPreviewCursorVisible] = useState(true); + const [routeTransitionLabel, setRouteTransitionLabel] = useState( + null + ); const [isSecondaryDataReady, setIsSecondaryDataReady] = useState(false); const [isFeaturedDataReady, setIsFeaturedDataReady] = useState(false); const projectSectionRef = useRef(null); @@ -1416,6 +1419,11 @@ export function LovartHome({ } if (value.startsWith("/")) { + setRouteTransitionLabel( + value.startsWith("/canvas?mode=agent") + ? "正在进入风格化工作台..." + : "正在打开页面..." + ); router.push(value); return; } @@ -1495,6 +1503,16 @@ export function LovartHome({ return (
+ {routeTransitionLabel ? ( +
+
+ +
+ {routeTransitionLabel} +
+
+
+ ) : null} window.scrollTo({ top: 0, behavior: "smooth" })} @@ -1763,7 +1781,7 @@ export function LovartHome({ onNavLink={openNavLink} onNewCanvas={openNewCanvas} onProfile={() => toast.info("个人主页模块后续开放")} - onRoute={(url) => router.push(url)} + onRoute={openNavLink} onTutorial={handleOpenTutorial} productPlanningEnabled={siteSettingsData?.productPlanningEnabled !== false} renderIcon={renderLovartSidebarIcon}