Skip to content

Commit

Permalink
bump to 1.18.5 (#1493)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Sep 3, 2021
1 parent 8625789 commit afbd421
Show file tree
Hide file tree
Showing 7 changed files with 665 additions and 27 deletions.
2 changes: 1 addition & 1 deletion packages/files-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.0.0",
"@chainsafe/browser-storage-hooks": "^1.0.1",
"@chainsafe/files-api-client": "1.17.9",
"@chainsafe/files-api-client": "^1.18.5",
"@chainsafe/web3-context": "1.1.4",
"@lingui/core": "^3.7.2",
"@lingui/react": "^3.7.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const BinFileBrowser: React.FC<IFileBrowserModuleProps> = ({ controls = false }:
await filesApiClient.moveBucketObjects(
bucket.id,
{
path: getPathWithFile(currentPath, itemToRestore.name),
paths: [getPathWithFile(currentPath, itemToRestore.name)],
new_path: getPathWithFile(newPath, itemToRestore.name),
destination: buckets.find(b => b.type === "csf")?.id
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {

try {
await filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToDelete.name),
paths: [getPathWithFile(currentPath, itemToDelete.name)],
new_path: getPathWithFile("/", itemToDelete.name),
destination: buckets.find(b => b.type === "trash")?.id
})
Expand Down Expand Up @@ -121,7 +121,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {
if (!bucket || !itemToRename) return

filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToRename.name),
paths: [getPathWithFile(currentPath, itemToRename.name)],
new_path: getPathWithFile(currentPath, newName) })
.then(() => refreshContents())
.catch(console.error)
Expand All @@ -135,7 +135,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {
if (!itemToMove) return
try {
await filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToMove.name),
paths: [getPathWithFile(currentPath, itemToMove.name)],
new_path: getPathWithFile(newPath, itemToMove.name)
})
const message = `${
Expand Down Expand Up @@ -180,7 +180,7 @@ const CSFFileBrowser: React.FC<IFileBrowserModuleProps> = () => {
if (!bucket) return
let hasFolder = false
for (let i = 0; i < files.length; i++) {
if (fileItems[i].webkitGetAsEntry().isDirectory) {
if (fileItems[i].webkitGetAsEntry()?.isDirectory) {
hasFolder = true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const SharedFileBrowser = () => {
if (!bucket || !itemToRename) return

filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToRename.name),
paths: [getPathWithFile(currentPath, itemToRename.name)],
new_path: getPathWithFile(currentPath, newName) }).then(() => refreshContents())
.catch(console.error)
}, [refreshContents, filesApiClient, bucket, currentPath, pathContents])
Expand All @@ -155,7 +155,7 @@ const SharedFileBrowser = () => {
const itemToMove = pathContents.find(i => i.cid === cid)
if (!bucket || !itemToMove) return
await filesApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToMove.name),
paths: [getPathWithFile(currentPath, itemToMove.name)],
new_path: getPathWithFile(newPath, itemToMove.name)
})
})).finally(refreshContents)
Expand All @@ -181,7 +181,7 @@ const SharedFileBrowser = () => {
if (!bucket) return
let hasFolder = false
for (let i = 0; i < files.length; i++) {
if (fileItems[i].webkitGetAsEntry().isDirectory) {
if (fileItems[i].webkitGetAsEntry()?.isDirectory) {
hasFolder = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/storage-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.0.0",
"@chainsafe/browser-storage-hooks": "^1.0.1",
"@chainsafe/files-api-client": "1.17.9",
"@chainsafe/files-api-client": "^1.18.5",
"@chainsafe/web3-context": "1.1.4",
"@lingui/core": "^3.7.2",
"@lingui/react": "^3.7.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/storage-ui/src/Components/Pages/BucketPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const BucketPage: React.FC<IFileBrowserModuleProps> = () => {
if (!bucket || !itemToRename) return

storageApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToRename.name),
paths: [getPathWithFile(currentPath, itemToRename.name)],
new_path: getPathWithFile(currentPath, newName) })
.then(() => refreshContents())
.catch(console.error)
Expand All @@ -113,7 +113,7 @@ const BucketPage: React.FC<IFileBrowserModuleProps> = () => {
if (!itemToMove) return
try {
await storageApiClient.moveBucketObjects(bucket.id, {
path: getPathWithFile(currentPath, itemToMove.name),
paths: [getPathWithFile(currentPath, itemToMove.name)],
new_path: getPathWithFile(newPath, itemToMove.name)
})
const message = `${
Expand Down
Loading

0 comments on commit afbd421

Please sign in to comment.