继续收口创作侧暗色头尾动作按钮
统一角色素材工坊头部关闭与底部保存按钮到 PlatformActionButton 统一实体编辑器底部取消按钮到 PlatformActionButton 补充 PlatformUiKit 收口计划与共享决策记录
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { PlatformActionButton } from '../common/PlatformActionButton';
|
||||
|
||||
export function RpgCreationRoleAssetStudioFooter(props: {
|
||||
isSavingToRole: boolean;
|
||||
saveStatus: string | null;
|
||||
@@ -14,6 +16,11 @@ export function RpgCreationRoleAssetStudioFooter(props: {
|
||||
workingRoleImageSrc,
|
||||
onSaveToRole,
|
||||
} = props;
|
||||
const saveDisabled =
|
||||
isSavingToRole ||
|
||||
syncBusy ||
|
||||
!workingRoleImageSrc ||
|
||||
!workingRoleGeneratedVisualAssetId;
|
||||
|
||||
return (
|
||||
<div className="platform-role-studio__footer sticky bottom-0 z-10 -mx-4 px-4 pb-[calc(env(safe-area-inset-bottom,0px)+0.35rem)] pt-3 sm:mx-0 sm:rounded-3xl sm:border sm:border-[var(--platform-subpanel-border)] sm:px-4">
|
||||
@@ -24,26 +31,16 @@ export function RpgCreationRoleAssetStudioFooter(props: {
|
||||
</div>
|
||||
) : null}
|
||||
<div className="flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">
|
||||
<button
|
||||
type="button"
|
||||
<PlatformActionButton
|
||||
onClick={onSaveToRole}
|
||||
disabled={
|
||||
isSavingToRole ||
|
||||
syncBusy ||
|
||||
!workingRoleImageSrc ||
|
||||
!workingRoleGeneratedVisualAssetId
|
||||
}
|
||||
className={`rounded-full border border-emerald-400/30 bg-emerald-500/10 px-5 py-2 text-sm font-semibold text-emerald-100 transition-colors hover:bg-emerald-500/20 ${
|
||||
isSavingToRole ||
|
||||
syncBusy ||
|
||||
!workingRoleImageSrc ||
|
||||
!workingRoleGeneratedVisualAssetId
|
||||
? 'cursor-not-allowed opacity-45'
|
||||
: ''
|
||||
}`}
|
||||
disabled={saveDisabled}
|
||||
surface="editorDark"
|
||||
tone="success"
|
||||
size="sm"
|
||||
className="min-w-[9.5rem] px-5 text-sm disabled:opacity-45"
|
||||
>
|
||||
{isSavingToRole || syncBusy ? '保存中...' : '保存到当前角色'}
|
||||
</button>
|
||||
</PlatformActionButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -102,14 +102,17 @@ function ModalShell({
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
<PlatformActionButton
|
||||
onClick={onClose}
|
||||
disabled={disableClose}
|
||||
className={`rounded-full border border-white/10 bg-black/20 px-3 py-2 text-xs text-zinc-300 transition-colors hover:text-white ${disableClose ? 'cursor-not-allowed opacity-45' : ''}`}
|
||||
surface="editorDark"
|
||||
tone="ghost"
|
||||
size="xs"
|
||||
shape="pill"
|
||||
className="self-start px-3 font-normal text-zinc-300 disabled:opacity-45"
|
||||
>
|
||||
关闭
|
||||
</button>
|
||||
</PlatformActionButton>
|
||||
</div>
|
||||
<div className="min-h-0 flex-1 overflow-y-auto p-4 sm:p-5">
|
||||
{children}
|
||||
|
||||
@@ -4305,13 +4305,17 @@ export function SaveBar({
|
||||
) : null}
|
||||
<div className="flex flex-col-reverse gap-3 sm:flex-row sm:justify-end">
|
||||
{showClose ? (
|
||||
<button
|
||||
<PlatformActionButton
|
||||
type="button"
|
||||
surface="editorDark"
|
||||
tone="ghost"
|
||||
size="sm"
|
||||
shape="pill"
|
||||
onClick={onClose}
|
||||
className="rounded-full border border-white/10 bg-black/20 px-4 py-2 text-sm text-zinc-300 transition-colors hover:text-white"
|
||||
className="py-2 text-zinc-300"
|
||||
>
|
||||
取消
|
||||
</button>
|
||||
</PlatformActionButton>
|
||||
) : null}
|
||||
<ActionButton label="保存修改" onClick={onSave} tone="sky" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user