cloud files WIP

This commit is contained in:
SPRINX0\prochazka
2025-05-28 08:25:10 +02:00
parent d3a5df0007
commit 741b942dea
8 changed files with 109 additions and 54 deletions

View File

@@ -247,10 +247,19 @@
};
async function openTab() {
const resp = await apiCall('files/load', { folder, file: data.file, format: handler.format });
let dataContent;
if (data.folid && data.cntid) {
const resp = await apiCall('cloud/get-content', {
folid: data.folid,
cntid: data.cntid,
});
dataContent = resp.content;
} else {
dataContent = await apiCall('files/load', { folder, file: data.file, format: handler.format });
}
const connProps: any = {};
let tooltip = undefined;
const connProps: any = {};
if (handler.currentConnection) {
const connection = _.get($currentDatabase, 'connection') || {};
@@ -270,10 +279,12 @@
savedFile: data.file,
savedFolder: handler.folder,
savedFormat: handler.format,
savedCloudFolderId: data.folid,
savedCloudContentId: data.cntid,
...connProps,
},
},
{ editor: resp }
{ editor: dataContent }
);
}
</script>