Improve permission, adapter page UI

This commit is contained in:
Yang Luo 2023-09-24 09:56:06 +08:00
parent d145ab780c
commit 4cc9137637
4 changed files with 29 additions and 9 deletions

View File

@ -227,7 +227,7 @@ class AdapterEditPage extends React.Component {
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("provider:DB Test"), i18next.t("provider:DB Test - Tooltip"))} :
{Setting.getLabel(i18next.t("provider:DB test"), i18next.t("provider:DB test - Tooltip"))} :
</Col>
<Col span={2} >
<Button type={"primary"} onClick={() => {

View File

@ -129,6 +129,13 @@ class AdapterListPage extends BaseListPage {
{text: "Database", value: "Database"},
],
},
{
title: i18next.t("syncer:Database type"),
dataIndex: "databaseType",
key: "databaseType",
width: "120px",
sorter: (a, b) => a.databaseType.localeCompare(b.databaseType),
},
{
title: i18next.t("provider:Host"),
dataIndex: "host",
@ -144,6 +151,12 @@ class AdapterListPage extends BaseListPage {
width: "100px",
sorter: true,
...this.getColumnSearchProps("port"),
render: (text, record, index) => {
if (text === 0) {
return "";
}
return text;
},
},
{
title: i18next.t("general:User"),
@ -161,13 +174,6 @@ class AdapterListPage extends BaseListPage {
sorter: true,
...this.getColumnSearchProps("password"),
},
{
title: i18next.t("syncer:Database type"),
dataIndex: "databaseType",
key: "databaseType",
width: "120px",
sorter: (a, b) => a.databaseType.localeCompare(b.databaseType),
},
{
title: i18next.t("syncer:Database"),
dataIndex: "database",

View File

@ -298,6 +298,13 @@ class PermissionListPage extends BaseListPage {
filterMultiple: false,
width: "120px",
sorter: true,
render: (text, record, index) => {
return (
<Link to={`/users/${record.owner}/${encodeURIComponent(text)}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("permission:Approver"),
@ -306,6 +313,13 @@ class PermissionListPage extends BaseListPage {
filterMultiple: false,
width: "120px",
sorter: true,
render: (text, record, index) => {
return (
<Link to={`/users/${record.owner}/${encodeURIComponent(text)}`}>
{text}
</Link>
);
},
},
{
title: i18next.t("permission:Approve time"),

View File

@ -749,7 +749,7 @@ export function isMobile() {
}
export function getFormattedDate(date) {
if (date === undefined) {
if (!date) {
return null;
}