收口创作中心积分领取按钮

将作品卡积分激励领取按钮迁移到 PlatformActionButton

保留积分激励按钮紧凑布局和移动端跨列样式

补充领取按钮公共组件和 CSS 覆盖断言

更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
2026-06-10 14:02:20 +08:00
parent 71690c3aaa
commit b9ddc07e0a
6 changed files with 46 additions and 10 deletions

View File

@@ -547,7 +547,14 @@ test('creation hub shows puzzle point incentive and claims without opening card'
expect(screen.getByLabelText('积分激励总数 2.5 泥点')).toBeTruthy();
expect(screen.getByLabelText('待领取积分 1 泥点')).toBeTruthy();
await user.click(screen.getByRole('button', { name: '领取积分' }));
const claimButton = screen.getByRole('button', { name: '领取积分' });
expect(claimButton.className).toContain('platform-button');
expect(claimButton.className).toContain(
'creation-work-card-incentive__button',
);
await user.click(claimButton);
expect(onClaimPuzzlePointIncentive).toHaveBeenCalledWith(
expect.objectContaining({ profileId: 'puzzle-profile-incentive' }),

View File

@@ -18,6 +18,7 @@ import {
useState,
} from 'react';
import { PlatformActionButton } from '../common/PlatformActionButton';
import { PlatformPillBadge } from '../common/PlatformPillBadge';
import { CustomWorldCoverArtwork } from '../CustomWorldCoverArtwork';
import {
@@ -736,8 +737,9 @@ export function CustomWorldWorkCard({
)}
</span>
</div>
<button
type="button"
<PlatformActionButton
tone="secondary"
size="xxs"
disabled={!canClaimPointIncentive || pointIncentiveBusy}
onClick={(event) => {
event.stopPropagation();
@@ -749,7 +751,7 @@ export function CustomWorldWorkCard({
className="creation-work-card-incentive__button"
>
{pointIncentiveBusy ? '领取中' : '领取积分'}
</button>
</PlatformActionButton>
</div>
) : null}