autofill restore backup name

This commit is contained in:
Peter Clement 2022-10-24 16:20:03 +01:00
parent f9cd67a279
commit eb190bda0e
5 changed files with 32 additions and 23 deletions

View File

@ -85,7 +85,7 @@
bind:this={restoreDialog}
okText="Continue"
onOk={restoreBackupModal?.show}
title="Confirm Restore"
title="Confirm restore"
warning={false}
>
<Heading size="S">{row.name}</Heading>

View File

@ -10,11 +10,7 @@
onConfirm={() => createManualBackup(name)}
title="Create new backup"
confirmText="Create"
><Input
label="Backup name"
bind:value={name}
placeholder={"test"}
/></ModalContent
><Input label="Backup name" bind:value={name} /></ModalContent
>
<style>

View File

@ -1,15 +1,20 @@
<script>
import { ModalContent, Input, Body } from "@budibase/bbui"
import { auth } from "stores/portal"
$: console.log($auth.user)
export let confirm
let name
let templateName = $auth.user.firstName
? `${$auth.user.firstName}'s Backup`
: "Restore Backup"
let name = templateName
</script>
<ModalContent
onConfirm={() => confirm(name)}
title="Backup your current version"
confirmText="Confirm Restore"
disabled={!name}
>
<Body size="S"
>Create a backup of your current app to allow you to roll back after

View File

@ -1,8 +1,11 @@
<script>
export let value
$: username = value?.firstName
? `${value?.firstName} ${value?.lastName}`
: value?.email
let firstName = value?.firstName
let lastName = value?.lastName || ""
$: username =
firstName && lastName ? `${firstName} ${lastName}` : value?.email
</script>
<div class="cell">

View File

@ -113,18 +113,23 @@
>
Access
</MenuItem>
{#if isPublished}
<MenuItem
on:click={() =>
$goto(
`../../portal/overview/${application}?tab=${encodeURIComponent(
"Automation History"
)}`
)}
>
Automation history
</MenuItem>
{/if}
<MenuItem
on:click={() =>
$goto(
`../../portal/overview/${application}?tab=${encodeURIComponent(
"Automation History"
)}`
)}
>
Automation history
</MenuItem>
<MenuItem
on:click={() =>
$goto(`../../portal/overview/${application}?tab=Backups`)}
>
Backups
</MenuItem>
<MenuItem
on:click={() =>
$goto(`../../portal/overview/${application}?tab=Settings`)}