diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..dbba1c6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + diff --git a/README.md b/README.md index 2abe19d..bdc7f4f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ A modern, responsive web management console for RustFS distributed file system, ### UI & Styling - **[Tailwind CSS v4](https://tailwindcss.com/)** - Utility-first CSS framework -- **[shadcn/ui](https://ui.shadcn.com/)** - High-quality component library based on Radix UI +- **[shadcn/ui](https://ui.shadcn.com/)** - High-quality component library based on Base UI - **[Remix Icon](https://remixicon.com/)** - Icon library - **[next-themes](https://github.com/pacocoursey/next-themes)** - Theme switching support diff --git a/app/(dashboard)/_components/performance-server-list.tsx b/app/(dashboard)/_components/performance-server-list.tsx index 526094c..a201046 100644 --- a/app/(dashboard)/_components/performance-server-list.tsx +++ b/app/(dashboard)/_components/performance-server-list.tsx @@ -35,7 +35,7 @@ export function PerformanceServerList({ servers, t }: { servers: ServerInfo[]; t - + {servers.map((server, index) => ( diff --git a/app/(dashboard)/site-replication/page.tsx b/app/(dashboard)/site-replication/page.tsx index 1e73862..632a31b 100644 --- a/app/(dashboard)/site-replication/page.tsx +++ b/app/(dashboard)/site-replication/page.tsx @@ -354,12 +354,14 @@ export default function SiteReplicationPage() { return ( - - - + + + {t("Actions")} + + } + /> {peer.name || t("Peer site")} {canManageSites ? ( diff --git a/app/(dashboard)/sse/page.tsx b/app/(dashboard)/sse/page.tsx index 25d0549..5d070e6 100644 --- a/app/(dashboard)/sse/page.tsx +++ b/app/(dashboard)/sse/page.tsx @@ -700,11 +700,13 @@ export default function SSEPage() { {hasConfiguration && ( - - - + + {t("Advanced Actions")} + + } + /> {clearingCache ? t("Clearing cache...") : t("Clear Cache")} @@ -1069,11 +1071,13 @@ export default function SSEPage() {
- - - + + {t("Actions")} + + } + /> setSelectedKeyId(key.key_id)}> {t("View Details")} diff --git a/app/globals.css b/app/globals.css index 6d47136..d0b2354 100644 --- a/app/globals.css +++ b/app/globals.css @@ -7,8 +7,6 @@ @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); - --font-sans: var(--font-sans); - --font-mono: var(--font-geist-mono); --color-sidebar-ring: var(--sidebar-ring); --color-sidebar-border: var(--sidebar-border); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); @@ -45,11 +43,11 @@ --radius-2xl: calc(var(--radius) + 8px); --radius-3xl: calc(var(--radius) + 12px); --radius-4xl: calc(var(--radius) + 16px); + --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; + --font-heading: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace; } :root { - --background: oklch(1 0 0); - --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); @@ -62,7 +60,7 @@ --muted-foreground: oklch(0.556 0 0); --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); - --destructive: oklch(0.58 0.22 27); + --destructive: oklch(0.577 0.245 27.325); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); @@ -71,7 +69,7 @@ --chart-3: oklch(0.546 0.245 262.881); --chart-4: oklch(0.488 0.243 264.376); --chart-5: oklch(0.424 0.199 265.638); - --radius: 0; + --radius: 0.625rem; --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); --sidebar-primary: oklch(0.205 0 0); @@ -80,8 +78,8 @@ --sidebar-accent-foreground: oklch(0.205 0 0); --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.708 0 0); - --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; - --font-geist-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace; + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); } .dark { @@ -91,13 +89,13 @@ --card-foreground: oklch(0.985 0 0); --popover: oklch(0.205 0 0); --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.87 0 0); + --primary: oklch(0.922 0 0); --primary-foreground: oklch(0.205 0 0); --secondary: oklch(0.269 0 0); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.269 0 0); --muted-foreground: oklch(0.708 0 0); - --accent: oklch(0.371 0 0); + --accent: oklch(0.269 0 0); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.704 0.191 22.216); --border: oklch(1 0 0 / 10%); @@ -125,6 +123,9 @@ body { @apply bg-background text-foreground; } + html { + @apply font-sans; + } } @keyframes fadeInWord { diff --git a/components.json b/components.json index a786b87..00d6fa6 100644 --- a/components.json +++ b/components.json @@ -1,6 +1,6 @@ { "$schema": "https://ui.shadcn.com/schema.json", - "style": "radix-lyra", + "style": "base-lyra", "rsc": true, "tsx": true, "tailwind": { diff --git a/components/access-keys/edit-item.tsx b/components/access-keys/edit-item.tsx index a9ba3fc..0bbd8c4 100644 --- a/components/access-keys/edit-item.tsx +++ b/components/access-keys/edit-item.tsx @@ -100,12 +100,8 @@ export function AccessKeysEditItem({ open, onOpenChange, row, onSuccess }: Acces } return ( - - e.preventDefault()} - onInteractOutside={(e) => e.preventDefault()} - > + + {t("Edit Key")} diff --git a/components/access-keys/new-item.tsx b/components/access-keys/new-item.tsx index 22a1942..6981590 100644 --- a/components/access-keys/new-item.tsx +++ b/components/access-keys/new-item.tsx @@ -147,12 +147,8 @@ export function AccessKeysNewItem({ visible, onVisibleChange, onSuccess, onNotic } return ( - - e.preventDefault()} - onInteractOutside={(e) => e.preventDefault()} - > + + {t("Create Key")} diff --git a/components/app-sidebar.tsx b/components/app-sidebar.tsx index 519a359..e3d3f74 100644 --- a/components/app-sidebar.tsx +++ b/components/app-sidebar.tsx @@ -170,79 +170,95 @@ export function AppSidebar() { {group.map((item) => ( - {hasChildren(item) ? ( - - - - - {getLabel(item)} - - - - - - {item.children!.map((child) => ( - - {isExternal(child) ? ( - - - - {getLabel(child)} - - - - ) : ( - - - - {getLabel(child)} - - - )} - - ))} - - - - ) : ( - - {isExternal(item) ? ( - - - - {getLabel(item)} - - - - ) : ( - - - - {getLabel(item)} - - - )} - - )} - + render={ + hasChildren(item) ? ( + + + + {getLabel(item)} + + + } + /> + + + {item.children!.map((child) => ( + + {isExternal(child) ? ( + + + {getLabel(child)} + + + } + /> + ) : ( + + + {getLabel(child)} + + } + /> + )} + + ))} + + + + ) : ( + + {isExternal(item) ? ( + + + {getLabel(item)} + + + } + /> + ) : ( + + + {getLabel(item)} + + } + /> + )} + + ) + } + /> ))} diff --git a/components/buckets/info.tsx b/components/buckets/info.tsx index b2ca1ce..300aa40 100644 --- a/components/buckets/info.tsx +++ b/components/buckets/info.tsx @@ -802,7 +802,7 @@ export function BucketInfo({ bucketName }: BucketInfoProps) { {t("Encryption Type")} - setEncryptFormType(value ?? "")}> @@ -818,7 +818,7 @@ export function BucketInfo({ bucketName }: BucketInfoProps) { KMS Key ID - setEncryptFormKmsKeyId(value ?? "")}> diff --git a/components/buckets/new-form.tsx b/components/buckets/new-form.tsx index f5bb6a7..2563276 100644 --- a/components/buckets/new-form.tsx +++ b/components/buckets/new-form.tsx @@ -146,13 +146,8 @@ export function BucketNewForm({ show, onShowChange }: BucketNewFormProps) { } return ( - !open && closeModal()}> - e.preventDefault()} - onInteractOutside={(e) => e.preventDefault()} - > + !open && closeModal()} disablePointerDismissal> + {t("Create Bucket")} diff --git a/components/data-table/data-table-pagination.tsx b/components/data-table/data-table-pagination.tsx index 51a4806..58b5a15 100644 --- a/components/data-table/data-table-pagination.tsx +++ b/components/data-table/data-table-pagination.tsx @@ -36,7 +36,7 @@ export function DataTablePagination({
{t("Rows per page")} - handlePageSizeChange(value ?? "")}> diff --git a/components/datetime-picker.tsx b/components/datetime-picker.tsx index baff409..983d445 100644 --- a/components/datetime-picker.tsx +++ b/components/datetime-picker.tsx @@ -110,26 +110,28 @@ export function DateTimePicker({ return (
- - - + + + + {displayValue || placeholder || t("Please select expiry date")} + + + } + /> {displayValue && !disabled ? ( + } + /> + )} + { e.preventDefault() void runDialogAction({ dialogId: dialog.id, pendingIds: pendingDialogIdsRef.current, setPendingIds: setPendingDialogIds, - action: dialog.onNegativeClick, + action: dialog.onPositiveClick, close: () => controller.close(dialog.id), onError: (error) => { console.error(error) @@ -65,37 +95,11 @@ export function DialogHost() { }) }} > - {dialog.negativeText} + {isPending ?