Skip to content

Commit f463471

Browse files
committed
add client_protocol,plugin_setting
1 parent 8e11da1 commit f463471

File tree

13 files changed

+6997
-4640
lines changed

13 files changed

+6997
-4640
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
24+
.idea

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@types/react": "^17.0.0",
1414
"@types/react-dom": "^17.0.0",
1515
"antd": "^4.16.7",
16-
"axios": "^0.21.1",
16+
"axios": "^0.21.4",
1717
"long": "^4.0.0",
1818
"protobufjs": "^6.11.2",
1919
"qrcode.react": "^1.0.1",
@@ -49,4 +49,4 @@
4949
"last 1 safari version"
5050
]
5151
}
52-
}
52+
}

src/App.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { useState } from 'react';
22
import './App.css';
33
import { Layout, Button, Row, Col, notification, Empty } from 'antd';
4-
import { GithubOutlined } from '@ant-design/icons'
4+
import { GithubOutlined, SettingOutlined } from '@ant-design/icons'
55
import BotCard from './components/BotCard'
66
import QRCodeLogin from './components/QRCodeLogin'
77
import PasswordLogin from './components/PasswordLogin'
8+
import PluginSetting from "./components/PluginSetting";
89
import { useInterval } from './utils/interval'
910
import { service } from './api/RpcImpl'
1011
import { dto } from './api/gen/proto';
@@ -13,6 +14,7 @@ const { Header, Content } = Layout;
1314
const App = () => {
1415
const [showQRCodeLogin, setShowQRCodeLogin] = useState<boolean>(false);
1516
const [showPasswordLogin, setShowPasswordLogin] = useState<boolean>(false);
17+
const [showSetting, setShowSetting] = useState<boolean>(false);
1618

1719
const [listBotResp, setListBotResp] = useState<dto.IListBotResp>({});
1820
useInterval(async () => {
@@ -36,12 +38,12 @@ const App = () => {
3638
<Content>
3739
<div >
3840
<Button style={{ margin: "20px 8px" }} type="primary" onClick={() => setShowQRCodeLogin(true)}>扫码创建</Button>
39-
<QRCodeLogin isVisible={showQRCodeLogin} onClose={() => { setShowQRCodeLogin(false) }}></QRCodeLogin>
41+
<QRCodeLogin isVisible={showQRCodeLogin} onClose={() => { setShowQRCodeLogin(false) }}/>
4042
<Button style={{ margin: "20px 8px" }} type="primary" onClick={() => setShowPasswordLogin(true)}>密码创建</Button>
41-
<PasswordLogin isVisible={showPasswordLogin} onClose={() => { setShowPasswordLogin(false) }}></PasswordLogin>
42-
<Button style={{ margin: "20px 8px" }} icon={<GithubOutlined />} href="https://github.com/ProtobufBot/ProtobufBot" target="_blank">
43-
GitHub
44-
</Button>
43+
<PasswordLogin isVisible={showPasswordLogin} onClose={() => { setShowPasswordLogin(false) }}/>
44+
<Button style={{ margin: "20px 8px" }} shape="circle" icon={<SettingOutlined />} onClick={() => setShowSetting(true)}/>
45+
<PluginSetting isVisible={showSetting} onClose={() => { setShowSetting(false) }}/>
46+
<Button style={{ margin: "20px 8px" }} shape="circle" icon={<GithubOutlined />} href="https://github.com/ProtobufBot/ProtobufBot" target="_blank"/>
4547
</div>
4648
{!!listBotResp && !!listBotResp.botList ?
4749
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }} style={{ margin: '20px' }}>

0 commit comments

Comments
 (0)