feat: use MUI Table
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { styled } from '@mui/system';
|
import { styled } from '@mui/system';
|
||||||
import { TextField, Button, Switch, FormControlLabel, Box, Typography, Tabs, Tab } from '@mui/material';
|
import { TextField, Button, Switch, FormControlLabel, Box, Typography, Tabs, Tab, Table, TableContainer, TableHead, TableRow, TableBody, TableCell, Paper } from '@mui/material';
|
||||||
import { sendProxyConfig, getProxyConfig, testProxyConfig, deleteProxyConfig } from '../../api/proxy';
|
import { sendProxyConfig, getProxyConfig, testProxyConfig, deleteProxyConfig } from '../../api/proxy';
|
||||||
import { useGlobalInfoStore } from '../../context/globalInfo';
|
import { useGlobalInfoStore } from '../../context/globalInfo';
|
||||||
|
|
||||||
@@ -144,20 +144,22 @@ const ProxyForm: React.FC = () => {
|
|||||||
<Typography variant="h6" gutterBottom component="div">
|
<Typography variant="h6" gutterBottom component="div">
|
||||||
Current Proxy Configuration
|
Current Proxy Configuration
|
||||||
</Typography>
|
</Typography>
|
||||||
<table style={{ width: '100%', borderCollapse: 'collapse', margin: '30px' }}>
|
<TableContainer component={Paper} sx={{ margin: '30px' }}>
|
||||||
<thead>
|
<Table>
|
||||||
<tr>
|
<TableHead>
|
||||||
<th style={{ border: '1px solid #ddd', padding: '8px' }}>Proxy URL</th>
|
<TableRow>
|
||||||
<th style={{ border: '1px solid #ddd', padding: '8px' }}>Requires Authentication</th>
|
<TableCell>Proxy URL</TableCell>
|
||||||
</tr>
|
<TableCell>Requires Authentication</TableCell>
|
||||||
</thead>
|
</TableRow>
|
||||||
<tbody>
|
</TableHead>
|
||||||
<tr>
|
<TableBody>
|
||||||
<td style={{ border: '1px solid #ddd', padding: '8px' }}>{proxy.proxy_url}</td>
|
<TableRow>
|
||||||
<td style={{ border: '1px solid #ddd', padding: '8px' }}>{proxy.auth ? 'Yes' : 'No'}</td>
|
<TableCell>{proxy.proxy_url}</TableCell>
|
||||||
</tr>
|
<TableCell>{proxy.auth ? 'Yes' : 'No'}</TableCell>
|
||||||
</tbody>
|
</TableRow>
|
||||||
</table>
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</TableContainer>
|
||||||
</Box>
|
</Box>
|
||||||
<Button variant="outlined" color="primary" onClick={testProxy}>
|
<Button variant="outlined" color="primary" onClick={testProxy}>
|
||||||
Test Proxy
|
Test Proxy
|
||||||
|
|||||||
Reference in New Issue
Block a user