app export with space in name

This commit is contained in:
Martin McKeaveney 2021-02-05 10:55:54 +00:00
parent 3036378cc0
commit 8d8cdcd732
7 changed files with 16 additions and 11 deletions

View File

@ -14,7 +14,9 @@
async function exportApp() {
appExportLoading = true
try {
download(`/api/backups/export?appId=${_id}&appname=${name}`)
download(
`/api/backups/export?appId=${_id}&appname=${encodeURIComponent(name)}`
)
notifier.success("App Export Complete.")
} catch (err) {
console.error(err)
@ -30,13 +32,13 @@
<Spacer medium />
<div class="card-footer">
<TextButton text medium blue href="/_builder/{_id}">
Open
{name}
Open {name}
</TextButton>
{#if appExportLoading}
<Spinner size="10" />
{:else}<i class="ri-folder-download-line" on:click={exportApp} />{/if}
{:else}
<i class="ri-folder-download-line" on:click={exportApp} />
{/if}
</div>
</div>

View File

@ -30,5 +30,5 @@
"svelte": "^3.30.0",
"svelte-jester": "^1.0.6"
},
"gitHead": "62ebf3cedcd7e9b2494b4f8cbcfb90927609b491"
"gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd"
}

View File

@ -120,5 +120,5 @@
"./scripts/jestSetup.js"
]
},
"gitHead": "62ebf3cedcd7e9b2494b4f8cbcfb90927609b491"
"gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd"
}

View File

@ -4,7 +4,9 @@ const os = require("os")
const fs = require("fs-extra")
exports.exportAppDump = async function(ctx) {
const { appId, appname } = ctx.query
const { appId } = ctx.query
const appname = decodeURI(ctx.query.appname)
const backupsDir = path.join(os.homedir(), ".budibase", "backups")
fs.ensureDirSync(backupsDir)

View File

@ -36,7 +36,7 @@
],
"version": "0.7.3",
"license": "MIT",
"gitHead": "62ebf3cedcd7e9b2494b4f8cbcfb90927609b491",
"gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd",
"dependencies": {
"@budibase/bbui": "^1.55.1",
"@budibase/svelte-ag-grid": "^0.0.16",

View File

@ -32,5 +32,6 @@
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2",
"typescript": "^4.1.3"
}
},
"gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd"
}

View File

@ -34,5 +34,5 @@
"pouchdb-all-dbs": "^1.0.2",
"server-destroy": "^1.0.1"
},
"gitHead": "62ebf3cedcd7e9b2494b4f8cbcfb90927609b491"
"gitHead": "1a80b09fd093f2599a68f7db72ad639dd50922dd"
}