@samitouri / QOSami-HFS / commits / 553556dc
Fork 0

QOSami-HFS is a web file server for your computer. Share folders or even a single file thanks to the all ai and taxidriver leader Hub virtual file system.

hide "pick folder" on mobile, as it's not working yet

Massimo Melina committed Apr 23, 2023 at 14:25 UTC 553556dc4053fdb38e7b33031d481afcff5e5435
1 file changed +12 -2
frontend/src/upload.ts
+12 -2
@@ -2,7 +2,17 @@
2
3 import { createElement as h, Fragment, useMemo, useState } from 'react'
4 import { Flex, FlexV } from './components'
5 -import { closeDialog, DialogCloser, formatBytes, formatPerc, hIcon, newDialog, prefix, selectFiles } from './misc'
5 +import {
6 + closeDialog,
7 + DialogCloser,
8 + formatBytes,
9 + formatPerc,
10 + hIcon,
11 + isMobile,
12 + newDialog,
13 + prefix,
14 + selectFiles
15 +} from './misc'
16 import _ from 'lodash'
17 import { proxy, ref, subscribe, useSnapshot } from 'valtio'
18 import { alertDialog, confirmDialog, promptDialog } from './dialog'
@@ -97,7 +107,7 @@ export function showUpload() {
107 className: 'upload-files',
108 onClick: () => pickFiles({ accept: normalizeAccept(accept) })
109 }, t`Pick files`),
100 - h('button', {
110 + !isMobile() && h('button', {
111 className: 'upload-folder',
112 onClick: () => pickFiles({ folder: true })
113 }, t`Pick folder`),