public cloud widget

This commit is contained in:
SPRINX0\prochazka
2025-05-19 16:33:04 +02:00
parent 281de5196e
commit 310f8bf6f7
10 changed files with 133 additions and 31 deletions

View File

@@ -166,6 +166,12 @@ const authTypesLoader = ({ engine }) => ({
errorValue: null,
});
const publicCloudFilesLoader = () => ({
url: 'cloud/public-files',
params: {},
reloadTrigger: { key: `public-cloud-changed` },
});
async function getCore(loader, args) {
const { url, params, reloadTrigger, transform, onLoaded, errorValue } = loader(args);
const key = stableStringify({ url, ...params });
@@ -456,3 +462,10 @@ export function getSchemaList(args) {
export function useSchemaList(args) {
return useCore(schemaListLoader, args);
}
export function getPublicCloudFiles(args) {
return getCore(publicCloudFilesLoader, args);
}
export function usePublicCloudFiles(args = {}) {
return useCore(publicCloudFilesLoader, args);
}