feat(ui): enhance table and admin components with improved layout and status display
- Updated global CSS to center-align table headers and cells, ensuring a consistent layout. - Modified admin table components to replace switches with status badges for better clarity. - Enhanced internationalization support by adding new strings for version actions and validation messages in multiple locales. - Refactored configuration document screens to include version selection and improved user feedback on status changes.
This commit is contained in:
40
src/modules/config/config-version-toolbar-meta.tsx
Normal file
40
src/modules/config/config-version-toolbar-meta.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type ConfigVersionToolbarMetaProps = {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
/** Highlights read-only or draft-only hints. */
|
||||
emphasis?: boolean;
|
||||
};
|
||||
|
||||
/** Single-line meta row under the version toolbar (live version, read-only hints). */
|
||||
export function ConfigVersionToolbarMeta({
|
||||
children,
|
||||
className,
|
||||
emphasis = false,
|
||||
}: ConfigVersionToolbarMetaProps) {
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs leading-relaxed",
|
||||
emphasis ? "text-foreground" : "text-muted-foreground",
|
||||
className,
|
||||
)}
|
||||
role="status"
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function ConfigVersionToolbarMetaEmphasis({
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return <span className={cn("font-medium text-primary", className)}>{children}</span>;
|
||||
}
|
||||
Reference in New Issue
Block a user