ux: admin/shared: clearer form for home-folder
Massimo Melina committed
Sep 27, 2025 at 21:54 UTC
cc07f4c5872ee9e24ae65c93b4cf5a1f9b251d44
1 file changed
+5
-4
admin/src/FileForm.ts
+5
-4
@@ -153,19 +153,20 @@ export default function FileForm({ file, addToBar, statusApi, accounts, saved }:
153
}
154
},
155
fields: [
156
- isRoot ? h(Alert, { severity: 'info' }, "This is Home, the root of your shared files. Options set here will be applied to all files.")
156
+ isRoot ? h(Alert, { severity: 'info' }, "This is the Home folder, the root of your shared files. Options set here will be applied to all files.")
157
: isDir && hasSource && h(Alert, { severity: 'info' }, `To set permissions on individual items in folder, add them by clicking Add button, and then "from disk"`),
158
- !isRoot && {
158
+ {
159
k: 'name', required: true, xl: true, helperText: hasSource && "You can decide a name that's different from the one on your disk",
160
+ ...isRoot && { disabled: true, value: "Home folder" },
161
end: nameFromSource && !nameIsDerivedFromSource && h(Btn, {
162
icon: RestartAlt, title: "Reset to same name on disk",
163
onClick: () => setValues({ ...values, name: nameFromSource })
164
}),
165
},
165
- isLink ? { k: 'url', label: "URL", lg: 12, required: true }
166
+ isLink ? { k: 'url', label: "URL", lg: 12, xl: 8, required: true }
167
: { k: 'source', label: "Disk source", xl: true, comp: FileField, files: isUnknown || !isDir, folders: isUnknown || isDir,
168
placeholder: "none",
168
- helperText: !values.source ? "This field is currently empty, and thus this element is a virtual-folder, no upload or delete is possible here."
169
+ helperText: !values.source ? "If you enter a path here, its content will be listed. Leaving this empty, makes this folder fully virtual."
170
: isDir ? "Content from this path on disk will be listed, but you can also add more" : undefined,
171
},
172
{ k: 'id', comp: LinkField, statusApi, xs: 12 },