@samitouri / QOSami-HFS / commits / 687d32a5

dedicated icon for web-folders, and open on click

Massimo Melina committed Oct 29, 2023 at 11:19 UTC 687d32a553a6801461e5ffd108e1f25275dc8f9b
6 files changed +12 -4
frontend/fontello-config.json
+6
@@ -227,6 +227,12 @@
227 "css": "pause",
228 "code": 59407,
229 "src": "fontawesome"
230 + },
231 + {
232 + "uid": "e15f0d620a7897e2035c18c80142f6d9",
233 + "css": "link",
234 + "code": 61582,
235 + "src": "fontawesome"
236 }
237 ]
238 }
\ No newline at end of file
frontend/public/fontello.css
+2 -1
@@ -1,6 +1,6 @@
1 @font-face {
2 font-family: 'fontello';
3 - src: url('fontello.woff2?13611077') format('woff2');
3 + src: url('fontello.woff2?11723613') format('woff2');
4 font-weight: normal;
5 font-style: normal;
6 }
@@ -68,6 +68,7 @@
68 .fa-crown:before { content: '\e844'; } /* '' */
69 .fa-download:before { content: '\f02e'; } /* '' */
70 .fa-upload:before { content: '\f02f'; } /* '' */
71 +.fa-link:before { content: '\f08e'; } /* '' */
72 .fa-filter:before { content: '\f0b0'; } /* '' */
73 .fa-zoom:before { content: '\f0b2'; } /* '' */
74 .fa-menu:before { content: '\f0c9'; } /* '' */
frontend/public/fontello.woff2
Binary files a/frontend/public/fontello.woff2 and b/frontend/public/fontello.woff2 differ
frontend/src/BrowseFiles.ts
+1 -1
@@ -194,7 +194,7 @@ const Entry = memo(({ entry, midnight, separator }: EntryProps) => {
194 className += ' ' + PAGE_SEPARATOR_CLASS
195 const ico = getEntryIcon(entry)
196 const menuOnLink = getHFS().fileMenuOnLink
197 - const onClick = menuOnLink && fileMenu || undefined
197 + const onClick = !entry.web && menuOnLink && fileMenu || undefined
198 const small = useWindowSize().width < 800
199 const showingButton = !menuOnLink || isFolder && small
200 return h('li', { className, label: separator },
frontend/src/icons.ts
+2 -1
@@ -36,7 +36,8 @@ const SYS_ICONS: Record<string, [string] | [string, string]> = {
36 edit: ['✏️'],
37 zoom: ['↔'],
38 delete: ['🗑️', 'trash'],
39 - comment: ['💬']
39 + comment: ['💬'],
40 + link: ['↗'],
41 }
42
43 document.fonts.ready.then(async ()=> {
frontend/src/state.ts
+1 -1
@@ -140,7 +140,7 @@ export class DirEntry {
140 }
141
142 getDefaultIcon() {
143 - return hIcon(this.icon ?? (this.isFolder ? 'folder' : ext2type(this.ext) || 'file'))
143 + return hIcon(this.icon ?? (this.isFolder ? 'folder' : this.web ? 'link' : ext2type(this.ext) || 'file'))
144 }
145 }
146 export type DirList = DirEntry[]