fix: hide home shell while opening agent workspace
This commit is contained in:
parent
dfd55a136a
commit
4f1e0bc60a
@ -467,6 +467,9 @@ export function LovartHome({
|
||||
const [deletingProjectId, setDeletingProjectId] = useState<string | null>(null);
|
||||
const [typedPreviewText, setTypedPreviewText] = useState("");
|
||||
const [previewCursorVisible, setPreviewCursorVisible] = useState(true);
|
||||
const [routeTransitionLabel, setRouteTransitionLabel] = useState<string | null>(
|
||||
null
|
||||
);
|
||||
const [isSecondaryDataReady, setIsSecondaryDataReady] = useState(false);
|
||||
const [isFeaturedDataReady, setIsFeaturedDataReady] = useState(false);
|
||||
const projectSectionRef = useRef<HTMLDivElement | null>(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 (
|
||||
<div className="min-h-svh bg-[#f4f4f4] text-[#171717] dark:bg-[#0a0a0c] dark:text-zinc-100 [&_button]:cursor-pointer [&_input]:cursor-pointer [&_textarea]:cursor-pointer [&_img]:cursor-pointer [&_a]:cursor-pointer [&_[role=button]]:cursor-pointer">
|
||||
{routeTransitionLabel ? (
|
||||
<div className="fixed inset-0 z-[120] flex items-center justify-center bg-[#050607] text-white/70">
|
||||
<div className="flex flex-col items-center gap-4 rounded-[32px] border border-white/10 bg-white/[0.04] px-8 py-7 shadow-[0_24px_90px_rgba(0,0,0,0.42)] backdrop-blur-xl">
|
||||
<Loader2 className="h-5 w-5 animate-spin text-emerald-300" />
|
||||
<div className="text-sm tracking-[0.08em]">
|
||||
{routeTransitionLabel}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
<BrandTopBar
|
||||
logo={displayLogo}
|
||||
onLogoClick={() => 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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user