1
0
Fork 0
mirror of synced 2024-09-21 20:01:32 +12:00
budibase/packages/builder/src/components/start/ExportAppModal.svelte

17 lines
508 B
Svelte
Raw Normal View History

2022-05-25 20:26:10 +12:00
<script>
import { ModalContent, Toggle } from "@budibase/bbui"
export let app
2022-06-07 02:17:14 +12:00
let excludeRows = false
2022-05-25 20:26:10 +12:00
const exportApp = () => {
const id = app.deployed ? app.prodId : app.devId
const appName = encodeURIComponent(app.name)
2022-06-07 02:17:14 +12:00
window.location = `/api/backups/export?appId=${id}&appname=${appName}&excludeRows=${excludeRows}`
2022-05-25 20:26:10 +12:00
}
</script>
<ModalContent title={"Export"} confirmText={"Export"} onConfirm={exportApp}>
2022-06-07 02:17:14 +12:00
<Toggle text="Exclude Rows" bind:value={excludeRows} />
2022-05-25 20:26:10 +12:00
</ModalContent>