diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/backups/index.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/backups/index.svelte
index 61f7ab9ae4..ebf50a8df1 100644
--- a/packages/builder/src/pages/builder/portal/overview/[appId]/backups/index.svelte
+++ b/packages/builder/src/pages/builder/portal/overview/[appId]/backups/index.svelte
@@ -16,7 +16,7 @@
Table,
Page,
} from "@budibase/bbui"
- import { backups, licensing, auth, admin } from "stores/portal"
+ import { backups, licensing, auth, admin, overview } from "stores/portal"
import { createPaginationStore } from "helpers/pagination"
import DateRenderer from "components/common/renderers/DateTimeRenderer.svelte"
import AppSizeRenderer from "./_components/AppSizeRenderer.svelte"
@@ -29,7 +29,6 @@
import BackupsDefault from "assets/backups-default.png"
import { BackupTrigger, BackupType } from "constants/backend/backups"
import { onMount } from "svelte"
- export let app
let backupData = null
let modal
@@ -61,6 +60,7 @@
},
]
+ $: app = $overview.selectedApp
$: page = $pageInfo.page
$: fetchBackups(filterOpt, page, startDate, endDate)
@@ -171,67 +171,56 @@
})
-
+
+
+
+ Backups
+ {#if !$licensing.backupsEnabled}
+
+ Pro plan
+
+ {/if}
+
+ Back up your apps and restore them to their previous state
+
+
+
{#if !$licensing.backupsEnabled}
-
-
-
- Backups
-
- Pro plan
-
-
+ {#if !$auth.accountPortalAccess && !$licensing.groupsEnabled && $admin.cloud}
+ Contact your account holder to upgrade your plan.
+ {/if}
+
+ {#if $auth.accountPortalAccess}
+
+ Upgrade
+
+ {/if}
+ {
+ window.open("https://budibase.com/pricing/", "_blank")
+ }}
+ >
+ View plans
+
+
+ {:else if backupData?.length === 0 && loaded && !filterOpt && !startDate}
+
+
+
+
+ You have no backups yet
+ You can manually back up your app any time
+
-
- Back up your apps and restore them to their previous state.
- {#if !$auth.accountPortalAccess && !$licensing.groupsEnabled && $admin.cloud}
- Contact your account holder to upgrade your plan.
- {/if}
-
-
-
-
- {#if $auth.accountPortalAccess}
-
- Upgrade
-
- {/if}
-
- {
- window.open("https://budibase.com/pricing/", "_blank")
- }}
- >
- View plans
-
+ Create backup
-
- {:else if backupData?.length === 0 && !loaded && !filterOpt && !startDate}
-
-
-
-
- You have no backups yet
-
- You can manually backup your app any time
-
-
- Create Backup
-
-
-
-
+
{:else if loaded}
@@ -245,23 +234,21 @@
bind:value={filterOpt}
/>
-
- {
- if (e.detail[0].length > 1) {
- startDate = e.detail[0][0].toISOString()
- endDate = e.detail[0][1].toISOString()
- }
- }}
- />
-
+ {
+ if (e.detail[0].length > 1) {
+ startDate = e.detail[0][0].toISOString()
+ endDate = e.detail[0][1].toISOString()
+ }
+ }}
+ />
@@ -289,19 +276,19 @@
{/if}
-
+