diff --git a/bazarr/app/ui.py b/bazarr/app/ui.py index 7551ab115..dd1da3592 100644 --- a/bazarr/app/ui.py +++ b/bazarr/app/ui.py @@ -131,6 +131,12 @@ def movies_images(url): return Response(stream_with_context(req.iter_content(2048)), content_type=req.headers['content-type']) +@check_login +@ui_bp.route('/system/backup/download/', methods=['GET']) +def backup_download(filename): + return send_file(os.path.join(settings.backup.folder, filename), cache_timeout=0, as_attachment=True) + + def configured(): System.update({System.configured: '1'}).execute() diff --git a/frontend/src/pages/System/Backups/table.tsx b/frontend/src/pages/System/Backups/table.tsx index ca2c04e46..1a2801b85 100644 --- a/frontend/src/pages/System/Backups/table.tsx +++ b/frontend/src/pages/System/Backups/table.tsx @@ -2,9 +2,10 @@ import { useDeleteBackups, useRestoreBackups } from "@/apis/hooks"; import { Action, PageTable } from "@/components"; import { useModals } from "@/modules/modals"; import { useTableStyles } from "@/styles"; +import { Environment } from "@/utilities"; import { faClock, faHistory, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { Group, Text } from "@mantine/core"; +import { Anchor, Group, Text } from "@mantine/core"; import { FunctionComponent, useMemo } from "react"; import { Column } from "react-table"; @@ -23,8 +24,13 @@ const Table: FunctionComponent = ({ backups }) => { Header: "Name", accessor: "filename", Cell: ({ value }) => { - const { classes } = useTableStyles(); - return {value}; + return ( + + {value} + + ); }, }, {