Pass password
This commit is contained in:
parent
7cfb47c287
commit
4b7af2e16a
|
@ -19,7 +19,7 @@
|
||||||
$: validation.observe("password", password)
|
$: validation.observe("password", password)
|
||||||
|
|
||||||
const Step = { CONFIG: "config", SET_PASSWORD: "set_password" }
|
const Step = { CONFIG: "config", SET_PASSWORD: "set_password" }
|
||||||
let currentStep = Step.SET_PASSWORD
|
let currentStep = Step.CONFIG
|
||||||
|
|
||||||
$: exportButtonText = published ? "Export published" : "Export latest"
|
$: exportButtonText = published ? "Export published" : "Export latest"
|
||||||
$: stepConfig = {
|
$: stepConfig = {
|
||||||
|
@ -44,16 +44,20 @@
|
||||||
if (!$validation.valid) {
|
if (!$validation.valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
exportApp()
|
exportApp(password)
|
||||||
},
|
},
|
||||||
isValid: $validation.valid,
|
isValid: $validation.valid,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const exportApp = () => {
|
const exportApp = password => {
|
||||||
const id = published ? app.prodId : app.devId
|
const id = published ? app.prodId : app.devId
|
||||||
const appName = encodeURIComponent(app.name)
|
const appName = encodeURIComponent(app.name)
|
||||||
window.location = `/api/backups/export?appId=${id}&appname=${appName}&excludeRows=${!includeInternalTablesRows}`
|
let url = `/api/backups/export?appId=${id}&appname=${appName}&excludeRows=${!includeInternalTablesRows}`
|
||||||
|
if (password) {
|
||||||
|
url += `&encryptPassword=${password}`
|
||||||
|
}
|
||||||
|
window.location = url
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue