This commit is contained in:
p 2023-09-13 20:32:53 +05:30
commit 25a59b6b39

View file

@ -152,153 +152,6 @@ const TorrentList = ({ setisTorrent, torrent_list, runtime }) => {
const columns = [
{
name: 'Name',
selector: row => row.name,
sortable: true,
},
{
name: 'Action',
cell: (row, index) => {
let slug = row?.name.toLowerCase().trim().replace(/[^\w\s-]/g, '').replace(/[\s_-]+/g, '-').replace(/^-+|-+$/g, '');
return (
<a onClick={() => router.push(`/post-detail/${row?.eid}/${slug}/`)}>
Download
</a>
)
},
width: "10%",
style: {
color: "#296ac8",
cursor: "pointer",
}
},
{
name: 'Category',
selector: row => row.category_str,
width: "10%",
sortable: true,
},
{
name: 'Date',
selector: row => moment(row?.last_checked).format("DD-MM-YYYY"),
width: "10%",
sortable: true,
},
{
name: 'Runtime',
selector: row => moment.utc(runtime * 1000).format('HH:mm:ss'),
width: "11%",
sortable: true,
},
{
name: 'Size',
selector: row => formatBytes(row?.size),
sortable: true,
width: "10%",
sortFunction: (a, b) => {
return a.size - b.size;
},
},
{
name: 'S',
selector: row => row?.seeders,
sortable: true,
width: "6%",
style: {
color: "#00FF00",
}
},
{
name: 'L',
selector: row => row.leechers,
sortable: true,
width: "6%",
style: {
color: "#dd0c0e",
}
},
];
createTheme('dark', {
background: {
@ -311,28 +164,7 @@ const TorrentList = ({ setisTorrent, torrent_list, runtime }) => {
const customCss = {
headCells: {
style: {
fontSize: "14px",
fontWeight: "700",
color: "#C2D8D3"
},
},
};
return (