From 195beec0699e9244fac65ffc06990ea6507b08f4 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 24 Oct 2022 16:52:29 +0100 Subject: [PATCH] ui comments --- .../overview/backups/ActionsRenderer.svelte | 4 +-- .../portal/overview/backups/BackupsTab.svelte | 26 ++++++++++++------- .../overview/backups/CreateBackupModal.svelte | 6 ++++- .../backups/CreateRestoreModal.svelte | 2 +- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte b/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte index db249dd224..b9ca38cf72 100644 --- a/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte +++ b/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte @@ -47,7 +47,7 @@ } async function downloadExport() { - window.location = `/api/apps/${row.appId}/backups/${row._id}/file` + window.open(`/api/apps/${row.appId}/backups/${row._id}/file`, "_blank") } @@ -88,7 +88,7 @@ title="Confirm restore" warning={false} > - {row.name} + {row.name || "Backup"} {new Date(row.timestamp).toLocaleString()} diff --git a/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte b/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte index e5725030d8..958ee995c7 100644 --- a/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte +++ b/packages/builder/src/components/portal/overview/backups/BackupsTab.svelte @@ -26,6 +26,8 @@ import StatusRenderer from "./StatusRenderer.svelte" import TypeRenderer from "./TypeRenderer.svelte" import BackupsDefault from "assets/backups-default.png" + import { onMount } from "svelte" + export let app let backupData = null @@ -149,6 +151,10 @@ await fetchBackups(filterOpt, page) } } + + onMount(() => { + fetchBackups(filterOpt, page, startDate, endDate) + })
@@ -171,14 +177,16 @@
- + {#if $auth.accountPortalAccess} + + {/if}