mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
912 B
TypeScript
35 lines
912 B
TypeScript
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';
|