admin/fs: new smaller icons for attributes

Massimo Melina committed Feb 15, 2023 at 21:54 UTC 4580e8e1107440ee443efc07cdaddffcbf63ed0c
1 file changed +17 -10
admin/src/VfsTree.ts
+17 -10
@@ -83,16 +83,23 @@ export default function VfsTree({ id2node }:{ id2node: Map<string, VfsNode> }) {
83 alignItems: 'center',
84 }
85 },
86 - isRoot ? iconTooltip(Home, "home, or root if you like")
87 - : folder ? iconTooltip(FolderIcon, "Folder")
88 - : iconTooltip(FileIcon, "File"),
89 - node.can_delete !== undefined && iconTooltip(Delete, "Delete permission"),
90 - node.can_upload !== undefined ? iconTooltip(Upload, "Upload permission")
91 - : !isRoot && !node.source && iconTooltip(Cloud, "Virtual (no source)"),
92 - isRestricted(node.can_see) && iconTooltip(RemoveRedEye, "Restrictions on who can see"),
93 - isRestricted(node.can_read) && iconTooltip(Lock, "Restrictions on who can download"),
94 - node.default && iconTooltip(Web, "Act as website"),
95 - node.masks && iconTooltip(TheaterComedy, "Masks"),
86 + h(Box, { display: 'flex', flex: 0, },
87 + isRoot ? iconTooltip(Home, "home, or root if you like")
88 + : folder ? iconTooltip(FolderIcon, "Folder")
89 + : iconTooltip(FileIcon, "File"),
90 + // attributes
91 + h(Box, { sx: {
92 + flex: 0, ml: '2px', '&>*': { fontSize: '87%' },
93 + display: 'grid', gridAutoFlow: 'column', gridTemplateRows: 'auto auto',
94 + } },
95 + node.can_delete !== undefined && iconTooltip(Delete, "Delete permission"),
96 + node.can_upload !== undefined ? iconTooltip(Upload, "Upload permission")
97 + : !isRoot && !node.source && iconTooltip(Cloud, "Virtual (no source)"),
98 + isRestricted(node.can_see) && iconTooltip(RemoveRedEye, "Restrictions on who can see"),
99 + isRestricted(node.can_read) && iconTooltip(Lock, "Restrictions on who can download"),
100 + node.default && iconTooltip(Web, "Act as website"),
101 + node.masks && iconTooltip(TheaterComedy, "Masks"),
102 + ), ),
103 isRoot ? "Home"
104 // special rendering if the whole source is not too long, and the name was not customized
105 : source?.length! < 45 && source?.endsWith(name) ? h('span', {},