From 76a63264feaf72b9fdacdc3787dd41c87dd8b79e Mon Sep 17 00:00:00 2001 From: kyy Date: Wed, 13 May 2026 17:20:43 +0900 Subject: [PATCH] =?UTF-8?q?devfront=20consents=20=EB=B0=8F=20audit=20?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20=EA=B3=B5=ED=86=B5=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/sort/SortableTableHead.tsx | 3 +- common/ui/table.ts | 2 +- .../features/clients/ClientConsentsPage.tsx | 285 +++++++++--------- 3 files changed, 151 insertions(+), 139 deletions(-) diff --git a/common/core/components/sort/SortableTableHead.tsx b/common/core/components/sort/SortableTableHead.tsx index 5a32e990..e9c89117 100644 --- a/common/core/components/sort/SortableTableHead.tsx +++ b/common/core/components/sort/SortableTableHead.tsx @@ -1,8 +1,9 @@ import type { ReactNode, ThHTMLAttributes } from "react"; import type { SortConfig } from "../../utils"; +import { commonTableHeadClass } from "../../../ui/table"; export const sortableTableHeadBaseClassName = - "h-12 px-6 text-left text-xs font-sans font-bold uppercase tracking-[0.08em] text-foreground align-middle"; + commonTableHeadClass; export const sortableTableHeaderClassName = "sticky top-0 z-10 bg-secondary shadow-sm"; diff --git a/common/ui/table.ts b/common/ui/table.ts index 459d5699..40a47e30 100644 --- a/common/ui/table.ts +++ b/common/ui/table.ts @@ -6,7 +6,7 @@ export const commonTableFooterClass = "bg-muted/50 font-medium text-foreground"; export const commonTableRowClass = "border-b transition-colors hover:bg-muted/30 data-[state=selected]:bg-muted"; export const commonTableHeadClass = - "h-12 px-6 text-left text-xs font-bold uppercase tracking-[0.08em] text-muted-foreground align-middle"; + "h-12 px-6 text-left text-xs font-sans font-bold uppercase tracking-[0.08em] text-foreground align-middle"; export const commonTableCellClass = "p-6 align-middle text-sm"; export const commonTableCaptionClass = "mt-4 text-sm text-muted-foreground"; export const commonTableShellClass = diff --git a/devfront/src/features/clients/ClientConsentsPage.tsx b/devfront/src/features/clients/ClientConsentsPage.tsx index 0de25b12..3ec9ff40 100644 --- a/devfront/src/features/clients/ClientConsentsPage.tsx +++ b/devfront/src/features/clients/ClientConsentsPage.tsx @@ -28,6 +28,10 @@ import { TableHeader, TableRow, } from "../../components/ui/table"; +import { + commonTableShellClass, + commonTableViewportClass, +} from "../../../../common/ui/table"; import { fetchClient, fetchConsents, revokeConsent } from "../../lib/devApi"; import { t } from "../../lib/i18n"; import { cn } from "../../lib/utils"; @@ -430,146 +434,153 @@ function ClientConsentsPage() { )} - - - - - {t("ui.dev.clients.consents.table.user", "User")} - - - {t("ui.dev.clients.consents.table.tenant", "Tenant")} - - - {t("ui.dev.clients.consents.table.status", "Status")} - - - {t("ui.dev.clients.consents.table.scopes", "Granted Scopes")} - - - {t( - "ui.dev.clients.consents.table.first_granted", - "First Granted", - )} - - - {t( - "ui.dev.clients.consents.table.last_auth", - "Last Authenticated / Revoked", - )} - - - {t("ui.dev.clients.consents.table.action", "Action")} - - - - - {filteredRows.length === 0 && !isLoading && !error ? ( - - -
- -

- {t( - "msg.dev.clients.consents.empty", - "No consents found.", - )} -

-
-
-
- ) : ( - filteredRows.map((row) => ( - - -
-
- {(row.userName || row.subject) - .slice(0, 2) - .toUpperCase()} -
-
- - {row.userName || - t("ui.dev.clients.consents.subject", "Subject")} - - - {row.subject} - -
-
-
- -
- - {row.tenantName || t("ui.common.na", "N/A")} - - - {row.tenantId} - -
-
- - {row.status === "active" ? ( - - {t("ui.common.status.active", "Active")} - - ) : ( - - {t("ui.dev.clients.consents.status_revoked", "Revoked")} - +
+
+
+ + + + {t("ui.dev.clients.consents.table.user", "User")} + + + {t("ui.dev.clients.consents.table.tenant", "Tenant")} + + + {t("ui.dev.clients.consents.table.status", "Status")} + + + {t("ui.dev.clients.consents.table.scopes", "Granted Scopes")} + + + {t( + "ui.dev.clients.consents.table.first_granted", + "First Granted", )} - - -
- {row.grantedScopes.map((scope) => ( - - {scope} - - ))} -
-
- - {new Date(row.createdAt).toLocaleString()} - - - {row.status === "revoked" && row.deletedAt ? ( - - {t("ui.dev.clients.consents.revoked_at", "Revoked: ")} - {new Date(row.deletedAt).toLocaleString()} - - ) : row.authenticatedAt ? ( - new Date(row.authenticatedAt).toLocaleString() - ) : ( - "-" +
+ + {t( + "ui.dev.clients.consents.table.last_auth", + "Last Authenticated / Revoked", )} - - - {row.status === "active" && ( - - )} - + + + {t("ui.dev.clients.consents.table.action", "Action")} +
- )) - )} - -
+ + + {filteredRows.length === 0 && !isLoading && !error ? ( + + +
+ +

+ {t( + "msg.dev.clients.consents.empty", + "No consents found.", + )} +

+
+
+
+ ) : ( + filteredRows.map((row) => ( + + +
+
+ {(row.userName || row.subject) + .slice(0, 2) + .toUpperCase()} +
+
+ + {row.userName || + t("ui.dev.clients.consents.subject", "Subject")} + + + {row.subject} + +
+
+
+ +
+ + {row.tenantName || t("ui.common.na", "N/A")} + + + {row.tenantId} + +
+
+ + {row.status === "active" ? ( + + {t("ui.common.status.active", "Active")} + + ) : ( + + {t( + "ui.dev.clients.consents.status_revoked", + "Revoked", + )} + + )} + + +
+ {row.grantedScopes.map((scope) => ( + + {scope} + + ))} +
+
+ + {new Date(row.createdAt).toLocaleString()} + + + {row.status === "revoked" && row.deletedAt ? ( + + {t("ui.dev.clients.consents.revoked_at", "Revoked: ")} + {new Date(row.deletedAt).toLocaleString()} + + ) : row.authenticatedAt ? ( + new Date(row.authenticatedAt).toLocaleString() + ) : ( + "-" + )} + + + {row.status === "active" && ( + + )} + +
+ )) + )} +
+ + +

{t(