修复分支剩余格式问题
按 Prettier 统一钱包、平台入口和画布相关分支文件格式。 补齐共享决策文档缺失的 Markdown 段落间距。
This commit is contained in:
@@ -423,8 +423,7 @@ export function ImageCanvasStageView({
|
||||
selectedLayer && perfectPixelLayerIds.has(selectedLayer.id),
|
||||
)}
|
||||
isPerfectPixelPendingConfirmation={Boolean(
|
||||
selectedLayer &&
|
||||
pendingPerfectPixelLayerIds.has(selectedLayer.id),
|
||||
selectedLayer && pendingPerfectPixelLayerIds.has(selectedLayer.id),
|
||||
)}
|
||||
onOpenQuickEditPanel={onOpenQuickEditPanel}
|
||||
onOpenRedrawPanel={onOpenRedrawPanel}
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
/* @vitest-environment jsdom */
|
||||
|
||||
import { act, fireEvent, render, screen, waitFor, within } from '@testing-library/react';
|
||||
import {
|
||||
act,
|
||||
fireEvent,
|
||||
render,
|
||||
screen,
|
||||
waitFor,
|
||||
within,
|
||||
} from '@testing-library/react';
|
||||
import { useState } from 'react';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
@@ -95,8 +102,9 @@ vi.mock('../image-editor/ImageCanvasEditorView', () => ({
|
||||
ImageCanvasEditorView: () => <main aria-label="图片画布编辑器" />,
|
||||
}));
|
||||
|
||||
vi.mock('../../services/platform-entry/platformProfileClient', () =>
|
||||
profileClientMock,
|
||||
vi.mock(
|
||||
'../../services/platform-entry/platformProfileClient',
|
||||
() => profileClientMock,
|
||||
);
|
||||
|
||||
vi.mock('./usePlatformProfileCenterController', () => ({
|
||||
@@ -455,13 +463,9 @@ describe('PlatformEntryActiveFlowShell', () => {
|
||||
expect(
|
||||
await screen.findByRole('main', { name: '桌面端创作提示' }),
|
||||
).toBeTruthy();
|
||||
expect(
|
||||
screen.queryByRole('main', { name: '陶泥儿创作主页' }),
|
||||
).toBeNull();
|
||||
expect(screen.queryByRole('main', { name: '陶泥儿创作主页' })).toBeNull();
|
||||
expect(screen.queryByRole('main', { name: '项目' })).toBeNull();
|
||||
expect(
|
||||
screen.queryByRole('main', { name: '图片画布编辑器' }),
|
||||
).toBeNull();
|
||||
expect(screen.queryByRole('main', { name: '图片画布编辑器' })).toBeNull();
|
||||
},
|
||||
);
|
||||
|
||||
@@ -477,9 +481,7 @@ describe('PlatformEntryActiveFlowShell', () => {
|
||||
expect(
|
||||
await screen.findByRole('main', { name: '桌面端创作提示' }),
|
||||
).toBeTruthy();
|
||||
expect(
|
||||
screen.queryByRole('main', { name: '图片画布编辑器' }),
|
||||
).toBeNull();
|
||||
expect(screen.queryByRole('main', { name: '图片画布编辑器' })).toBeNull();
|
||||
});
|
||||
|
||||
it('switches between creation and projects and passes search to the active page', async () => {
|
||||
|
||||
@@ -542,9 +542,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
<PlatformActiveProfileView
|
||||
dashboard={dashboard}
|
||||
isLoadingDashboard={isLoadingDashboard}
|
||||
isLoadingWalletBalance={
|
||||
mudPointBalanceStatus === 'loading'
|
||||
}
|
||||
isLoadingWalletBalance={mudPointBalanceStatus === 'loading'}
|
||||
mudPointBalance={mudPointBalance}
|
||||
user={authUi?.user}
|
||||
onLogin={() => authUi?.openLoginModal()}
|
||||
|
||||
@@ -4,8 +4,7 @@ import { createProfileWalletStore } from '@/packages/shared/src';
|
||||
import { getPlatformProfileRechargeCenter } from '@/src/services/platform-entry/platformProfileClient.ts';
|
||||
|
||||
export const usePlatformWalletStore = createProfileWalletStore({
|
||||
getRechargeCenter: (signal) =>
|
||||
getPlatformProfileRechargeCenter({ signal }),
|
||||
getRechargeCenter: (signal) => getPlatformProfileRechargeCenter({ signal }),
|
||||
});
|
||||
|
||||
export function usePlatformWalletLifecycle(
|
||||
|
||||
Reference in New Issue
Block a user