admin/fs: better layout for web-links
Massimo Melina committed
May 28, 2024 at 23:34 UTC
ced222fa0f2b9435c0fe3939c8ac445a93a95735
1 file changed
+7
-7
admin/src/FileForm.ts
+7
-7
@@ -152,20 +152,20 @@ export default function FileForm({ file, addToBar, statusApi, accounts, saved }:
152
: isDir ? "Content from this path on disk will be listed, but you can also add more" : undefined,
153
},
154
{ k: 'id', comp: LinkField, statusApi, xs: 12 },
155
+ perm('can_read', "Who can see but not download will be asked to login"),
156
+ perm('can_see', "If you can't see, you may still download with a direct link"),
157
+ perm('can_archive', "Should this be included when user downloads as ZIP", { lg: isDir ? true : 12 }),
158
+ perm('can_list', undefined, { contentText: "subfolders" }),
159
+ perm('can_delete', [needSourceWarning, "Those who can delete can also rename and cut/move"]),
160
+ perm('can_upload', needSourceWarning, { contentText: "subfolders" }),
161
isLink && {
162
k: 'target',
163
comp: BoolField,
158
- sm: 6,
164
+ sm: true,
165
label: "Open in new browser",
166
fromField: x => x ? '_blank' : null,
167
toField: x => x > '',
168
},
163
- perm('can_read', "Who can see but not download will be asked to login"),
164
- perm('can_see', "If you can't see, you may still download with a direct link"),
165
- perm('can_archive', "Should this be included when user downloads as ZIP", { lg: isDir ? true : 12 }),
166
- perm('can_list', undefined, { contentText: "subfolders" }),
167
- perm('can_delete', [needSourceWarning, "Those who can delete can also rename and cut/move"]),
168
- perm('can_upload', needSourceWarning, { contentText: "subfolders" }),
169
showSize && { k: 'size', comp: DisplayField, sm: 6, lg: 4, toField: formatBytes },
170
showTimestamps && { k: 'ctime', comp: DisplayField, sm: 6, lg: showSize && 4, label: "Created", toField: formatTimestamp },
171
showTimestamps && { k: 'mtime', comp: DisplayField, sm: 6, lg: showSize && 4, label: "Modified", toField: formatTimestamp },