fix: clicking on breadcrumbs while already loading a folder brought to inconsistent results
Massimo Melina committed
Jan 3, 2022 at 00:12 UTC
a37e1404f4bfb184be3274a7626c7d7a5b7fa164
3 files changed
+7
-1
frontend/src/BrowseFiles.ts
+1
-1
@@ -47,7 +47,7 @@ function File({ n, m, c, s, hidden }: DirEntry & { hidden:boolean }) {
47
if (containerDir)
48
n = n.substring(containerDir.length)
49
const href = fix(containerDir + n)
50
- return h('li', { style:hidden ? { display:'none' } : null },
50
+ return h('li', { className:isDir ? 'folder' : 'file', style:hidden ? { display:'none' } : null },
51
isDir ? h(Link, { to: base+href }, hIcon('folder'), n)
52
: h(Fragment, {},
53
containerDir && h(Link, { to: base+fix(containerDir), className:'container-folder' }, hIcon('file'), containerDir ),
frontend/src/useFetchList.ts
+2
@@ -21,6 +21,8 @@ export default function useFetchList() {
21
}
22
const previous = lastPath.current
23
lastPath.current = desiredPath
24
+ if (previous !== desiredPath)
25
+ state.stopSearch?.()
26
state.stoppedSearch = false
27
if (previous !== desiredPath && search) {
28
state.remoteSearch = ''
todo.md
+4
@@ -3,6 +3,7 @@
3
- file sorting
4
- folders before?
5
- upload
6
+- search and login dialogs should push to history so that mobile can use back button to close them
7
- get config values from command line
8
- accounts path in config
9
- search dialog to add to history
@@ -13,6 +14,9 @@
14
- user.redirect
15
- config: bans
16
- config: min disk space
17
+- link to parent folder in the list
18
+- archive for search results
19
+- archive only selected files
20
- https
21
- frontend: don't depend on cdn
22
- webdav?