export filename control
This commit is contained in:
parent
aa1053452c
commit
81f1e6d116
1 changed files with 5 additions and 5 deletions
|
|
@ -465,11 +465,11 @@ var gs_kiri_init = exports;
|
|||
}
|
||||
|
||||
function settingsExport() {
|
||||
if (!confirm('Download Kiri:Moto Settings?')) return;
|
||||
let json = API.conf.export();
|
||||
let blob = new Blob([json], {type: "octet/stream"});
|
||||
let url = WIN.URL.createObjectURL(blob);
|
||||
$('help').innerHTML = `<a id="sexport" href="${url}" download="kiriconf.b64">x</a>`;
|
||||
let name = WIN.prompt("Download Settings Filename", "kiriconf");
|
||||
if (!name) return;
|
||||
let json = API.conf.export(),
|
||||
url = WIN.URL.createObjectURL(new Blob([json], {type: "octet/stream"}));
|
||||
$('help').innerHTML = `<a id="sexport" href="${url}" download="${name}.b64">x</a>`;
|
||||
$('sexport').click();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue