Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
reduce filetree render size, bump node engine v, update desc
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Jun 28, 2021
1 parent 129dd0c commit 9d97a02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/FileTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const TruncatedTreeFile = ({file}: {file: ITreeRepresentation}) => (
)

// File tree display component
const DISPLAY_NUM = 50
const DISPLAY_NUM = 25
const FileTree = ({registry, full}: IFileTreeProps) => {
const emptyMessage = full ?
<Text color="yellow">No files found</Text> :
Expand All @@ -90,10 +90,10 @@ const FileTree = ({registry, full}: IFileTreeProps) => {
return (
<Box flexDirection="column" marginY={1}>
<Text bold>Files</Text>
{files.length > 0 ? files.slice(0, 50).map((file, i) => (
{files.length > 0 ? files.slice(0, DISPLAY_NUM).map((file, i) => (
full ? <FullTreeFile key={i} file={file}/> : <TruncatedTreeFile key={i} file={file}/>
)) : emptyMessage}
{files.length > 50 && <Text bold color="cyan">...and {files.length - DISPLAY_NUM} more collapsed</Text>}
{files.length > DISPLAY_NUM && <Text bold color="cyan">...and {files.length - DISPLAY_NUM} more collapsed</Text>}
{full && <Legend/>}
</Box>
)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "portal-sync",
"version": "1.1.0",
"description": "A p2p folder syncing tool build on top of the Hypercore protocol",
"description": "Zero-config peer-to-peer encrypted live folder syncing that respects your .gitignore",
"main": "index.js",
"author": "jackyzha0 <j.zhao2k19@gmail.com>",
"license": "MIT",
Expand All @@ -24,7 +24,7 @@
"build"
],
"engines": {
"node": ">=10"
"node": ">=12.22.1"
},
"dependencies": {
"chokidar": "^3.5.1",
Expand Down

0 comments on commit 9d97a02

Please sign in to comment.