Files
Genarrative/src/components/platform-entry/PlatformActiveMobileWelcomeDialog.tsx
T
kdletters 071faa482c 统一 Rust 与 TypeScript 格式化门禁
纳入 AGC Cargo workspace 的统一 rustfmt 检查与格式化入口

完成项目 TypeScript/Prettier 与 Rust 全量格式化

修复 Pingora expected executable 门禁的空白敏感误报

同步开发运维文档与 AGC skill pack 格式化忽略规则
2026-09-01 16:28:34 +08:00

81 lines
2.2 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';
type MobileHomeWelcomeDecisionInput = {
isDesktopLayout: boolean;
selectionStage: string;
platformTab: string;
pathname: string;
};
type MobileHomeWelcomeOpenInput = MobileHomeWelcomeDecisionInput & {
isDismissed: boolean;
};
type PlatformActiveMobileWelcomeDialogProps = {
open: boolean;
platformThemeClass: string;
onClose: () => void;
};
export function shouldShowActiveMobileWelcomeDialog({
isDesktopLayout,
}: MobileHomeWelcomeDecisionInput) {
return !isDesktopLayout;
}
export function shouldOpenActiveMobileWelcomeDialog({
isDismissed,
...decisionInput
}: MobileHomeWelcomeOpenInput) {
return !isDismissed && shouldShowActiveMobileWelcomeDialog(decisionInput);
}
export function PlatformActiveMobileWelcomeDialog({
open,
platformThemeClass,
onClose,
}: PlatformActiveMobileWelcomeDialogProps) {
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>
);
}