Add password field
This commit is contained in:
parent
1baaab2875
commit
383c7c4b2c
|
@ -1,10 +1,18 @@
|
||||||
<script>
|
<script>
|
||||||
import { ModalContent, Toggle, Body, InlineAlert } from "@budibase/bbui"
|
import {
|
||||||
|
ModalContent,
|
||||||
|
Toggle,
|
||||||
|
Body,
|
||||||
|
InlineAlert,
|
||||||
|
Input,
|
||||||
|
} from "@budibase/bbui"
|
||||||
|
|
||||||
export let app
|
export let app
|
||||||
export let published
|
export let published
|
||||||
let includeInternalTablesRows = true
|
let includeInternalTablesRows = true
|
||||||
let encypt = true
|
let encypt = true
|
||||||
|
let password
|
||||||
|
let passwordError
|
||||||
|
|
||||||
const Step = { CONFIG: "config", SET_PASSWORD: "set_password" }
|
const Step = { CONFIG: "config", SET_PASSWORD: "set_password" }
|
||||||
let currentStep = Step.CONFIG
|
let currentStep = Step.CONFIG
|
||||||
|
@ -27,6 +35,10 @@
|
||||||
title: "Add password to encrypt your export",
|
title: "Add password to encrypt your export",
|
||||||
confirmText: exportButtonText,
|
confirmText: exportButtonText,
|
||||||
onConfirm: () => {
|
onConfirm: () => {
|
||||||
|
if (!password) {
|
||||||
|
passwordError = "Password is required"
|
||||||
|
return false
|
||||||
|
}
|
||||||
exportApp()
|
exportApp()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -44,6 +56,7 @@
|
||||||
confirmText={stepConfig[currentStep].confirmText}
|
confirmText={stepConfig[currentStep].confirmText}
|
||||||
onConfirm={stepConfig[currentStep].onConfirm}
|
onConfirm={stepConfig[currentStep].onConfirm}
|
||||||
>
|
>
|
||||||
|
{#if currentStep === Step.CONFIG}
|
||||||
<Body>
|
<Body>
|
||||||
<Toggle
|
<Toggle
|
||||||
text="Export rows from internal tables"
|
text="Export rows from internal tables"
|
||||||
|
@ -54,6 +67,15 @@
|
||||||
{#if !encypt}
|
{#if !encypt}
|
||||||
<InlineAlert
|
<InlineAlert
|
||||||
header="Do not share your budibase application exports publicly as they may contain sensitive information such as database credentials or secret keys."
|
header="Do not share your budibase application exports publicly as they may contain sensitive information such as database credentials or secret keys."
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
{#if currentStep === Step.SET_PASSWORD}
|
||||||
|
<Input
|
||||||
|
label="Password"
|
||||||
|
placeholder="Type here..."
|
||||||
|
bind:value={password}
|
||||||
|
error={passwordError}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|
Loading…
Reference in New Issue