re-introduce profile export as file
This commit is contained in:
parent
1abcc6935a
commit
a7b3c6d0d0
4 changed files with 18 additions and 7 deletions
|
|
@ -467,13 +467,13 @@
|
||||||
}).request("/data/"+ settings().id + "/" + settings().ver, set);
|
}).request("/data/"+ settings().id + "/" + settings().ver, set);
|
||||||
}
|
}
|
||||||
|
|
||||||
function settingsExport() {
|
function profileExport() {
|
||||||
let name = WIN.prompt("Download Settings Filename", "kiriconf");
|
let name = WIN.prompt("Export Profile Filename", "kiriconf");
|
||||||
if (!name) return;
|
if (!name) return;
|
||||||
let json = API.conf.export(),
|
let json = API.conf.export(),
|
||||||
blob = new Blob([json], {type: "octet/stream"}),
|
blob = new Blob([json], {type: "octet/stream"}),
|
||||||
url = WIN.URL.createObjectURL(blob);
|
url = WIN.URL.createObjectURL(blob);
|
||||||
$('help').innerHTML = `<a id="sexport" href="${url}" download="${name}.b64">x</a>`;
|
$('mod-any').innerHTML = `<a id="sexport" href="${url}" download="${name}.b64">x</a>`;
|
||||||
$('sexport').click();
|
$('sexport').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1865,6 +1865,7 @@
|
||||||
$('set-prefs').onclick = (ev) => { ev.stopPropagation(); API.modal.show('prefs') };
|
$('set-prefs').onclick = (ev) => { ev.stopPropagation(); API.modal.show('prefs') };
|
||||||
$('set-help').onclick = (ev) => { ev.stopPropagation(); API.help.show() };
|
$('set-help').onclick = (ev) => { ev.stopPropagation(); API.help.show() };
|
||||||
$('acct-help').onclick = (ev) => { ev.stopPropagation(); API.help.show() };
|
$('acct-help').onclick = (ev) => { ev.stopPropagation(); API.help.show() };
|
||||||
|
$('acct-export').onclick = (ev) => { ev.stopPropagation(); profileExport() };
|
||||||
$('file-recent').onclick = () => { API.modal.show('files') };
|
$('file-recent').onclick = () => { API.modal.show('files') };
|
||||||
$('file-import').onclick = () => { API.event.import() };
|
$('file-import').onclick = () => { API.event.import() };
|
||||||
$('lt-back').onclick = API.platform.layout;
|
$('lt-back').onclick = API.platform.layout;
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,14 @@
|
||||||
|
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
|
// https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
|
||||||
|
|
||||||
let IDB = self.indexedDB || self.mozIndexedDB || self.webkitIndexedDB || self.msIndexedDB,
|
let IDB, IRR, local = null;
|
||||||
IRR = self.IDBKeyRange,
|
|
||||||
local = null;
|
try {
|
||||||
|
IDB = self.indexedDB || self.mozIndexedDB || self.webkitIndexedDB || self.msIndexedDB;
|
||||||
|
IRR = self.IDBKeyRange;
|
||||||
|
} catch (e) {
|
||||||
|
console.log("in private or restricted browsing mode. database storage blocked. application may not function.");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} dbname
|
* @param {String} dbname
|
||||||
|
|
|
||||||
|
|
@ -855,7 +855,9 @@ th, tr, td {
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
.pop-sep {
|
.pop-sep {
|
||||||
height: 1.5px;
|
border: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
height: 1px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
background-color: #bbb;
|
background-color: #bbb;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@
|
||||||
<div id="lset-da">danish</div>
|
<div id="lset-da">danish</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="acct-export" class="col a-end">
|
||||||
|
<label>export</label>
|
||||||
|
</div>
|
||||||
<div id="acct-help" class="col a-end">
|
<div id="acct-help" class="col a-end">
|
||||||
<label>help</label>
|
<label>help</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue