继续收口浅色返回按钮
将统一创作页与多个浅色工作台返回入口切换为 PlatformBackActionButton 按页面保留 compact 与 regular 返回尺寸及禁用态 清理冗余 ArrowLeft 引用并完成对应页面定向验证
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
import { ArrowLeft, Loader2, Play } from 'lucide-react';
|
import { Loader2, Play } from 'lucide-react';
|
||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import type { BarkBattleConfigEditorPayload } from '../../../packages/shared/src/contracts/barkBattle';
|
import type { BarkBattleConfigEditorPayload } from '../../../packages/shared/src/contracts/barkBattle';
|
||||||
import type { BarkBattleDifficultyPreset } from '../../../packages/shared/src/contracts/barkBattle';
|
import type { BarkBattleDifficultyPreset } from '../../../packages/shared/src/contracts/barkBattle';
|
||||||
import { buildBarkBattleDefaultOnomatopoeia } from '../../games/bark-battle/application/BarkBattleConfig';
|
import { buildBarkBattleDefaultOnomatopoeia } from '../../games/bark-battle/application/BarkBattleConfig';
|
||||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../common/PlatformBackActionButton';
|
||||||
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
||||||
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
||||||
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
|
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
|
||||||
@@ -151,16 +152,11 @@ export function BarkBattleConfigEditor({
|
|||||||
>
|
>
|
||||||
{showBackButton && onBack ? (
|
{showBackButton && onBack ? (
|
||||||
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
tone="ghost"
|
className="px-3"
|
||||||
size="xs"
|
/>
|
||||||
className="min-h-0 self-start gap-1.5 px-3 py-1.5 text-[11px]"
|
|
||||||
>
|
|
||||||
<ArrowLeft className="h-3.5 w-3.5" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ArrowLeft, CheckCircle2, Puzzle } from 'lucide-react';
|
import { CheckCircle2, Puzzle } from 'lucide-react';
|
||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
@@ -11,6 +11,7 @@ import type {
|
|||||||
PuzzleCreativeTemplateSelection,
|
PuzzleCreativeTemplateSelection,
|
||||||
} from '../../../packages/shared/src/contracts/puzzleCreativeTemplate';
|
} from '../../../packages/shared/src/contracts/puzzleCreativeTemplate';
|
||||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../common/PlatformBackActionButton';
|
||||||
import { PlatformEmptyState } from '../common/PlatformEmptyState';
|
import { PlatformEmptyState } from '../common/PlatformEmptyState';
|
||||||
import { PlatformIconBadge } from '../common/PlatformIconBadge';
|
import { PlatformIconBadge } from '../common/PlatformIconBadge';
|
||||||
import { PlatformMediaFrame } from '../common/PlatformMediaFrame';
|
import { PlatformMediaFrame } from '../common/PlatformMediaFrame';
|
||||||
@@ -149,18 +150,11 @@ export function CreativeAgentWorkspace({
|
|||||||
<div className="platform-remap-surface mx-auto flex h-full min-h-0 w-full flex-col xl:max-w-[min(100%,88rem)] xl:px-1">
|
<div className="platform-remap-surface mx-auto flex h-full min-h-0 w-full flex-col xl:max-w-[min(100%,88rem)] xl:px-1">
|
||||||
<div className="mb-3 flex items-center justify-between gap-3">
|
<div className="mb-3 flex items-center justify-between gap-3">
|
||||||
{showBackButton ? (
|
{showBackButton ? (
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
tone="ghost"
|
|
||||||
size="xs"
|
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
className="min-h-0 px-3 py-1.5 text-[11px]"
|
className="px-3"
|
||||||
>
|
/>
|
||||||
<span className="inline-flex items-center gap-1.5">
|
|
||||||
<ArrowLeft className="h-3.5 w-3.5" />
|
|
||||||
返回
|
|
||||||
</span>
|
|
||||||
</PlatformActionButton>
|
|
||||||
) : (
|
) : (
|
||||||
<span aria-hidden="true" />
|
<span aria-hidden="true" />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { ArrowLeft, Gift, Loader2, WandSparkles } from 'lucide-react';
|
import { Gift, Loader2, WandSparkles } from 'lucide-react';
|
||||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import type { CreateBabyObjectMatchDraftRequest } from '../../../packages/shared/src/contracts/edutainmentBabyObject';
|
import type { CreateBabyObjectMatchDraftRequest } from '../../../packages/shared/src/contracts/edutainmentBabyObject';
|
||||||
import { validateBabyObjectMatchItemNames } from '../../../packages/shared/src/contracts/edutainmentBabyObject';
|
import { validateBabyObjectMatchItemNames } from '../../../packages/shared/src/contracts/edutainmentBabyObject';
|
||||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../common/PlatformBackActionButton';
|
||||||
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
||||||
import { PlatformIconBadge } from '../common/PlatformIconBadge';
|
import { PlatformIconBadge } from '../common/PlatformIconBadge';
|
||||||
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
||||||
@@ -80,16 +81,11 @@ export function BabyObjectMatchWorkspace({
|
|||||||
<div className="platform-remap-surface mx-auto flex h-full min-h-0 w-full max-w-5xl flex-col overflow-hidden">
|
<div className="platform-remap-surface mx-auto flex h-full min-h-0 w-full max-w-5xl flex-col overflow-hidden">
|
||||||
{showBackButton ? (
|
{showBackButton ? (
|
||||||
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
tone="ghost"
|
className="px-3"
|
||||||
size="xs"
|
/>
|
||||||
className="min-h-0 self-start gap-1.5 px-3 py-1.5 text-[11px]"
|
|
||||||
>
|
|
||||||
<ArrowLeft className="h-3.5 w-3.5" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ArrowLeft, Copy, Share2 } from 'lucide-react';
|
import { Copy, Share2 } from 'lucide-react';
|
||||||
|
|
||||||
import type { CustomWorldLibraryEntry } from '../../../packages/shared/src/contracts/runtime';
|
import type { CustomWorldLibraryEntry } from '../../../packages/shared/src/contracts/runtime';
|
||||||
import { buildCustomWorldPlayableCharacters } from '../../data/characterPresets';
|
import { buildCustomWorldPlayableCharacters } from '../../data/characterPresets';
|
||||||
@@ -7,6 +7,7 @@ import type { CustomWorldProfile } from '../../types';
|
|||||||
import { CopyCodeButton } from '../common/CopyCodeButton';
|
import { CopyCodeButton } from '../common/CopyCodeButton';
|
||||||
import { CopyFeedbackButton } from '../common/CopyFeedbackButton';
|
import { CopyFeedbackButton } from '../common/CopyFeedbackButton';
|
||||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../common/PlatformBackActionButton';
|
||||||
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
||||||
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
||||||
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
|
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
|
||||||
@@ -80,15 +81,10 @@ export function RpgEntryWorldDetailView({
|
|||||||
return (
|
return (
|
||||||
<div className="flex h-full min-h-0 flex-col">
|
<div className="flex h-full min-h-0 flex-col">
|
||||||
<div className="mb-4 flex items-center justify-between gap-3">
|
<div className="mb-4 flex items-center justify-between gap-3">
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
tone="ghost"
|
|
||||||
size="xs"
|
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
className="px-3 py-1.5 text-[11px]"
|
className="px-3"
|
||||||
>
|
/>
|
||||||
<ArrowLeft className="h-4 w-4" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
<PlatformPillBadge
|
<PlatformPillBadge
|
||||||
tone="neutral"
|
tone="neutral"
|
||||||
size="xs"
|
size="xs"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { ArrowLeft } from 'lucide-react';
|
|
||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
|
|
||||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
import { PlatformBackActionButton } from '../common/PlatformBackActionButton';
|
||||||
import type { UnifiedCreationSpec } from './unifiedCreationSpecs';
|
import type { UnifiedCreationSpec } from './unifiedCreationSpecs';
|
||||||
|
|
||||||
type UnifiedCreationPageProps = {
|
type UnifiedCreationPageProps = {
|
||||||
@@ -29,16 +28,11 @@ export function UnifiedCreationPage({
|
|||||||
<header className="unified-creation-page__header shrink-0 pb-3">
|
<header className="unified-creation-page__header shrink-0 pb-3">
|
||||||
<div className="mb-2 flex items-center gap-3">
|
<div className="mb-2 flex items-center gap-3">
|
||||||
{onBack ? (
|
{onBack ? (
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
disabled={isBackDisabled}
|
disabled={isBackDisabled}
|
||||||
tone="ghost"
|
className="shrink-0 px-3"
|
||||||
size="xs"
|
/>
|
||||||
className="min-h-0 shrink-0 gap-1.5 px-3 py-1.5 text-[11px]"
|
|
||||||
>
|
|
||||||
<ArrowLeft className="h-3.5 w-3.5" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
) : (
|
) : (
|
||||||
<span aria-hidden="true" className="min-h-8 w-0 shrink-0" />
|
<span aria-hidden="true" className="min-h-8 w-0 shrink-0" />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ArrowLeft, Loader2, Send } from 'lucide-react';
|
import { Loader2, Send } from 'lucide-react';
|
||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
@@ -7,6 +7,7 @@ import type {
|
|||||||
} from '../../../../packages/shared/src/contracts/jumpHop';
|
} from '../../../../packages/shared/src/contracts/jumpHop';
|
||||||
import { jumpHopClient } from '../../../services/jump-hop/jumpHopClient';
|
import { jumpHopClient } from '../../../services/jump-hop/jumpHopClient';
|
||||||
import { PlatformActionButton } from '../../common/PlatformActionButton';
|
import { PlatformActionButton } from '../../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../../common/PlatformBackActionButton';
|
||||||
import { PlatformFieldLabel } from '../../common/PlatformFieldLabel';
|
import { PlatformFieldLabel } from '../../common/PlatformFieldLabel';
|
||||||
import { PlatformStatusMessage } from '../../common/PlatformStatusMessage';
|
import { PlatformStatusMessage } from '../../common/PlatformStatusMessage';
|
||||||
import { PlatformTextField } from '../../common/PlatformTextField';
|
import { PlatformTextField } from '../../common/PlatformTextField';
|
||||||
@@ -99,15 +100,12 @@ export function JumpHopCreationWorkspace({
|
|||||||
>
|
>
|
||||||
{showBackButton ? (
|
{showBackButton ? (
|
||||||
<div className="mb-3 flex items-center justify-between gap-3">
|
<div className="mb-3 flex items-center justify-between gap-3">
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
tone="ghost"
|
disabled={isBusy}
|
||||||
size="sm"
|
variant="regular"
|
||||||
className="min-h-0 px-3 py-2"
|
className="px-3"
|
||||||
>
|
/>
|
||||||
<ArrowLeft className="h-4 w-4" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { ArrowLeft } from 'lucide-react';
|
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import type { PuzzleAgentActionRequest } from '../../../../packages/shared/src/contracts/puzzleAgentActions';
|
import type { PuzzleAgentActionRequest } from '../../../../packages/shared/src/contracts/puzzleAgentActions';
|
||||||
@@ -19,6 +18,7 @@ import {
|
|||||||
type CreativeImageInputReferenceImage,
|
type CreativeImageInputReferenceImage,
|
||||||
} from '../../common/CreativeImageInputPanel';
|
} from '../../common/CreativeImageInputPanel';
|
||||||
import { PlatformActionButton } from '../../common/PlatformActionButton';
|
import { PlatformActionButton } from '../../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../../common/PlatformBackActionButton';
|
||||||
import { PlatformMudPointConfirmDialog } from '../../common/PlatformMudPointConfirmDialog';
|
import { PlatformMudPointConfirmDialog } from '../../common/PlatformMudPointConfirmDialog';
|
||||||
import { PlatformPillBadge } from '../../common/PlatformPillBadge';
|
import { PlatformPillBadge } from '../../common/PlatformPillBadge';
|
||||||
import { SquareImageCropModal } from '../../common/SquareImageCropModal';
|
import { SquareImageCropModal } from '../../common/SquareImageCropModal';
|
||||||
@@ -630,16 +630,11 @@ export function PuzzleCreationWorkspace({
|
|||||||
>
|
>
|
||||||
{showBackButton ? (
|
{showBackButton ? (
|
||||||
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
tone="ghost"
|
className="px-3"
|
||||||
size="xs"
|
/>
|
||||||
className="min-h-0 self-start gap-1.5 px-3 py-1.5 text-[11px]"
|
|
||||||
>
|
|
||||||
<ArrowLeft className="h-3.5 w-3.5" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ArrowLeft, Loader2, Plus, Send, X } from 'lucide-react';
|
import { Loader2, Plus, Send, X } from 'lucide-react';
|
||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
} from '../../common/creativeAudioProcessing';
|
} from '../../common/creativeAudioProcessing';
|
||||||
import { CreativeImageInputPanel } from '../../common/CreativeImageInputPanel';
|
import { CreativeImageInputPanel } from '../../common/CreativeImageInputPanel';
|
||||||
import { PlatformActionButton } from '../../common/PlatformActionButton';
|
import { PlatformActionButton } from '../../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../../common/PlatformBackActionButton';
|
||||||
import { PlatformIconButton } from '../../common/PlatformIconButton';
|
import { PlatformIconButton } from '../../common/PlatformIconButton';
|
||||||
import { PlatformStatusMessage } from '../../common/PlatformStatusMessage';
|
import { PlatformStatusMessage } from '../../common/PlatformStatusMessage';
|
||||||
import { PlatformSubpanel } from '../../common/PlatformSubpanel';
|
import { PlatformSubpanel } from '../../common/PlatformSubpanel';
|
||||||
@@ -190,15 +191,12 @@ export function WoodenFishCreationWorkspace({
|
|||||||
>
|
>
|
||||||
{showBackButton ? (
|
{showBackButton ? (
|
||||||
<div className="mb-3 flex items-center justify-between gap-3">
|
<div className="mb-3 flex items-center justify-between gap-3">
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
tone="ghost"
|
disabled={isBusy || isSubmitting}
|
||||||
size="sm"
|
variant="regular"
|
||||||
className="min-h-0 px-3 py-2"
|
className="px-3"
|
||||||
>
|
/>
|
||||||
<ArrowLeft className="h-4 w-4" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { ArrowLeft, Loader2, Sparkles, WandSparkles } from 'lucide-react';
|
import { Loader2, Sparkles, WandSparkles } from 'lucide-react';
|
||||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import type { VisualNovelAgentSessionSnapshot } from '../../../packages/shared/src/contracts/visualNovel';
|
import type { VisualNovelAgentSessionSnapshot } from '../../../packages/shared/src/contracts/visualNovel';
|
||||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||||
|
import { PlatformBackActionButton } from '../common/PlatformBackActionButton';
|
||||||
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
|
||||||
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
import { PlatformPillBadge } from '../common/PlatformPillBadge';
|
||||||
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
|
import { PlatformStatusMessage } from '../common/PlatformStatusMessage';
|
||||||
@@ -241,16 +242,11 @@ export function VisualNovelAgentWorkspace({
|
|||||||
<div className="platform-remap-surface mx-auto flex h-full min-h-0 w-full max-w-5xl flex-col overflow-hidden">
|
<div className="platform-remap-surface mx-auto flex h-full min-h-0 w-full max-w-5xl flex-col overflow-hidden">
|
||||||
{showBackButton ? (
|
{showBackButton ? (
|
||||||
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
<div className="mb-3 flex shrink-0 items-center justify-between gap-3 sm:mb-4">
|
||||||
<PlatformActionButton
|
<PlatformBackActionButton
|
||||||
onClick={onBack}
|
onClick={onBack}
|
||||||
disabled={isBusy}
|
disabled={isBusy}
|
||||||
tone="ghost"
|
className="px-3"
|
||||||
size="xs"
|
/>
|
||||||
className="min-h-0 self-start gap-1.5 px-3 py-1.5 text-[11px]"
|
|
||||||
>
|
|
||||||
<ArrowLeft className="h-3.5 w-3.5" />
|
|
||||||
返回
|
|
||||||
</PlatformActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user