mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
Cloud support / Dropbox OAuth reference client (#659)
* bioms shouldn't be masked or the style selection box is useless * fix: misleading comment * Fix: calculating absolute flux from precipitation normal-value. * Fix: River automatic rerender on regeneration. * Dropbox OAuth implementation and Cloud framework * add some space * removing unnecessary logs, defer script load Created by: Mészáros Gergely <monk@geotronic.hu>
This commit is contained in:
parent
f7d72c2255
commit
2d3f465d68
6 changed files with 256 additions and 57 deletions
|
|
@ -695,7 +695,7 @@ function showExportPane() {
|
|||
});
|
||||
}
|
||||
|
||||
function showLoadPane() {
|
||||
async function showLoadPane() {
|
||||
$("#loadMapData").dialog({
|
||||
title: "Load map",
|
||||
resizable: false,
|
||||
|
|
@ -707,6 +707,19 @@ function showLoadPane() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
const dpx = document.getElementById("loadFromDropbox");
|
||||
const dpf = dpx.querySelector("select");
|
||||
const files = await Cloud.providers.dropbox.list();
|
||||
dpx.style.display = files? "block" : "none";
|
||||
if (!files) return;
|
||||
while(dpf.firstChild) dpf.removeChild(dpf.firstChild);
|
||||
files.forEach(f => {
|
||||
const opt = document.createElement('option');
|
||||
opt.innerText = f.name;
|
||||
opt.value = f.path;
|
||||
dpf.appendChild(opt);
|
||||
});
|
||||
}
|
||||
|
||||
function loadURL() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue