ui comments

This commit is contained in:
Peter Clement 2022-10-24 16:52:29 +01:00
parent 92131a7ccb
commit 2a2f84e927
4 changed files with 25 additions and 13 deletions

View File

@ -47,7 +47,7 @@
} }
async function downloadExport() { async function downloadExport() {
window.location = `/api/apps/${row.appId}/backups/${row._id}/file` window.open(`/api/apps/${row.appId}/backups/${row._id}/file`, "_blank")
} }
</script> </script>
@ -88,7 +88,7 @@
title="Confirm restore" title="Confirm restore"
warning={false} warning={false}
> >
<Heading size="S">{row.name}</Heading> <Heading size="S">{row.name || "Backup"}</Heading>
<Body size="S">{new Date(row.timestamp).toLocaleString()}</Body> <Body size="S">{new Date(row.timestamp).toLocaleString()}</Body>
</ConfirmDialog> </ConfirmDialog>

View File

@ -26,6 +26,8 @@
import StatusRenderer from "./StatusRenderer.svelte" import StatusRenderer from "./StatusRenderer.svelte"
import TypeRenderer from "./TypeRenderer.svelte" import TypeRenderer from "./TypeRenderer.svelte"
import BackupsDefault from "assets/backups-default.png" import BackupsDefault from "assets/backups-default.png"
import { onMount } from "svelte"
export let app export let app
let backupData = null let backupData = null
@ -149,6 +151,10 @@
await fetchBackups(filterOpt, page) await fetchBackups(filterOpt, page)
} }
} }
onMount(() => {
fetchBackups(filterOpt, page, startDate, endDate)
})
</script> </script>
<div class="root"> <div class="root">
@ -171,14 +177,16 @@
</div> </div>
<Divider /> <Divider />
<div class="pro-buttons"> <div class="pro-buttons">
<Button {#if $auth.accountPortalAccess}
newStyles <Button
primary newStyles
disabled={!$auth.accountPortalAccess && $admin.cloud} primary
on:click={$licensing.goToUpgradePage()} disabled={!$auth.accountPortalAccess && $admin.cloud}
> on:click={$licensing.goToUpgradePage()}
Upgrade >
</Button> Upgrade
</Button>
{/if}
<!--Show the view plans button--> <!--Show the view plans button-->
<Button <Button
newStyles newStyles
@ -252,7 +260,7 @@
<div class="align"> <div class="align">
<img <img
width="200px" width="200px"
height="100px" height="120px"
src={BackupsDefault} src={BackupsDefault}
alt="BackupsDefault" alt="BackupsDefault"
/> />

View File

@ -1,9 +1,13 @@
<script> <script>
import { ModalContent, Input } from "@budibase/bbui" import { ModalContent, Input } from "@budibase/bbui"
import { auth } from "stores/portal"
export let createManualBackup export let createManualBackup
let name let templateName = $auth.user.firstName
? `${$auth.user.firstName}'s Backup`
: "New Backup"
let name = templateName
</script> </script>
<ModalContent <ModalContent

View File

@ -1,7 +1,7 @@
<script> <script>
import { ModalContent, Input, Body } from "@budibase/bbui" import { ModalContent, Input, Body } from "@budibase/bbui"
import { auth } from "stores/portal" import { auth } from "stores/portal"
$: console.log($auth.user)
export let confirm export let confirm
let templateName = $auth.user.firstName let templateName = $auth.user.firstName