From 000d144e70555c4082432f5029c721c8e3015b3f Mon Sep 17 00:00:00 2001 From: rustmailer Date: Mon, 8 Dec 2025 03:43:00 +0800 Subject: [PATCH] chore(ui): Adjust width of account list for better visibility --- .../features/accounts/components/columns.tsx | 202 +++++++++--------- web/src/features/accounts/index.tsx | 2 +- 2 files changed, 102 insertions(+), 102 deletions(-) diff --git a/web/src/features/accounts/components/columns.tsx b/web/src/features/accounts/components/columns.tsx index 6efd595..588d79c 100644 --- a/web/src/features/accounts/components/columns.tsx +++ b/web/src/features/accounts/components/columns.tsx @@ -31,113 +31,113 @@ import { useTranslation } from 'react-i18next' export function useColumns(): ColumnDef[] { const { t } = useTranslation() - + return [ - { - accessorKey: "id", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - return {row.original.id} + { + accessorKey: "id", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + return {row.original.id} + }, + enableSorting: false, + enableHiding: false, }, - enableSorting: false, - enableHiding: false, - }, - { - accessorKey: "email", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - return {row.original.email} + { + accessorKey: "email", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + return {row.original.email} + }, + enableHiding: false, }, - enableHiding: false, - }, - { - accessorKey: "enabled", - header: ({ column }) => ( - - ), - cell: EnableAction, - meta: { className: 'w-8 text-center' }, - enableHiding: false, - }, - { - id: 'auth_type', - header: ({ column }) => ( - - ), - cell: OAuth2Action, - meta: { className: 'w-8' }, - enableHiding: false, - enableSorting: false - }, - { - id: 'account_type', - header: ({ column }) => ( - - ), - cell: ({ row }) => { - return {row.original.account_type} + { + accessorKey: "enabled", + header: ({ column }) => ( + + ), + cell: EnableAction, + meta: { className: 'w-18 text-center' }, + enableHiding: false, }, - meta: { className: 'w-8' }, - enableHiding: false, - enableSorting: false - }, - { - accessorKey: "sync_interval_sec", - header: ({ column }) => ( - - ), - cell: ({ row }) => { - let account_type = row.original.account_type; - if (account_type === "NoSync") { - return n/a - } - return {row.original.sync_interval_min} minutes + { + id: 'auth_type', + header: ({ column }) => ( + + ), + cell: OAuth2Action, + meta: { className: 'w-18 text-center' }, + enableHiding: false, + enableSorting: false }, - meta: { className: 'w-12 text-center' }, - enableHiding: false, - }, - { - id: 'running_state', - header: ({ column }) => ( - - ), - cell: RunningStateCellAction, - meta: { className: 'w-36' }, - enableHiding: false, - }, - { - accessorKey: 'created_at', - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const created_at = row.original.created_at; - const date = format(new Date(created_at), 'yyyy-MM-dd HH:mm:ss'); - return {date}; + { + id: 'account_type', + header: ({ column }) => ( + + ), + cell: ({ row }) => { + return {row.original.account_type} + }, + meta: { className: 'w-18' }, + enableHiding: false, + enableSorting: false }, - meta: { className: 'w-36' }, - enableHiding: false, - }, - { - accessorKey: 'updated_at', - header: ({ column }) => ( - - ), - cell: ({ row }) => { - const updated_at = row.original.updated_at; - const date = format(new Date(updated_at), 'yyyy-MM-dd HH:mm:ss'); - return {date}; + { + accessorKey: "sync_interval_sec", + header: ({ column }) => ( + + ), + cell: ({ row }) => { + let account_type = row.original.account_type; + if (account_type === "NoSync") { + return n/a + } + return {row.original.sync_interval_min} min + }, + //meta: { className: 'w-18 text-center' }, + enableHiding: false, + }, + { + id: 'running_state', + header: ({ column }) => ( + + ), + cell: RunningStateCellAction, + meta: { className: 'w-36' }, + enableHiding: false, + }, + { + accessorKey: 'created_at', + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const created_at = row.original.created_at; + const date = format(new Date(created_at), 'yyyy-MM-dd HH:mm:ss'); + return {date}; + }, + meta: { className: 'w-36' }, + enableHiding: false, + }, + { + accessorKey: 'updated_at', + header: ({ column }) => ( + + ), + cell: ({ row }) => { + const updated_at = row.original.updated_at; + const date = format(new Date(updated_at), 'yyyy-MM-dd HH:mm:ss'); + return {date}; + }, + meta: { className: 'w-36' }, + enableHiding: false, + }, + { + id: 'actions', + cell: DataTableRowActions, }, - meta: { className: 'w-36' }, - enableHiding: false, - }, - { - id: 'actions', - cell: DataTableRowActions, - }, ] } diff --git a/web/src/features/accounts/index.tsx b/web/src/features/accounts/index.tsx index 355c7a7..7757f20 100644 --- a/web/src/features/accounts/index.tsx +++ b/web/src/features/accounts/index.tsx @@ -62,7 +62,7 @@ export default function Accounts() {
-
+
{/* Header Section */}