恢复移动端原有提示与门禁

恢复移动端首次进入欢迎遮罩与单次关闭状态
恢复删除前的桌面端创作主页提示与旧 IP 资源
保留移动端仅“我的”页签及项目画布硬门禁
补充现役依赖、静态资源与回归测试门禁
同步平台入口权威文档
This commit is contained in:
2026-08-08 15:46:22 +08:00
parent b63923eb04
commit 1fb72ba26c
10 changed files with 344 additions and 38 deletions
@@ -29,6 +29,10 @@ import { useAuthUi } from '../auth/AuthUiContext';
import { FLOATING_FEEDBACK_FORM_URL } from '../common/floatingFeedbackEntryModel';
import { PlatformActionButton } from '../common/PlatformActionButton';
import { PlatformSubpanel } from '../common/PlatformSubpanel';
import {
PlatformActiveMobileWelcomeDialog,
shouldOpenActiveMobileWelcomeDialog,
} from './PlatformActiveMobileWelcomeDialog';
import {
resolveActivePublicUserCode,
resolveActiveUserAvatarLabel,
@@ -136,6 +140,30 @@ function ActiveBottomNavButton({
);
}
function MobileProfileDock({
active,
onOpenProfile,
}: {
active: boolean;
onOpenProfile: () => void;
}) {
return (
<div className="platform-mobile-bottom-dock min-w-0 shrink-0 lg:hidden">
<nav
className="platform-bottom-nav grid grid-cols-1"
aria-label="移动平台导航"
>
<ActiveBottomNavButton
active={active}
icon={UserRound}
label="我的"
onClick={onOpenProfile}
/>
</nav>
</div>
);
}
function ActivePlatformBrand() {
return (
<span
@@ -190,7 +218,7 @@ function MobileCreationDesktopGuide({
<Monitor aria-hidden="true" className="h-7 w-7" />
</span>
<h1 className="mt-4 text-xl font-black leading-tight text-[var(--platform-text-strong)]">
请在桌面端打开创作工具
请在桌面端打开创作主页
</h1>
<p className="mt-3 text-sm font-semibold leading-6 text-[var(--platform-text-base)]">
图片画布、项目管理和素材库需要更大的操作空间。
@@ -223,7 +251,21 @@ export function PlatformEntryFlowShellImpl({
const [activeSearchKeyword, setActiveSearchKeyword] = useState('');
const [isMobileDesktopGuideOpen, setIsMobileDesktopGuideOpen] =
useState(false);
const [isMobileHomeWelcomeDismissed, setIsMobileHomeWelcomeDismissed] =
useState(false);
const isDesktopLayout = usePlatformDesktopLayout();
const platformThemeClass =
authUi?.platformTheme === 'dark'
? 'platform-theme--dark'
: 'platform-theme--light';
const shouldOpenMobileHomeWelcome = shouldOpenActiveMobileWelcomeDialog({
isDesktopLayout,
selectionStage,
platformTab: selectionStage,
pathname:
typeof window === 'undefined' ? '/' : window.location.pathname,
isDismissed: isMobileHomeWelcomeDismissed,
});
const refreshDashboard = useCallback(async () => {
if (!authUi?.user || !authUi.canAccessProtectedData) {
@@ -244,7 +286,9 @@ export function PlatformEntryFlowShellImpl({
void refreshDashboard();
}, [refreshDashboard]);
const isProfileStage = selectionStage === 'profile';
const isProfileStage =
selectionStage === 'profile' ||
(!isDesktopLayout && selectionStage === 'platform');
const profileCenter = usePlatformProfileCenterController({
activeTab: isProfileStage ? 'profile' : 'project',
@@ -312,15 +356,23 @@ export function PlatformEntryFlowShellImpl({
if ((!isDesktopLayout && isMobileDesktopGuideOpen) || isMobileToolStage) {
return (
<MobileCreationDesktopGuide
onReturnHome={() => {
setIsMobileDesktopGuideOpen(false);
if (selectionStage === 'platform') {
return;
}
setSelectionStage('platform', { path: '/' });
}}
/>
<>
<MobileCreationDesktopGuide
onReturnHome={() => {
setIsMobileDesktopGuideOpen(false);
if (selectionStage === 'platform') {
return;
}
setSelectionStage('platform', { path: '/' });
}}
/>
<MobileProfileDock active={false} onOpenProfile={openProfile} />
<PlatformActiveMobileWelcomeDialog
open={shouldOpenMobileHomeWelcome}
platformThemeClass={platformThemeClass}
onClose={() => setIsMobileHomeWelcomeDismissed(true)}
/>
</>
);
}
@@ -549,19 +601,10 @@ export function PlatformEntryFlowShellImpl({
</main>
</div>
</div>
<div className="platform-mobile-bottom-dock min-w-0 shrink-0 lg:hidden">
<nav
className="platform-bottom-nav grid grid-cols-1"
aria-label="移动平台导航"
>
<ActiveBottomNavButton
active={isProfileStage}
icon={UserRound}
label="我的"
onClick={openProfile}
/>
</nav>
</div>
<MobileProfileDock
active={isProfileStage}
onOpenProfile={openProfile}
/>
</div>
</div>
@@ -630,6 +673,11 @@ export function PlatformEntryFlowShellImpl({
orderId={profileCenter.wechatRechargeOrderConfirmationState.orderId}
/>
) : null}
<PlatformActiveMobileWelcomeDialog
open={shouldOpenMobileHomeWelcome}
platformThemeClass={platformThemeClass}
onClose={() => setIsMobileHomeWelcomeDismissed(true)}
/>
</>
);
}