Files
Genarrative/src/components/platform-entry/PlatformMobileHomeWelcomeDialog.tsx
T
kdletters 09fec601b1 完善官网 SEO 地基与精确路由
补充 robots、sitemap、SEO 元信息、结构化数据与首页语义内容
统一三套 Nginx 与 Pingora 的 62 条 SPA 路由和真实 404 行为
新增路由一致性检查、网关测试并同步技术文档与项目记忆
2026-07-10 12:14:44 +08:00

82 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { PlatformActionButton } from '../common/PlatformActionButton';
import { UnifiedModal } from '../common/UnifiedModal';
import type { SelectionStage } from './platformEntryTypes';
type MobileHomeWelcomeDecisionInput = {
isDesktopLayout: boolean;
selectionStage: SelectionStage;
platformTab: string;
pathname: string;
};
type MobileHomeWelcomeOpenInput = MobileHomeWelcomeDecisionInput & {
isDismissed: boolean;
};
type PlatformMobileHomeWelcomeDialogProps = {
open: boolean;
platformThemeClass: string;
onClose: () => void;
};
export function shouldShowMobileHomeWelcomeDialog({
isDesktopLayout,
}: MobileHomeWelcomeDecisionInput) {
return !isDesktopLayout;
}
export function shouldOpenMobileHomeWelcomeDialog({
isDismissed,
...decisionInput
}: MobileHomeWelcomeOpenInput) {
return !isDismissed && shouldShowMobileHomeWelcomeDialog(decisionInput);
}
export function PlatformMobileHomeWelcomeDialog({
open,
platformThemeClass,
onClose,
}: PlatformMobileHomeWelcomeDialogProps) {
return (
<UnifiedModal
open={open}
title="欢迎"
onClose={onClose}
showHeader={false}
showCloseButton={false}
closeOnBackdrop={false}
closeOnEscape={false}
size="sm"
overlayClassName={`platform-theme ${platformThemeClass} platform-mobile-home-welcome-overlay !items-center !p-4`}
panelClassName="platform-remap-surface platform-mobile-home-welcome-dialog"
bodyClassName="platform-mobile-home-welcome-dialog__body"
footerClassName="platform-mobile-home-welcome-dialog__footer"
footer={
<PlatformActionButton
onClick={onClose}
size="md"
shape="pill"
fullWidth
className="min-h-11"
>
</PlatformActionButton>
}
>
<img
src="/branding/mobile-home-welcome-taonier-ip.png"
alt=""
className="platform-mobile-home-welcome-dialog__icon"
/>
<h2 className="platform-mobile-home-welcome-dialog__title">欢迎</h2>
<p className="platform-mobile-home-welcome-dialog__copy">
尼嚎,新陶泥er
<br />
移动端仅支持作品展示
<br />
体验创作工具请使用电脑端访问该地址
</p>
</UnifiedModal>
);
}