This commit is contained in:
2022-03-31 12:25:54 +08:00
parent 7e4c106683
commit a67715a2a0
7 changed files with 38 additions and 37 deletions

View File

@@ -172,12 +172,12 @@ export default function Time(props) {
}}
>
<TextField
label="Name"
label="名称"
value={newName}
onChange={(e) => setNewName(e.target.value)}
/>
<TextField
label="Range"
label="时间段"
value={range}
onChange={(e) => setRange(e.target.value)}
placeholder="2022-01-01 00:00:00"
@@ -188,7 +188,7 @@ export default function Time(props) {
color="primary"
onClick={() => addRange()}
>
Add
添加
</Button>
<Box
sx={{
@@ -196,7 +196,7 @@ export default function Time(props) {
}}
>
<TextField
label="Limit"
label="每人数量上限"
value={limit}
onChange={(e) => setLimit(e.target.value)}
/>
@@ -207,7 +207,7 @@ export default function Time(props) {
updateLimit(limit);
}}
>
Update Limit
修改上限
</Button>
</Box>
</Box>
@@ -224,10 +224,10 @@ export default function Time(props) {
<Table>
<TableHead>
<TableRow>
<TableCell>Name</TableCell>
<TableCell>Range</TableCell>
<TableCell>Taken</TableCell>
<TableCell>Action</TableCell>
<TableCell>名称</TableCell>
<TableCell>时间段</TableCell>
<TableCell>姓名</TableCell>
<TableCell>操作</TableCell>
</TableRow>
</TableHead>
<TableBody>
@@ -246,7 +246,7 @@ export default function Time(props) {
color="primary"
onClick={() => updateUsername(range.id, props.username)}
>
Take
</Button>
{isAdmin() && (
<Button
@@ -257,7 +257,7 @@ export default function Time(props) {
color="secondary"
onClick={() => deleteRange(range.id)}
>
Delete
删除
</Button>
)}
</TableCell>
@@ -289,7 +289,7 @@ export default function Time(props) {
onClose={() => setSnackbarSuccess(false)}
severity="success"
>
Success!
操作成功
</Alert>
</Snackbar>
</Container>