From 3e7d631031be376e2d83a675a7c3b9ad42275ba4 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 19 Oct 2022 16:08:34 +0100 Subject: [PATCH] add paging and add more custom table renderers --- .../overview/backups/ActionsRenderer.svelte | 1 + .../backups/AutomationsRenderer.svelte | 3 +- .../portal/overview/backups/BackupsTab.svelte | 74 ++++++++++++++----- .../backups/DatasourceRenderer.svelte | 2 +- .../overview/backups/DateRenderer.svelte | 17 +++++ .../overview/backups/DaysRenderer.svelte | 18 +++++ .../overview/backups/ScreensRenderer.svelte | 2 +- .../overview/backups/TriggerRenderer.svelte | 16 ++-- packages/builder/src/stores/portal/backups.js | 4 +- packages/frontend-core/src/api/backups.js | 7 +- 10 files changed, 111 insertions(+), 33 deletions(-) create mode 100644 packages/builder/src/components/portal/overview/backups/DateRenderer.svelte create mode 100644 packages/builder/src/components/portal/overview/backups/DaysRenderer.svelte diff --git a/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte b/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte index 5cf9388adc..094a27bb1e 100644 --- a/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte +++ b/packages/builder/src/components/portal/overview/backups/ActionsRenderer.svelte @@ -21,5 +21,6 @@ flex-direction: row; gap: var(--spacing-m); align-items: center; + margin-left: auto; } diff --git a/packages/builder/src/components/portal/overview/backups/AutomationsRenderer.svelte b/packages/builder/src/components/portal/overview/backups/AutomationsRenderer.svelte index df9a323c7c..eb8eda6b6d 100644 --- a/packages/builder/src/components/portal/overview/backups/AutomationsRenderer.svelte +++ b/packages/builder/src/components/portal/overview/backups/AutomationsRenderer.svelte @@ -2,12 +2,11 @@ import { Icon } from "@budibase/bbui" export let value - $: console.log(value)
-
{value.length}
+
{value?.length}
diff --git a/packages/builder/src/components/portal/overview/backups/DaysRenderer.svelte b/packages/builder/src/components/portal/overview/backups/DaysRenderer.svelte new file mode 100644 index 0000000000..c6fe631663 --- /dev/null +++ b/packages/builder/src/components/portal/overview/backups/DaysRenderer.svelte @@ -0,0 +1,18 @@ + + +
+ {value} + {`day${value == 1 ? "" : "s"} ago`} +
+ + diff --git a/packages/builder/src/components/portal/overview/backups/ScreensRenderer.svelte b/packages/builder/src/components/portal/overview/backups/ScreensRenderer.svelte index afafec0870..f192ee98f1 100644 --- a/packages/builder/src/components/portal/overview/backups/ScreensRenderer.svelte +++ b/packages/builder/src/components/portal/overview/backups/ScreensRenderer.svelte @@ -6,7 +6,7 @@
-
{value.length}
+
{value?.length}