收口公开编号搜索结果弹层
平台入口公开编号搜索结果弹层改用 UnifiedModal 承接公共模态外壳 未命中提示与命中用户卡分别复用 PlatformStatusMessage 和 PlatformSubpanel 补充公开编号搜索结果弹层交互测试与收口文档记录
This commit is contained in:
@@ -364,11 +364,13 @@ import {
|
||||
import type { CustomWorldProfile } from '../../types';
|
||||
import { useAuthUi } from '../auth/AuthUiContext';
|
||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||
import { PlatformModalCloseButton } from '../common/PlatformModalCloseButton';
|
||||
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
||||
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
|
||||
import { PlatformSubpanel } from '../common/PlatformSubpanel';
|
||||
import { PublishShareModal } from '../common/PublishShareModal';
|
||||
import type { PublishShareModalPayload } from '../common/publishShareModalModel';
|
||||
import { UnifiedConfirmDialog } from '../common/UnifiedConfirmDialog';
|
||||
import { UnifiedModal } from '../common/UnifiedModal';
|
||||
import { resolveCreativeAgentTargetSelectionStage } from '../creative-agent/creativeAgentViewModel';
|
||||
import {
|
||||
buildCreationWorkShelfItems,
|
||||
@@ -13942,6 +13944,11 @@ export function PlatformEntryFlowShellImpl({
|
||||
],
|
||||
);
|
||||
|
||||
const closePublicSearchResult = useCallback(() => {
|
||||
setSearchedPublicUser(null);
|
||||
setPublicSearchError(null);
|
||||
}, []);
|
||||
|
||||
const openProfilePlayedWorks = useCallback(() => {
|
||||
setIsProfilePlayStatsOpen(true);
|
||||
setIsProfilePlayStatsLoading(true);
|
||||
@@ -17054,49 +17061,47 @@ export function PlatformEntryFlowShellImpl({
|
||||
{pendingDeleteCreationWork?.detail}
|
||||
</UnifiedConfirmDialog>
|
||||
<AnimatePresence>
|
||||
{(searchedPublicUser || publicSearchError) && (
|
||||
{searchedPublicUser || publicSearchError ? (
|
||||
<motion.div
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
className="fixed inset-0 z-50 flex items-center justify-center bg-black/45 p-4"
|
||||
>
|
||||
<div className="platform-surface w-full max-w-md rounded-[1.6rem] p-5">
|
||||
<div className="flex items-start justify-between gap-4">
|
||||
<div>
|
||||
<div className="text-sm font-semibold text-[var(--platform-text-soft)]">
|
||||
公开编号搜索
|
||||
</div>
|
||||
<div className="mt-1 text-xl font-black text-[var(--platform-text-strong)]">
|
||||
{publicSearchError ? '未找到结果' : '命中用户'}
|
||||
</div>
|
||||
</div>
|
||||
<PlatformModalCloseButton
|
||||
onClick={() => {
|
||||
setSearchedPublicUser(null);
|
||||
setPublicSearchError(null);
|
||||
}}
|
||||
label="关闭搜索结果"
|
||||
variant="platformIcon"
|
||||
/>
|
||||
</div>
|
||||
<UnifiedModal
|
||||
open
|
||||
title={publicSearchError ? '未找到结果' : '命中用户'}
|
||||
description="公开编号搜索"
|
||||
onClose={closePublicSearchResult}
|
||||
closeOnBackdrop={false}
|
||||
closeLabel="关闭搜索结果"
|
||||
portal={false}
|
||||
size="sm"
|
||||
overlayClassName={`platform-theme ${platformThemeClass} !items-center bg-black/45 !p-4`}
|
||||
panelClassName="platform-remap-surface rounded-[1.6rem]"
|
||||
>
|
||||
{publicSearchError ? (
|
||||
<div className="mt-4 text-sm leading-6 text-[var(--platform-text-soft)]">
|
||||
<PlatformStatusMessage tone="neutral" surface="platform" size="md">
|
||||
{publicSearchError}
|
||||
</div>
|
||||
</PlatformStatusMessage>
|
||||
) : searchedPublicUser ? (
|
||||
<div className="mt-4 rounded-[1.2rem] border border-[var(--platform-line-soft)] p-4">
|
||||
<div className="text-lg font-bold text-[var(--platform-text-strong)]">
|
||||
{searchedPublicUser.displayName}
|
||||
<PlatformSubpanel
|
||||
as="section"
|
||||
surface="flat"
|
||||
radius="sm"
|
||||
padding="md"
|
||||
title={searchedPublicUser.displayName}
|
||||
titleVariant="strong"
|
||||
bodyClassName="mt-3"
|
||||
>
|
||||
<PlatformFieldLabel>陶泥号</PlatformFieldLabel>
|
||||
<div className="mt-1 text-sm font-semibold text-[var(--platform-text-base)]">
|
||||
{searchedPublicUser.publicUserCode}
|
||||
</div>
|
||||
<div className="mt-2 text-sm text-[var(--platform-text-soft)]">
|
||||
陶泥号 {searchedPublicUser.publicUserCode}
|
||||
</div>
|
||||
</div>
|
||||
</PlatformSubpanel>
|
||||
) : null}
|
||||
</div>
|
||||
</UnifiedModal>
|
||||
</motion.div>
|
||||
)}
|
||||
) : null}
|
||||
</AnimatePresence>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user