cloud file, folder operations

This commit is contained in:
SPRINX0\prochazka
2025-05-28 10:46:35 +02:00
parent 741b942dea
commit 7b50a19b2c
9 changed files with 150 additions and 41 deletions

View File

@@ -41,22 +41,25 @@
const serverStatus = useServerStatus();
$: emptyCloudContent = ($cloudContentList || []).filter(x => !x.items?.length).map(x => x.folid);
$: cloudContentFlat = ($cloudContentList || [])
.flatMap(fld => fld.items ?? [])
.map(data => {
if (data.type == 'connection') {
const conid = `cloud://${data.folid}/${data.cntid}`;
const status = $serverStatus ? $serverStatus[$volatileConnectionMapStore[conid] || conid] : undefined;
$: cloudContentFlat = _.sortBy(
($cloudContentList || [])
.flatMap(fld => fld.items ?? [])
.map(data => {
if (data.type == 'connection') {
const conid = `cloud://${data.folid}/${data.cntid}`;
const status = $serverStatus ? $serverStatus[$volatileConnectionMapStore[conid] || conid] : undefined;
return {
...data,
conid,
status,
};
}
return {
...data,
conid,
status,
};
}
return data;
});
return data;
}),
'name'
);
$: contentGroupMap = _.keyBy($cloudContentList || [], x => x.folid);
// $: console.log('cloudContentFlat', cloudContentFlat);