Localize kanban, auth, backup, and admin utilities

This commit is contained in:
cesnimda
2026-03-23 21:05:49 +01:00
parent 9661a321da
commit 2c03379504
11 changed files with 181 additions and 75 deletions
+7 -5
View File
@@ -3,9 +3,11 @@ import React, { useState } from "react";
import { Box, Button, Paper, Typography } from "@mui/material";
import { api } from "../api";
import { useToast } from "../toast";
import { useI18n } from "../i18n/I18nProvider";
export default function BackupCard() {
const { toast } = useToast();
const { t } = useI18n();
const [downloading, setDownloading] = useState(false);
const downloadEncrypted = async () => {
@@ -25,9 +27,9 @@ export default function BackupCard() {
link.click();
link.remove();
window.setTimeout(() => URL.revokeObjectURL(url), 5000);
toast("Backup downloaded.", "success");
toast(t("backupDownloaded"), "success");
} catch {
toast("Backup failed.", "error");
toast(t("backupFailed"), "error");
} finally {
setDownloading(false);
}
@@ -36,14 +38,14 @@ export default function BackupCard() {
return (
<Paper sx={{ mt: 2, p: 2 }}>
<Typography variant="h6" sx={{ mb: 1 }}>
Data Safety
{t("backupTitle")}
</Typography>
<Typography sx={{ color: "text.secondary", mb: 1 }}>
One-click encrypted backup (Windows DPAPI).
{t("backupBody")}
</Typography>
<Box sx={{ display: "flex", gap: 1, flexWrap: "wrap" }}>
<Button variant="contained" onClick={downloadEncrypted} disabled={downloading}>
{downloading ? "Preparing..." : "Download Encrypted Backup"}
{downloading ? t("backupPreparing") : t("backupDownload")}
</Button>
</Box>
</Paper>