admin/fs: always show source field

Massimo Melina committed Jan 16, 2023 at 10:41 UTC 9e8f870b38a97f7c2d19cae7a6ddd89e6eed48bd
2 files changed +4 -2
admin/src/FileForm.ts
+3 -2
@@ -74,8 +74,9 @@ export default function FileForm({ file, defaultPerms }: { file: VfsNode, defaul
74 fields: [
75 isRoot ? h(Alert,{ severity: 'info' }, "This is Home, the root of your shared files. Options set here will be applied to all files.")
76 : { k: 'name', required: true, helperText: source && "You can decide a name that's different from the one on your disk" },
77 - isRoot ? { k: 'source', comp: FileField, files: false, helperText: "If you specify a folder here, its files will be listed in the home" }
78 - : (hasSource && { k: 'source', comp: FileField, folders: true, multiline: true }),
77 + { k: 'source', label: "Source on disk", comp: FileField, files: !isDir, folders: isDir, multiline: true,
78 + placeholder: "Not on disk, this is a virtual folder",
79 + },
80 perm('can_read', "Who can download", "Note: who can't download won't see it in the list"),
81 showCanSee && perm('can_see', "Who can see", "You can hide and keep it downloadable if you have a direct link"),
82 isDir && perm('can_upload', "Who can upload", hasSource ? '' : "Works only on folders with source"),
todo.md
+1
@@ -1,4 +1,5 @@
1 # To do
2 +- admin/fs: check if source exist when set
3 - plugins: after installing, switch to installed (and perhaps highlight new one)
4 - plugins' log, accessible in admin
5 - fix: cannot switch off https and switch on http at the same time