From 474a6656b9f2841255823c0c08f30b2ed0277ef1 Mon Sep 17 00:00:00 2001 From: Massimo Melina Date: Sat, 4 Nov 2023 10:42:56 +0100 Subject: [PATCH] ux: admin/fs: hint --- admin/src/FileForm.ts | 3 ++- admin/src/addFiles.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/src/FileForm.ts b/admin/src/FileForm.ts index fa5c16fec..91daaeffb 100644 --- a/admin/src/FileForm.ts +++ b/admin/src/FileForm.ts @@ -125,7 +125,8 @@ export default function FileForm({ file, anyMask, addToBar, statusApi }: FileFor } }, fields: [ - isRoot ? h(Alert,{ severity: 'info' }, "This is Home, the root of your shared files. Options set here will be applied to all files.") + isDir && hasSource && h(Alert, { severity: 'info' }, `To set permissions on individual items in folder, add them by clicking Add button, and then "from disk"`), + isRoot ? h(Alert, { severity: 'info' }, "This is Home, the root of your shared files. Options set here will be applied to all files.") : { k: 'name', required: true, xl: true, helperText: hasSource && "You can decide a name that's different from the one on your disk" }, isLink ? { k: 'url', label: "URL", lg: 12, required: true } : { k: 'source', label: "Load content from disk", xl: true, comp: FileField, files: !isDir, folders: isDir, diff --git a/admin/src/addFiles.ts b/admin/src/addFiles.ts index 09faad244..2148d7ab5 100644 --- a/admin/src/addFiles.ts +++ b/admin/src/addFiles.ts @@ -18,7 +18,7 @@ export default function addFiles() { return h(Fragment, {}, h(Box, { sx:{ typography: 'body1', px: 1, py: 2 } }, "Selected elements will be added under ", - parent.isRoot ? h('i', {}, 'Home') : parent.id + parent.isRoot ? h('i', {}, "Home") : decodeURI(parent.id) ), h(FilePicker, { from: parent.source,