1
0
Fork 0
mirror of synced 2024-09-11 15:08:05 +12:00

autofill restore backup name

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

View file

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

View file

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

View file

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

View file

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

View file

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