mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 23:33:50 +08:00
Put application's providers to 2 columns.
This commit is contained in:
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {Link} from "react-router-dom";
|
import {Link} from "react-router-dom";
|
||||||
import {Button, List, Popconfirm, Table, Tooltip} from 'antd';
|
import {Button, Col, List, Popconfirm, Row, Table, Tooltip} from 'antd';
|
||||||
import {EditOutlined} from "@ant-design/icons";
|
import {EditOutlined} from "@ant-design/icons";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import * as Setting from "./Setting";
|
import * as Setting from "./Setting";
|
||||||
@ -171,16 +171,20 @@ class ApplicationListPage extends React.Component {
|
|||||||
title: i18next.t("general:Providers"),
|
title: i18next.t("general:Providers"),
|
||||||
dataIndex: 'providers',
|
dataIndex: 'providers',
|
||||||
key: 'providers',
|
key: 'providers',
|
||||||
width: '300px',
|
// width: '600px',
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
const providers = text;
|
const providers = text;
|
||||||
if (providers.length === 0) {
|
if (providers.length === 0) {
|
||||||
return "(empty)";
|
return "(empty)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const half = Math.floor((providers.length + 1) / 2);
|
||||||
|
|
||||||
|
const getList = (providers) => {
|
||||||
return (
|
return (
|
||||||
<List
|
<List
|
||||||
size="small"
|
size="small"
|
||||||
|
locale={{emptyText: " "}}
|
||||||
dataSource={providers}
|
dataSource={providers}
|
||||||
renderItem={(providerItem, i) => {
|
renderItem={(providerItem, i) => {
|
||||||
return (
|
return (
|
||||||
@ -198,6 +202,24 @@ class ApplicationListPage extends React.Component {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Row>
|
||||||
|
<Col span={12}>
|
||||||
|
{
|
||||||
|
getList(providers.slice(0, half))
|
||||||
|
}
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
{
|
||||||
|
getList(providers.slice(half))
|
||||||
|
}
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user