refactor(layout, i18n, admin): 优化布局结构与多语言支持
调整 AdminShell 组件的子组件顺序,提升代码可读性。更新 admin-breadcrumb 组件,简化导航标签翻译逻辑,确保多语言支持的一致性。重构 admin-language-switcher 组件,优化语言切换的用户体验,增强界面交互性。更新多语言配置,新增登录界面的副标题,提升用户体验。
This commit is contained in:
40
src/modules/config/config-workflow-section.tsx
Normal file
40
src/modules/config/config-workflow-section.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type ConfigWorkflowSectionProps = {
|
||||
step: number;
|
||||
title: string;
|
||||
description?: ReactNode;
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
contentClassName?: string;
|
||||
};
|
||||
|
||||
/** 编号步骤卡片,用于赔率/回水等合并配置页主栏分区。 */
|
||||
export function ConfigWorkflowSection({
|
||||
step,
|
||||
title,
|
||||
description,
|
||||
children,
|
||||
className,
|
||||
contentClassName,
|
||||
}: ConfigWorkflowSectionProps) {
|
||||
return (
|
||||
<section className={cn("overflow-hidden rounded-xl border border-border/60 bg-card", className)}>
|
||||
<div className="flex gap-3 border-b border-border/50 px-4 py-3.5 sm:px-5">
|
||||
<span
|
||||
aria-hidden
|
||||
className="flex size-7 shrink-0 items-center justify-center rounded-full bg-primary text-sm font-semibold text-primary-foreground"
|
||||
>
|
||||
{step}
|
||||
</span>
|
||||
<div className="min-w-0 flex-1 space-y-0.5">
|
||||
<h3 className="text-base font-semibold tracking-tight">{title}</h3>
|
||||
{description ? <div className="text-sm text-muted-foreground">{description}</div> : null}
|
||||
</div>
|
||||
</div>
|
||||
<div className={cn("px-4 py-4 sm:px-5", contentClassName)}>{children}</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user