load cloud folders

This commit is contained in:
SPRINX0\prochazka
2025-05-21 14:48:28 +02:00
parent 7d4e53e413
commit b553a81d47
8 changed files with 170 additions and 18 deletions

View File

@@ -171,6 +171,11 @@ const publicCloudFilesLoader = () => ({
params: {},
reloadTrigger: { key: `public-cloud-changed` },
});
const cloudContentListLoader = () => ({
url: 'cloud/content-list',
params: {},
reloadTrigger: { key: `cloud-content-changed` },
});
async function getCore(loader, args) {
const { url, params, reloadTrigger, transform, onLoaded, errorValue } = loader(args);
@@ -469,3 +474,10 @@ export function getPublicCloudFiles(args) {
export function usePublicCloudFiles(args = {}) {
return useCore(publicCloudFilesLoader, args);
}
export function getCloudContentList(args) {
return getCore(cloudContentListLoader, args);
}
export function useCloudContentList(args = {}) {
return useCore(cloudContentListLoader, args);
}