mirror of https://github.com/msgbyte/tailchat
feat: 增加socket.io admin
parent
0a22d4c581
commit
9f71fc05e4
@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import { Typography, CardActions, Button, Box } from '@mui/material';
|
||||
import { Card, CardContent } from '@mui/material';
|
||||
|
||||
/**
|
||||
* SocketIO 管理
|
||||
*/
|
||||
export const SocketIOAdmin: React.FC = React.memo(() => {
|
||||
return (
|
||||
<Box p={4}>
|
||||
<Card>
|
||||
<CardContent>
|
||||
<Typography component="div">
|
||||
服务器URL为: <strong>ws://{window.location.host}</strong>
|
||||
</Typography>
|
||||
<Typography component="div">
|
||||
账号密码为Tailchat后台的账号密码
|
||||
</Typography>
|
||||
</CardContent>
|
||||
<CardActions>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={() => {
|
||||
window.open('https://admin.socket.io/');
|
||||
}}
|
||||
>
|
||||
打开管理平台
|
||||
</Button>
|
||||
</CardActions>
|
||||
</Card>
|
||||
</Box>
|
||||
);
|
||||
});
|
||||
SocketIOAdmin.displayName = 'SocketIOAdmin';
|
Loading…
Reference in New Issue