@samitouri / QOSami-HFS / commits / bac288b1

admin/fs: better layout

Massimo Melina committed Jan 23, 2025 at 18:03 UTC bac288b1c3a10c2a3c624bdb1e5ee007701753e9
2 files changed +6 -6
admin/src/FileForm.ts
+5 -5
@@ -59,9 +59,9 @@ export default function FileForm({ file, addToBar, statusApi, accounts, saved }:
59 const isLink = values.url !== undefined
60 const hasSource = source !== undefined // we need a boolean
61 const realFolder = hasSource && isDir
62 - const lg = useBreakpoint('lg')
63 - const showTimestamps = !isLink && (lg || hasSource)
64 - const showSize = !isLink && lg || (hasSource && !realFolder)
62 + const xl = useBreakpoint('xl')
63 + const showTimestamps = !isLink && (xl || hasSource)
64 + const showSize = !isLink && xl || (hasSource && !realFolder)
65 const showAccept = file.accept! > '' || isDir && (file.can_upload ?? file.inherited?.can_upload)
66 const showWebsite = isDir
67 const barColors = useDialogBarColors()
@@ -177,7 +177,7 @@ export default function FileForm({ file, addToBar, statusApi, accounts, saved }:
177 }
178 },
179 perm('can_read', "Who can see but not download will be asked to login"),
180 - perm('can_archive', "Should this be included when user downloads as ZIP", { lg: isDir ? 6 : 12 }),
180 + perm('can_archive', "Should this be included when user downloads as ZIP"),
181 perm('can_list', "Permission to requests the list of a folder. The list will include only things you can see.", { contentText: "subfolders" }),
182 perm('can_delete', [needSourceWarning, "Those who can delete can also rename and cut/move"]),
183 perm('can_upload', needSourceWarning, { contentText: "subfolders" }),
@@ -219,7 +219,7 @@ export default function FileForm({ file, addToBar, statusApi, accounts, saved }:
219 inherit = _.get(values, inherit) ?? _.get(file.inherited, inherit) ?? _.get(defaultPerms, inherit)! // then show its value instead
220 return {
221 comp: WhoField,
222 - k: perm, sm: 6, xl: 4,
222 + k: perm, sm: 6, lg: 12, xl: 4,
223 parent, accounts, helperText, isDir,
224 otherPerms: others.map(x => ({ value: x, label: who2desc(x) })),
225 label: "Who can " + perm2word(perm),
admin/src/VfsPage.ts
+1 -1
@@ -154,7 +154,7 @@ export default function VfsPage({ setTitleSide }: PageProps) {
154 }
155 const scrollProps = { height: '100%', display: 'flex', flexDirection: 'column', overflow: 'auto' } as const
156 return h(Grid, { container: true, rowSpacing: 1, columnSpacing: 2, top: 0, flex: '1 1 auto', height: 0 },
157 - h(Grid, { item: true, xs: 12, [sideBreakpoint]: 6, lg: 6, xl: 5, ...scrollProps },
157 + h(Grid, { item: true, xs: 12, [sideBreakpoint]: 5, lg: 6, xl: 5, ...scrollProps },
158 h(VfsTree, { id2node, statusApi }) ),
159 isSideBreakpoint && sideContent && h(Grid, { item: true, [sideBreakpoint]: true, maxWidth: '100%', ...scrollProps },
160 h(Card, { sx: { overflow: 'initial' } }, // overflow is incompatible with stickyBar