Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar in browser #2

Merged
merged 36 commits into from
Nov 27, 2022
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8ea1b7e
Fixed multi download not appearing correctly
MangoCubes Nov 22, 2022
f161936
Added caching for FileBrowser
MangoCubes Nov 22, 2022
870884f
Added separate sidebar for filebrowser
MangoCubes Nov 22, 2022
72457ef
Stateful cache
MangoCubes Nov 22, 2022
741977e
Cache is used as primary item storage instead
MangoCubes Nov 22, 2022
826a20f
Starting work on filebrowser tree
MangoCubes Nov 23, 2022
324edfe
Empty cache container is added for each child directories
MangoCubes Nov 23, 2022
179b11c
Items on sidebar loads if it is not already
MangoCubes Nov 23, 2022
ed2062c
Added optional controller to make sidebar tree independent from main …
MangoCubes Nov 23, 2022
adb529e
Cache will be used unless explicitly refreshed
MangoCubes Nov 23, 2022
1fa8f2a
Fixed cache being invalidated upon going to parent folder
MangoCubes Nov 23, 2022
934bb20
Moved code into the scope where it matters
MangoCubes Nov 23, 2022
65a90f8
Merged two boolean states into one enum
MangoCubes Nov 25, 2022
aee848f
Failsafe when items is empty
MangoCubes Nov 25, 2022
ed84c71
Concurrency handling
MangoCubes Nov 25, 2022
e7762ca
Moved types for reuse
MangoCubes Nov 25, 2022
d87a47d
Removed potential invalid states
MangoCubes Nov 25, 2022
d761aaf
Applied similar method to vault browser
MangoCubes Nov 25, 2022
d947396
Nonexistent record is correctly assumed as not started
MangoCubes Nov 25, 2022
f42640f
Starting work on vault sidebar
MangoCubes Nov 25, 2022
137a4c8
Added sidebar back into vault browser
MangoCubes Nov 25, 2022
271c72d
Loading dir id happens after loading screen is shown
MangoCubes Nov 26, 2022
d4782c5
Buttons are disabled properly during loading screen
MangoCubes Nov 26, 2022
0a29e1b
Applying similar approach on FileBrowser for simpler code
MangoCubes Nov 26, 2022
5d1abe5
Fixed contents going out of sidebar's intended size
MangoCubes Nov 26, 2022
55390f1
Experimental way of handling async id fetching
MangoCubes Nov 26, 2022
2ba62b7
Fixed wrong id being passed
MangoCubes Nov 26, 2022
1af5810
Decrypted name is displayed instead of placeholder
MangoCubes Nov 26, 2022
4133119
Added placeholder if there are no subdirs
MangoCubes Nov 27, 2022
a364c44
Fixed missing unique key
MangoCubes Nov 27, 2022
9537277
Fixed text going over sidebar
MangoCubes Nov 27, 2022
8325561
Reusing component for both sidebars
MangoCubes Nov 27, 2022
4806381
Browser control separated from querying
MangoCubes Nov 27, 2022
0f84220
Minor bug fixes
MangoCubes Nov 27, 2022
184966f
Previous items will not be discarded during query
MangoCubes Nov 27, 2022
ec45fb9
Functional reload button
MangoCubes Nov 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed wrong id being passed
  • Loading branch information
MangoCubes committed Nov 26, 2022
commit 2ba62b75d8c5a1db0f3f34077de2df52396e0177
9 changes: 6 additions & 3 deletions src/web/vaultBrowser/AsyncSidebarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ export function AsyncSidebarItem(props: {dir: EncryptedDir, tree: DirCache<Encry
} else return <TreeItem nodeId={props.dir.fullName + 'Loading'} key={props.dir.fullName + 'Loading'} label='Loading...'/>
}

return (
<TreeItem nodeId={props.dir.fullName} key={props.dir.fullName} label={props.dir.decryptedName}>
if(loadState.state === States.None) return (
<TreeItem nodeId={props.dir.fullName + 'Loading'} key={props.dir.fullName + 'Loading'} label='Loading...'/>
);
else return (
<TreeItem nodeId={loadState.id} key={props.dir.fullName} label={props.dir.decryptedName}>
{getInnerItems()}
</TreeItem>
);
)
}