From 30ae781f053f2236726c83d0aa743ecb28f5be41 Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Thu, 16 Jan 2025 15:29:59 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style(globals):=20Refactor=20del?= =?UTF-8?q?ete=20confirmation=20button=20and=20update=20badge=20styles=20i?= =?UTF-8?q?n=20node=20and=20subscribe=20tables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/app/dashboard/server/node-table.tsx | 32 +++++++++---------- .../dashboard/subscribe/subscribe-table.tsx | 32 +++++++++---------- packages/ui/src/styles/globals.css | 17 +++++----- 3 files changed, 40 insertions(+), 41 deletions(-) diff --git a/apps/admin/app/dashboard/server/node-table.tsx b/apps/admin/app/dashboard/server/node-table.tsx index 7b0e28f..d8a2817 100644 --- a/apps/admin/app/dashboard/server/node-table.tsx +++ b/apps/admin/app/dashboard/server/node-table.tsx @@ -228,9 +228,24 @@ export default function NodeTable() { } }} />, + {t('delete')}} + title={t('confirmDelete')} + description={t('deleteWarning')} + onConfirm={async () => { + await deleteNode({ + id: row.id, + }); + toast.success(t('deleteSuccess')); + ref.current?.refresh(); + }} + cancelText={t('cancel')} + confirmText={t('confirm')} + />, , - {t('delete')}} - title={t('confirmDelete')} - description={t('deleteWarning')} - onConfirm={async () => { - await deleteNode({ - id: row.id, - }); - toast.success(t('deleteSuccess')); - ref.current?.refresh(); - }} - cancelText={t('cancel')} - confirmText={t('confirm')} - />, ], batchRender(rows) { return [ diff --git a/apps/admin/app/dashboard/subscribe/subscribe-table.tsx b/apps/admin/app/dashboard/subscribe/subscribe-table.tsx index a12573f..5d57317 100644 --- a/apps/admin/app/dashboard/subscribe/subscribe-table.tsx +++ b/apps/admin/app/dashboard/subscribe/subscribe-table.tsx @@ -186,7 +186,7 @@ export default function SubscribeTable() { { accessorKey: 'sold', header: t('sold'), - cell: ({ row }) => {row.getValue('sold')}, + cell: ({ row }) => {row.getValue('sold')}, }, ]} actions={{ @@ -215,6 +215,21 @@ export default function SubscribeTable() { } }} />, + {t('delete')}} + title={t('confirmDelete')} + description={t('deleteWarning')} + onConfirm={async () => { + await deleteSubscribe({ + id: row.id!, + }); + toast.success(t('deleteSuccess')); + ref.current?.refresh(); + }} + cancelText={t('cancel')} + confirmText={t('confirm')} + />, , - {t('delete')}} - title={t('confirmDelete')} - description={t('deleteWarning')} - onConfirm={async () => { - await deleteSubscribe({ - id: row.id!, - }); - toast.success(t('deleteSuccess')); - ref.current?.refresh(); - }} - cancelText={t('cancel')} - confirmText={t('confirm')} - />, ], batchRender: (rows) => [