fix: admin/fs: wrong helper-text under source field when a file is pointed

Massimo Melina committed Jan 5, 2024 at 11:59 UTC bc8d765603ce0a4568c4bec2baf86a50b209f1d3
1 file changed +2 -2
admin/src/FileForm.ts
+2 -2
@@ -131,8 +131,8 @@ export default function FileForm({ file, addToBar, statusApi }: FileFormProps) {
131 isLink ? { k: 'url', label: "URL", lg: 12, required: true }
132 : { k: 'source', label: "Load content from disk", xl: true, comp: FileField, files: isUnknown || !isDir, folders: isUnknown || isDir,
133 placeholder: "no",
134 - helperText: values.source ? "Content from this path will be listed, but you can also add more"
135 - : "This field is empty, and thus this element is a virtual-folder. You can set this field, pointing at any folder/file on disk.",
134 + helperText: !values.source ? "This field is empty, and thus this element is a virtual-folder. You can set this field, pointing at any folder/file on disk."
135 + : isDir ? "Content from this path on disk will be listed, but you can also add more" : undefined,
136 },
137 !isLink && { k: 'id', comp: LinkField, statusApi, xs: 12 },
138 perm('can_read', "Who can see but not download will be asked to login"),