@samitouri / QOSami-HFS / commits / 5fa3ce45

fix: no folder-menu was displayed clicking on home while it is the current folder

Massimo Melina committed Mar 18, 2024 at 10:21 UTC 5fa3ce4582bb74b9f660f2e49971ec7ced602454
1 file changed +5 -9
frontend/src/Breadcrumbs.ts
+5 -9
@@ -42,22 +42,18 @@ function Breadcrumb({ path, label, current, title }:{ current?: boolean, path: s
42 async onClick(ev) {
43 if (!current) return
44 ev.preventDefault()
45 - if (typeof label !== 'string')
46 - return reload()
45 openFileMenu(new DirEntry(decodeURIComponent(path), { p }), ev, [
46 {
47 id: 'reload',
48 label: t`Reload`,
49 icon: 'reload',
52 - onClick: reload
50 + onClick() {
51 + state.remoteSearch = ''
52 + state.stopSearch?.()
53 + reloadList()
54 + }
55 }
56 ])
55 -
56 - function reload() {
57 - state.remoteSearch = ''
58 - state.stopSearch?.()
59 - reloadList()
60 - }
57 }
58 }, label)
59 }