blob: 0a19f2a9af238b94c4e0dec659e9405300873b54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import { useCreateBackups, useSystemBackups } from "@/apis/hooks";
import { Toolbox } from "@/components";
import { QueryOverlay } from "@/components/async";
import { faFileArchive } from "@fortawesome/free-solid-svg-icons";
import { Container } from "@mantine/core";
import { useDocumentTitle } from "@mantine/hooks";
import { FunctionComponent } from "react";
import Table from "./table";
const SystemBackupsView: FunctionComponent = () => {
const backups = useSystemBackups();
const { mutate: backup, isLoading: isResetting } = useCreateBackups();
useDocumentTitle("Backups - Bazarr (System)");
return (
<QueryOverlay result={backups}>
<Container fluid px={0}>
<Toolbox>
<Toolbox.Button
icon={faFileArchive}
loading={isResetting}
onClick={() => backup()}
>
Backup Now
</Toolbox.Button>
</Toolbox>
<Table backups={backups.data ?? []}></Table>
</Container>
</QueryOverlay>
);
};
export default SystemBackupsView;
|