Add button to view exports when exported (#20682)

This commit is contained in:
Nicolas Mowen 2025-10-26 12:11:48 -06:00 committed by GitHub
parent 190925375b
commit 43706eb48d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 2 deletions

View File

@ -52,7 +52,7 @@
"export": "Export",
"selectOrExport": "Select or Export",
"toast": {
"success": "Successfully started export. View the file in the /exports folder.",
"success": "Successfully started export. View the file in the exports page.",
"error": {
"failed": "Failed to start export: {{error}}",
"endTimeMustAfterStartTime": "End time must be after start time",

View File

@ -34,7 +34,7 @@ import { toast } from "sonner";
import useKeyboardListener from "@/hooks/use-keyboard-listener";
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
import { capitalizeFirstLetter } from "@/utils/stringUtil";
import { buttonVariants } from "../ui/button";
import { Button, buttonVariants } from "../ui/button";
import { Trans, useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
@ -83,6 +83,11 @@ export default function ReviewCard({
if (response.status == 200) {
toast.success(t("export.toast.success"), {
position: "top-center",
action: (
<a href="/export" target="_blank" rel="noopener noreferrer">
<Button>View</Button>
</a>
),
});
}
})

View File

@ -95,6 +95,11 @@ export default function ExportDialog({
if (response.status == 200) {
toast.success(t("export.toast.success"), {
position: "top-center",
action: (
<a href="/export" target="_blank" rel="noopener noreferrer">
<Button>View</Button>
</a>
),
});
setName("");
setRange(undefined);

View File

@ -104,6 +104,11 @@ export default function MobileReviewSettingsDrawer({
t("export.toast.success", { ns: "components/dialog" }),
{
position: "top-center",
action: (
<a href="/export" target="_blank" rel="noopener noreferrer">
<Button>View</Button>
</a>
),
},
);
setName("");

View File

@ -202,6 +202,11 @@ export default function EventView({
t("export.toast.success", { ns: "components/dialog" }),
{
position: "top-center",
action: (
<a href="/export" target="_blank" rel="noopener noreferrer">
<Button>View</Button>
</a>
),
},
);
}