9 changed files with 412 additions and 0 deletions
-
8.idea/.gitignore
-
6.idea/inspectionProfiles/Project_Default.xml
-
8.idea/modules.xml
-
7.idea/prettier.xml
-
12.idea/tron-v1.iml
-
6.idea/vcs.xml
-
25next.config.js
-
177src/app/home/resources2/components/MyResources.tsx
-
163src/app/home/resources2/components/MyStake.tsx
@ -0,0 +1,8 @@ |
|||||
|
# 默认忽略的文件 |
||||
|
/shelf/ |
||||
|
/workspace.xml |
||||
|
# 基于编辑器的 HTTP 客户端请求 |
||||
|
/httpRequests/ |
||||
|
# Datasource local storage ignored files |
||||
|
/dataSources/ |
||||
|
/dataSources.local.xml |
@ -0,0 +1,6 @@ |
|||||
|
<component name="InspectionProjectProfileManager"> |
||||
|
<profile version="1.0"> |
||||
|
<option name="myName" value="Project Default" /> |
||||
|
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" /> |
||||
|
</profile> |
||||
|
</component> |
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="ProjectModuleManager"> |
||||
|
<modules> |
||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/tron-v1.iml" filepath="$PROJECT_DIR$/.idea/tron-v1.iml" /> |
||||
|
</modules> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,7 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="PrettierConfiguration"> |
||||
|
<option name="myConfigurationMode" value="AUTOMATIC" /> |
||||
|
<option name="myRunOnSave" value="true" /> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<module type="WEB_MODULE" version="4"> |
||||
|
<component name="NewModuleRootManager"> |
||||
|
<content url="file://$MODULE_DIR$"> |
||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" /> |
||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" /> |
||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" /> |
||||
|
</content> |
||||
|
<orderEntry type="inheritedJdk" /> |
||||
|
<orderEntry type="sourceFolder" forTests="false" /> |
||||
|
</component> |
||||
|
</module> |
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="VcsDirectoryMappings"> |
||||
|
<mapping directory="" vcs="Git" /> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,25 @@ |
|||||
|
/** @type {import('next').NextConfig} */ |
||||
|
const withLess = require('next-with-less'); |
||||
|
|
||||
|
const nextConfig = { |
||||
|
webpack: (config) => { |
||||
|
config.module.rules.push({ |
||||
|
test: /\.less$/, |
||||
|
use: [ |
||||
|
'style-loader', |
||||
|
'css-loader', |
||||
|
{ |
||||
|
loader: 'less-loader', |
||||
|
options: { |
||||
|
lessOptions: { |
||||
|
javascriptEnabled: true, |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
}); |
||||
|
return config; |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
module.exports = nextConfig; |
@ -0,0 +1,177 @@ |
|||||
|
"use client"; |
||||
|
import React from "react"; |
||||
|
import { |
||||
|
Button, |
||||
|
Card, |
||||
|
Col, |
||||
|
Dropdown, |
||||
|
Row, |
||||
|
Space, |
||||
|
Table, |
||||
|
Tabs, |
||||
|
type TabsProps, |
||||
|
Typography, |
||||
|
} from "antd"; |
||||
|
import { CalculatorOutlined, MoreOutlined } from "@ant-design/icons"; |
||||
|
import Link from "antd/lib/typography/Link"; |
||||
|
import MyStake from "@/app/home/resources2/components/MyStake"; |
||||
|
|
||||
|
const { Text } = Typography; |
||||
|
|
||||
|
const MyResources = () => { |
||||
|
const columns_key1 = [ |
||||
|
{ |
||||
|
title: "资源类型", |
||||
|
dataIndex: "name", |
||||
|
key: "name", |
||||
|
}, |
||||
|
{ |
||||
|
title: "获取资源数量", |
||||
|
dataIndex: "quantity", |
||||
|
key: "quantity", |
||||
|
}, |
||||
|
{ |
||||
|
title: "质押数量", |
||||
|
dataIndex: "name", |
||||
|
key: "name", |
||||
|
}, |
||||
|
{ |
||||
|
title: "最后操作时间 (UTC)", |
||||
|
dataIndex: "quantity", |
||||
|
key: "quantity", |
||||
|
}, |
||||
|
{ |
||||
|
title: "操作", |
||||
|
render: () => { |
||||
|
return ( |
||||
|
<Dropdown menu={{ items }}> |
||||
|
<MoreOutlined /> |
||||
|
</Dropdown> |
||||
|
); |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
const items: TabsProps["items"] = [ |
||||
|
{ |
||||
|
key: "1", |
||||
|
label: "质押获得", |
||||
|
children: <Table dataSource={[]} columns={columns_key1} />, |
||||
|
}, |
||||
|
{ |
||||
|
key: "2", |
||||
|
label: "他人代理给自己", |
||||
|
children: <Table dataSource={[]} columns={columns_key1} />, |
||||
|
}, |
||||
|
{ |
||||
|
key: "3", |
||||
|
label: "代理给他人", |
||||
|
children: <Table dataSource={[]} columns={columns_key1} />, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
return ( |
||||
|
<Space direction={"vertical"} size={[16, 16]} style={{ width: "100%" }}> |
||||
|
<Row gutter={[16, 16]}> |
||||
|
<Col xs={24} sm={12} lg={12}> |
||||
|
<Card |
||||
|
style={{ backgroundColor: "#fffbf6" }} |
||||
|
title={ |
||||
|
<div |
||||
|
style={{ |
||||
|
display: "flex", |
||||
|
justifyContent: "space-between", |
||||
|
alignItems: "center", |
||||
|
}} |
||||
|
> |
||||
|
<div>我的能量</div> |
||||
|
<Space> |
||||
|
<CalculatorOutlined /> |
||||
|
<Link>去管理</Link> |
||||
|
</Space> |
||||
|
</div> |
||||
|
} |
||||
|
> |
||||
|
<Space direction={"vertical"}> |
||||
|
<Space> |
||||
|
<Text>可用:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>已使用:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>质押获得:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>他人代理给自己:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>代理给他人:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Button>获取能量</Button> |
||||
|
<Button>代理给他人</Button> |
||||
|
</Space> |
||||
|
</Space> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
<Col xs={24} sm={12} lg={12}> |
||||
|
<Card |
||||
|
title={ |
||||
|
<div |
||||
|
style={{ |
||||
|
display: "flex", |
||||
|
justifyContent: "space-between", |
||||
|
alignItems: "center", |
||||
|
}} |
||||
|
> |
||||
|
<div>我的带宽</div> |
||||
|
<Space> |
||||
|
<CalculatorOutlined /> |
||||
|
</Space> |
||||
|
</div> |
||||
|
} |
||||
|
> |
||||
|
<Space direction={"vertical"}> |
||||
|
<Space> |
||||
|
<Text>可用:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>已使用:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>质押获得:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>他人代理给自己:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>代理给他人:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Button>获取带宽</Button> |
||||
|
<Button>代理给他人</Button> |
||||
|
</Space> |
||||
|
</Space> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
<Card title={"资源明细"}> |
||||
|
{" "} |
||||
|
<Tabs defaultActiveKey="1" items={items} /> |
||||
|
</Card> |
||||
|
</Space> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default MyResources; |
@ -0,0 +1,163 @@ |
|||||
|
"use client"; |
||||
|
import React from "react"; |
||||
|
import { |
||||
|
Button, |
||||
|
Card, |
||||
|
Col, |
||||
|
Dropdown, |
||||
|
Row, |
||||
|
Space, |
||||
|
Table, |
||||
|
Tabs, |
||||
|
type TabsProps, |
||||
|
Typography, |
||||
|
} from "antd"; |
||||
|
import { CalculatorOutlined, MoreOutlined } from "@ant-design/icons"; |
||||
|
import Link from "antd/lib/typography/Link"; |
||||
|
|
||||
|
const { Text } = Typography; |
||||
|
|
||||
|
const MyStake = () => { |
||||
|
const columns_key1 = [ |
||||
|
{ |
||||
|
title: "资源类型", |
||||
|
dataIndex: "name", |
||||
|
key: "name", |
||||
|
}, |
||||
|
{ |
||||
|
title: "获取资源数量", |
||||
|
dataIndex: "quantity", |
||||
|
key: "quantity", |
||||
|
}, |
||||
|
{ |
||||
|
title: "质押数量", |
||||
|
dataIndex: "name", |
||||
|
key: "name", |
||||
|
}, |
||||
|
{ |
||||
|
title: "最后操作时间 (UTC)", |
||||
|
dataIndex: "quantity", |
||||
|
key: "quantity", |
||||
|
}, |
||||
|
{ |
||||
|
title: "操作", |
||||
|
render: () => { |
||||
|
return ( |
||||
|
<Dropdown menu={{ items }}> |
||||
|
<MoreOutlined /> |
||||
|
</Dropdown> |
||||
|
); |
||||
|
}, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
const items: TabsProps["items"] = [ |
||||
|
{ |
||||
|
key: "1", |
||||
|
label: "质押中", |
||||
|
children: <Table dataSource={[]} columns={columns_key1} />, |
||||
|
}, |
||||
|
{ |
||||
|
key: "2", |
||||
|
label: "解锁中", |
||||
|
children: <Table dataSource={[]} columns={columns_key1} />, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
return ( |
||||
|
<Space direction={"vertical"} size={[16, 16]} style={{ width: "100%" }}> |
||||
|
<Row gutter={[16, 16]}> |
||||
|
<Col xs={24} sm={12} lg={12}> |
||||
|
<Card |
||||
|
style={{ backgroundColor: "#fffbf6", height: 230 }} |
||||
|
title={ |
||||
|
<div |
||||
|
style={{ |
||||
|
display: "flex", |
||||
|
justifyContent: "space-between", |
||||
|
alignItems: "center", |
||||
|
}} |
||||
|
> |
||||
|
<div>质押中</div> |
||||
|
</div> |
||||
|
} |
||||
|
> |
||||
|
<Space direction={"vertical"}> |
||||
|
<Space> |
||||
|
<Text>数量:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>能量:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Text>带宽:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Space> |
||||
|
<Button>质押TRX</Button> |
||||
|
<Button>解锁TRX</Button> |
||||
|
</Space> |
||||
|
</Space> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
<Col xs={24} sm={6} lg={6}> |
||||
|
<Card |
||||
|
style={{ backgroundColor: "#e7daca", height: 230 }} |
||||
|
title={ |
||||
|
<div |
||||
|
style={{ |
||||
|
display: "flex", |
||||
|
justifyContent: "space-between", |
||||
|
alignItems: "center", |
||||
|
}} |
||||
|
> |
||||
|
<div>解锁中</div> |
||||
|
</div> |
||||
|
} |
||||
|
> |
||||
|
<Space direction={"vertical"}> |
||||
|
<Space> |
||||
|
<Text>数量:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Text>当前有 0 笔解锁中的交易</Text> |
||||
|
</Space> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
<Col xs={24} sm={6} lg={6}> |
||||
|
<Card |
||||
|
style={{ backgroundColor: "#dee0cd", height: 230 }} |
||||
|
title={ |
||||
|
<div |
||||
|
style={{ |
||||
|
display: "flex", |
||||
|
justifyContent: "space-between", |
||||
|
alignItems: "center", |
||||
|
}} |
||||
|
> |
||||
|
<div>待提取</div> |
||||
|
</div> |
||||
|
} |
||||
|
> |
||||
|
<Space direction={"vertical"}> |
||||
|
<Space> |
||||
|
<Text>数量:</Text> |
||||
|
<Text>0</Text> |
||||
|
</Space> |
||||
|
<Text>当前有 0 笔解锁中的交易</Text> |
||||
|
<Button>提取TRX</Button> |
||||
|
</Space> |
||||
|
</Card> |
||||
|
</Col> |
||||
|
</Row> |
||||
|
<Card title={"TRX 明细"}> |
||||
|
{" "} |
||||
|
<Tabs defaultActiveKey="1" items={items} /> |
||||
|
</Card> |
||||
|
</Space> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default MyStake; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue