From fe10966fbc844e1c4bf5a22c32ab5539a4f7ce62 Mon Sep 17 00:00:00 2001 From: Jacky Date: Wed, 9 Apr 2025 14:32:48 +0000 Subject: [PATCH] refactor: update SiteStatusSegmented styles and adjust column widths in site list --- .../components/SiteStatusSegmented.vue | 2 -- app/src/views/site/site_list/columns.tsx | 31 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/src/views/site/site_edit/components/SiteStatusSegmented.vue b/app/src/views/site/site_edit/components/SiteStatusSegmented.vue index 66fcb940..547a6b27 100644 --- a/app/src/views/site/site_edit/components/SiteStatusSegmented.vue +++ b/app/src/views/site/site_edit/components/SiteStatusSegmented.vue @@ -192,7 +192,5 @@ function onChangeStatus(value: string | number) { :deep(.ant-segmented-item-selected) { border-radius: 6px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); - transition: all 0.3s ease; } diff --git a/app/src/views/site/site_list/columns.tsx b/app/src/views/site/site_list/columns.tsx index bb107bf4..e3f370a2 100644 --- a/app/src/views/site/site_list/columns.tsx +++ b/app/src/views/site/site_list/columns.tsx @@ -22,7 +22,7 @@ const columns: Column[] = [{ type: input, }, search: true, - width: 170, + width: 150, customRender: ({ text, record }) => { const template: JSXElements = [] @@ -39,16 +39,18 @@ const columns: Column[] = [{ record.urls.forEach((url: string) => { const displayUrl = url.replace(/^https?:\/\//, '') urlsContainer.push( - - {displayUrl} - , + + + {displayUrl} + + , ) }) } else { record.urls.forEach((url: string) => { const displayUrl = url.replace(/^https?:\/\//, '') - urlsContainer.push({displayUrl}) + urlsContainer.push({displayUrl}) }) } @@ -75,7 +77,14 @@ const columns: Column[] = [{ sorter: true, pithy: true, batch: true, - width: 120, + width: 100, +}, { + title: () => $gettext('Updated at'), + dataIndex: 'modified_at', + customRender: datetime, + sorter: true, + pithy: true, + width: 150, }, { title: () => $gettext('Status'), dataIndex: 'status', @@ -105,14 +114,8 @@ const columns: Column[] = [{ }, sorter: true, pithy: true, - width: 150, -}, { - title: () => $gettext('Updated at'), - dataIndex: 'modified_at', - customRender: datetime, - sorter: true, - pithy: true, - width: 150, + width: 110, + fixed: 'right', }, { title: () => $gettext('Action'), dataIndex: 'action',