继续收口平台空态与动作按钮

作品架异步状态切换复用 PlatformAsyncStatePanel
复制反馈动作外观改为组合 PlatformActionButton
结果页与调试面板空态继续收口到 PlatformEmptyState
暗色私聊与工坊按钮改为复用 PlatformActionButton
更新 PlatformUiKit 收口文档与团队决策记录
This commit is contained in:
2026-06-11 01:41:15 +08:00
parent 0a4ccdf45c
commit 06bf03a28c
15 changed files with 202 additions and 130 deletions

View File

@@ -81,7 +81,7 @@ function stubReferenceImageUpload(dataUrl: string) {
vi.stubGlobal('FileReader', MockFileReader as unknown as typeof FileReader);
}
test('renders missing draft notice with shared PlatformSubpanel chrome', () => {
test('renders missing draft notice with shared PlatformEmptyState chrome', () => {
render(
<PuzzleResultView
session={{ ...createSession(), draft: null }}
@@ -92,11 +92,12 @@ test('renders missing draft notice with shared PlatformSubpanel chrome', () => {
const noticePanel = screen
.getByText('还没有可编辑的拼图草稿')
.closest('.platform-subpanel');
.closest('.platform-empty-state');
expect(noticePanel?.className).toContain('platform-empty-state');
expect(noticePanel?.className).toContain('rounded-[1rem]');
expect(noticePanel?.className).toContain('sm:p-5');
expect(noticePanel?.className).toContain('text-[var(--platform-text-base)]');
expect(noticePanel?.className).toContain('py-5');
expect(noticePanel?.className).toContain('text-[var(--platform-text-soft)]');
});
function createSession(

View File

@@ -23,6 +23,7 @@ import { readPuzzleReferenceImageAsDataUrl } from '../../services/puzzleReferenc
import { useAuthUi } from '../auth/AuthUiContext';
import { CreativeImageInputPanel } from '../common/CreativeImageInputPanel';
import { PlatformActionButton } from '../common/PlatformActionButton';
import { PlatformEmptyState } from '../common/PlatformEmptyState';
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
import { PlatformIconBadge } from '../common/PlatformIconBadge';
import { PlatformIconButton } from '../common/PlatformIconButton';
@@ -1556,14 +1557,13 @@ export function PuzzleResultView({
if (!draft || !editState || !syncedDraft) {
return (
<div className="flex h-full items-center justify-center">
<PlatformSubpanel
as="div"
radius="sm"
padding="lg"
className="text-sm text-[var(--platform-text-base)]"
<PlatformEmptyState
surface="subpanel"
size="inline"
className="w-full max-w-md"
>
稿
</PlatformSubpanel>
</PlatformEmptyState>
</div>
);
}