fix sync test button
This commit is contained in:
@@ -514,7 +514,7 @@ function UserRules() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack spacing={3}>
|
<Stack spacing={3}>
|
||||||
<Stack direction="row" spacing={2} useFlexGap flexWrap="wrap">
|
<Stack direction="row" alignItems="center" spacing={2} useFlexGap flexWrap="wrap">
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import { useMemo, useState } from "react";
|
|||||||
import { syncAll } from "../../libs/sync";
|
import { syncAll } from "../../libs/sync";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import { useAlert } from "../../hooks/Alert";
|
import { useAlert } from "../../hooks/Alert";
|
||||||
|
import SyncIcon from "@mui/icons-material/Sync";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
|
||||||
export default function SyncSetting() {
|
export default function SyncSetting() {
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
@@ -76,15 +78,17 @@ export default function SyncSetting() {
|
|||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Stack direction="row" spacing={2} useFlexGap flexWrap="wrap">
|
<Stack direction="row" alignItems="center" spacing={2} useFlexGap flexWrap="wrap">
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
disabled={!syncUrl || !syncKey || loading}
|
disabled={!syncUrl || !syncKey || loading}
|
||||||
onClick={handleSyncTest}
|
onClick={handleSyncTest}
|
||||||
|
startIcon={<SyncIcon />}
|
||||||
>
|
>
|
||||||
{i18n("data_sync_test")}
|
{i18n("data_sync_test")}
|
||||||
</Button>
|
</Button>
|
||||||
|
{loading && <CircularProgress size={16} />}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user