Browse Source

除了弹窗意外的UI做完

main
mm 7 months ago
parent
commit
f990a7778a
  1. 8
      .idea/.gitignore
  2. 6
      .idea/inspectionProfiles/Project_Default.xml
  3. 8
      .idea/modules.xml
  4. 7
      .idea/prettier.xml
  5. 12
      .idea/tron-v1.iml
  6. 6
      .idea/vcs.xml
  7. 25
      next.config.js
  8. 177
      src/app/home/resources2/components/MyResources.tsx
  9. 163
      src/app/home/resources2/components/MyStake.tsx

8
.idea/.gitignore

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

6
.idea/inspectionProfiles/Project_Default.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>

8
.idea/modules.xml

@ -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>

7
.idea/prettier.xml

@ -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>

12
.idea/tron-v1.iml

@ -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>

6
.idea/vcs.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

25
next.config.js

@ -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;

177
src/app/home/resources2/components/MyResources.tsx

@ -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;

163
src/app/home/resources2/components/MyStake.tsx

@ -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;
Loading…
Cancel
Save