Skip to content

Commit 60585ef

Browse files
jessicaschillingrafaelramalho19lidel
authored
feat: delete-modal pin guidance, improved language (#1644)
* Delete modal language, standardization * Delete -> Remove * feat: add pinning services integration to the remove modal * refactor: best-effort unpin after files.rm This ensures we don't remove pins if removal failed first, and also do pin removal in best-effort fashion to avoid crashing webui on DAGs with multiple instances of the same CID Also, closes #1740 * chore: change checkbox to match files page * chore: fix selected files unsync after delete * feat: add item/folder name to the description when removing * style: move filename to modal title This makes filename more prominent when a single item is removed. Easier to scan when performing quick operations. Co-authored-by: Rafael Ramalho <[email protected]> Co-authored-by: Marcin Rataj <[email protected]>
1 parent f06350e commit 60585ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+13503
-13706
lines changed

@types/ipfs/index.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ declare module 'ipfs' {
2424
add(cid: CID, options?: PinAddOptions): Promise<Pin[]>;
2525
ls(options?: PinListOptions): AsyncIterable<PinEntry>;
2626
rm(cid: CID, options?: PinRemoveOptions): Promise<Pin[]>;
27+
remote: RemotePinService;
28+
}
29+
30+
declare export interface RemotePinServicesOptions {
31+
cid: CID[];
32+
service: string;
33+
}
34+
declare export interface RemotePinService {
35+
rm(options: RemotePinServicesOptions): Promise<boolean>;
2736
}
2837

2938
declare export interface FileService {

package-lock.json

+13,274-13,553
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/locales/ar/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "اختر اسمًا جديدًا لهذا الملف.",
3030
"descriptionFolder": "اختر اسمًا جديدًا لهذا المجلد."
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, zero {حذف العناصر} one {Delete item} two {Delete {count} items} few {Delete {count} items} many {Delete {count} items} other {Delete {count} items}}",
3434
"titleFolder": "{count, plural, zero {حذف المجلدات} one {Delete folder} two {Delete {count} folders} few {Delete {count} folders} many {Delete {count} folders} other {Delete {count} folders}}",
3535
"titleFile": "{count, plural, zero {حذف الملفات} one {Delete file} two {Delete {count} files} few {Delete {count} files} many {Delete {count} files} other {Delete {count} files}}",

public/locales/cs/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "Vyberte nové jméno pro tento soubor.",
3030
"descriptionFolder": "Vyberte nové jméno pro tuto složku."
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, one {Smazat položku} few {Smazat {count} položky} many {Smazat {count} položek} other {Smazat {count} položek}}",
3434
"titleFolder": "{count, plural, one {Smazat složku} few {Smazat {count} složky} many {Smazat {count} složek} other {Smazat {count} složek}}",
3535
"titleFile": "{count, plural, one {Smazat soubor} few {Smazat {count} soubory} many {Smazat {count} souborů} other {Smazat {count} souborů}}",

public/locales/da/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"descriptionFile": "Vælg et nyt navn til denne fil.",
4545
"descriptionFolder": "Vælg et nyt navn til denne mappe."
4646
},
47-
"deleteModal": {
47+
"removeModal": {
4848
"titleItem": "{count, plural, one {Fjern element} other {Fjern {count} elementer}}",
4949
"titleFolder": "{count, plural, one {Fjern mappe} other {Fjern {count} mapper}}",
5050
"titleFile": "{count, plural, one {Fjern fil} other {Fjern {count} filer}}",

public/locales/de/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "Wähle einen neuen Namen für diese Datei.",
3030
"descriptionFolder": "Wähle einen neuen Namen für diesen Ordner."
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, one {Element löschen} other {{count} Elemente löschen}}",
3434
"titleFolder": "{count, plural, one {Ordner löschen} other {{count} Ordner löschen}}",
3535
"titleFile": "{count, plural, one {Datei löschen} other {{count} Dateien löschen}}",

public/locales/en/app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"close": "Close",
1010
"copy": "Copy",
1111
"create": "Create",
12-
"delete": "Delete",
12+
"remove": "Remove",
1313
"download": "Download",
1414
"edit": "Edit",
1515
"import": "Import",

public/locales/en/files.json

+11-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"breadcrumbs": "Breadcrumbs",
55
"finished": "Finished!",
66
"totalSize": "Total size: {size}",
7-
"filesSelected": "{count, plural, one {File selected} other {Files selected}}",
7+
"filesSelected": "{count, plural, one {Item selected} other {Items selected}}",
88
"menuOptions": "Options for selected item",
99
"selectedAllEntries": "Select all table entries",
1010
"individualFilesOnly": "Only available for individual files",
@@ -32,13 +32,15 @@
3232
"descriptionFile": "Choose a new name for this file.",
3333
"descriptionFolder": "Choose a new name for this folder."
3434
},
35-
"deleteModal": {
36-
"titleItem": "{count, plural, one {Delete item} other {Delete {count} items}}",
37-
"titleFolder": "{count, plural, one {Delete folder} other {Delete {count} folders}}",
38-
"titleFile": "{count, plural, one {Delete file} other {Delete {count} files}}",
39-
"descriptionItem": "{count, plural, one {Are you sure you want to delete this item? This action is permanent and cannot be reversed.} other {Are you sure you want to delete these {count} items? This action is permanent and cannot be reversed.}}",
40-
"descriptionFolder": "{count, plural, one {Are you sure you want to delete this folder? This action is permanent and cannot be reversed.} other {Are you sure you want to delete these {count} folders? This action is permanent and cannot be reversed.}}",
41-
"descriptionFile": "{count, plural, one {Are you sure you want to delete this file? This action is permanent and cannot be reversed.} other {Are you sure you want to delete these {count} files? This action is permanent and cannot be reversed.}}"
35+
"removeModal": {
36+
"titleItem": "{count, plural, one {Remove item? {name}} other {Remove {count} items?}}",
37+
"titleFolder": "{count, plural, one {Remove folder? {name}} other {Remove {count} folders?}}",
38+
"titleFile": "{count, plural, one {Remove file? {name}} other {Remove {count} files?}}",
39+
"descriptionItem": "{count, plural, one {Are you sure you want to remove this item? It will no longer appear on the Files screen, and will be permanently removed in the next scheduled cleanup (though copies may exist on other IPFS nodes). This action and cannot be reversed.} other {Are you sure you want to remove these {count} items? They will no longer appear on the Files screen, and will be permanently removed in the next scheduled cleanup (though copies may exist on other IPFS nodes). This action cannot be reversed.}}",
40+
"descriptionFolder": "{count, plural, one {Are you sure you want to remove this folder? It will no longer appear on the Files screen, and will be permanently removed in the next scheduled cleanup (though copies may exist on other IPFS nodes). This action cannot be reversed.} other {Are you sure you want to remove these {count} folders? They will no longer appear on the Files screen, and will be permanently removed in the next scheduled cleanup (though copies may exist on other IPFS nodes). This action cannot be reversed.}}",
41+
"descriptionFile": "{count, plural, one {Are you sure you want to remove this file? It will no longer appear on the Files screen, and will be permanently removed in the next scheduled cleanup (though copies may exist on other IPFS nodes). This action cannot be reversed.} other {Are you sure you want to remove these {count} files? They will no longer appear on the Files screen, and will be permanently removed in the next scheduled cleanup (though copies may exist on other IPFS nodes). This action cannot be reversed.}}",
42+
"checkboxRemoveLocalPin": "Also remove local pin (recommended)",
43+
"checkboxUnpinFromServices": "Unpin from all pinning services"
4244
},
4345
"pinningModal": {
4446
"title": "Select where you would like to pin these items.",
@@ -90,7 +92,7 @@
9092
"step5": {
9193
"title": "Files list",
9294
"paragraph1": "Finally, the listing where you can find your files and folders. Drag and drop files or folders to add them.",
93-
"paragraph2": "You can share or download files, inspect them in the IPLD Explorer, rename or delete them!",
95+
"paragraph2": "You can share or download files, inspect them in the IPLD Explorer, rename or remove them!",
9496
"paragraph3": "Pro tip: drag and drop a file from any other page of the Web UI to add them to the root of your MFS."
9597
}
9698
},

public/locales/en/notify.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"filesRenameFailed": "Failed to rename the files. Please try again.",
1111
"filesMakeDirFailed": "Failed to create directory. Please try again.",
1212
"filesCopyFailed": "Failed to copy the files. Please try again.",
13-
"filesDeleteFailed": "Failed to delete the files. Please try again.",
13+
"filesRemoveFailed": "Failed to remove the files. Please try again.",
1414
"filesAddFailed": "Failed to add files to IPFS. Please try again.",
1515
"filesEventFailed": "Failed to process your request. Please try again.",
1616
"couldntConnectToPeer": "Could not connect to the provided peer.",

public/locales/es/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "Elija un nuevo nombre para este archivo.",
3030
"descriptionFolder": "Elija un nuevo nombre para esta carpeta."
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, one {Delete item} other {Delete {count} items}}",
3434
"titleFolder": "{count, plural, one {Delete folder} other {Delete {count} folders}}",
3535
"titleFile": "{count, plural, one {Delete file} other {Delete {count} files}}",

public/locales/fr/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "Choisir un nouveau nom pour ce fichier.",
3030
"descriptionFolder": "Choisir un nouveau nom pour ce dossier."
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, one {Supprimer l'élément} other {Supprimer {count} éléments}}",
3434
"titleFolder": "{count, plural, one {Supprimer le dossier} other {Supprimer {count} dossiers}}",
3535
"titleFile": "{count, plural, one {Supprimer le fichier} other {Supprimer {count} fichiers}}",

public/locales/it/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "Scegli un nuovo nome per questo file.",
3030
"descriptionFolder": "Scegli un nuovo nome per questa cartella."
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, one {Elimina oggetto} other {Elimina {count} oggetti}}",
3434
"titleFolder": "{count, plural, one {Elimina cartella} other {Elimina {count} cartelle}}",
3535
"titleFile": "{count, plural, one {Elimina file} other {Elimina {count} file}}",

public/locales/ko-KR/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"descriptionFile": "파일의 새 이름을 적으세요",
4444
"descriptionFolder": "폴더의 새 이름을 적으세요"
4545
},
46-
"deleteModal": {
46+
"removeModal": {
4747
"titleItem": "{count, plural, other {{count}개 삭제}}",
4848
"titleFolder": "{count, plural, other {{count}개 폴더 삭제}}",
4949
"titleFile": "{count, plural, other {{count}개 파일 삭제}}",

public/locales/nl/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"descriptionFile": "Kies een nieuwe naam voor dit bestand.",
4545
"descriptionFolder": "Kies een nieuwe naam voor deze map."
4646
},
47-
"deleteModal": {
47+
"removeModal": {
4848
"titleItem": "{count, plural, one {Verwijder item} other {Verwijder {count}items}}",
4949
"titleFolder": "{count, plural, one {Verwijder map} other {Verwijder {count}mappen}}",
5050
"titleFile": "{count, plural, one {Verwijder bestand} other {Verwijder {count}bestanden}}",

public/locales/no/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"descriptionFile": "Velg et nytt navn for denne filen.",
4545
"descriptionFolder": "Velg et nytt navn for denne mappen."
4646
},
47-
"deleteModal": {
47+
"removeModal": {
4848
"titleItem": "{count, plural, one {Slett element} other {Slett {count} elementer}}",
4949
"titleFolder": "{count, plural, one {Slett mappe} other {Slett {count} mapper}}",
5050
"titleFile": "{count, plural, one {Slett fil} other {Slett {count} filer}}",

public/locales/pt/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"descriptionFile": "Escolha um novo nome para este ficheiro.",
4545
"descriptionFolder": "Escolha um novo nome para esta pasta."
4646
},
47-
"deleteModal": {
47+
"removeModal": {
4848
"titleItem": "{count, plural, one {Eliminar Item} other {Eliminar {count} Items.}}",
4949
"titleFolder": "{count, plural, one {Eliminar Pasta} other {Eliminar {count} Pastas}}",
5050
"titleFile": "{count, plural, one {Eliminar Ficheiro} other {Eliminar {count} Ficheiros}}",

public/locales/sk/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"descriptionFile": "Vyberte nové meno pre tento súbor.",
4545
"descriptionFolder": "Vyberte nové meno pre túto zložku."
4646
},
47-
"deleteModal": {
47+
"removeModal": {
4848
"titleItem": "{count, plural, one {Zmazať položku} few {Zmazať {count} položky} many {Zmazať {count} položky} other {Zmazať {count} položky}}",
4949
"titleFolder": "{count, plural, one {Zmazať zložku} few {Zmazať {count} zložky} many {Zmazať {count} zložky} other {Zmazať {count} zložky}}",
5050
"titleFile": "{count, plural, one {Zmazať súbor} few {Zmazať {count} súbory} many {Zmazať {count} súbory} other {Zmazať {count} súbory}}",

public/locales/sv/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"descriptionFile": "Välj ett namn för denna fil.",
4444
"descriptionFolder": "Välj ett namn för denna mapp."
4545
},
46-
"deleteModal": {
46+
"removeModal": {
4747
"titleItem": "{count, plural, one {Ta bort föremål} other {Ta bort {count} föremål}}",
4848
"titleFolder": "{count, plural, one {Ta bort mapp} other {Ta bort {count} mappar}}",
4949
"titleFile": "{count, plural, one {Ta bort fil} other {Ta bort {count} filer}}",

public/locales/zh-CN/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "重命名此文件",
3030
"descriptionFolder": "重命名此文件夹"
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, other {删除{count}个项目}}",
3434
"titleFolder": "{count, plural, other {删除{count}个文件夹}}",
3535
"titleFile": "{count, plural, other {删除{count}个文件}}",

public/locales/zh-HK/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "重命名此文件",
3030
"descriptionFolder": "重命名此文件夾"
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, other {移除{count}個項目}}",
3434
"titleFolder": "{count, plural, other {移除{count}個文件夾}}",
3535
"titleFile": "{count, plural, other {移除{count}個文件}}",

public/locales/zh-TW/files.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"descriptionFile": "重命名此文件",
3030
"descriptionFolder": "重命名此文件夾"
3131
},
32-
"deleteModal": {
32+
"removeModal": {
3333
"titleItem": "{count, plural, other {刪除{count} 個項目}}",
3434
"titleFolder": "{count, plural, other {刪除{count}個文件夾}}",
3535
"titleFile": "{count, plural, other {刪除{count}個文件}}",

src/bundles/files/actions.js

+43-17
Original file line numberDiff line numberDiff line change
@@ -323,31 +323,57 @@ const actions = () => ({
323323
/**
324324
* Deletes `files` with provided paths. On completion (success sor fail) will
325325
* trigger `doFilesFetch` to update the state.
326-
* @param {string[]} files
326+
* @param {Object} args
327+
* @param {FileStat[]} args.files
328+
* @param {boolean} args.removeLocally
329+
* @param {boolean} args.removeRemotely
330+
* @param {string[]} args.remoteServices
327331
*/
328-
doFilesDelete: (files) => perform(ACTIONS.DELETE, async (ipfs, { store }) => {
332+
doFilesDelete: ({ files, removeLocally, removeRemotely, remoteServices }) => perform(ACTIONS.DELETE, async (ipfs, { store }) => {
329333
ensureMFS(store)
330334

331-
if (files.length > 0) {
332-
const promises = files
333-
.map(file => ipfs.files.rm(realMfsPath(file), {
335+
if (files.length === 0) return undefined
336+
337+
/**
338+
* Execute function asynchronously in a best-effort fashion.
339+
* We don't want any edge case (like a directory with multiple copies of
340+
* same file) to crash webui, nor want to bother user with false-negatives
341+
* @param {Function} fn
342+
*/
343+
const tryAsync = async fn => { try { await fn() } catch (_) {} }
344+
345+
try {
346+
// try removing from MFS first
347+
await Promise.all(
348+
files.map(async file => ipfs.files.rm(realMfsPath(file.path), {
334349
recursive: true
335350
}))
351+
)
352+
353+
// Pin cleanup only if MFS removal was successful
354+
if (removeRemotely) {
355+
// remote unpin can be slow, so we do this async in best-effort fashion
356+
files.forEach(file => remoteServices.map(async service => tryAsync(() =>
357+
ipfs.pin.remote.rm({ cid: [file.cid], service })
358+
)))
359+
}
336360

337-
try {
338-
await Promise.all(promises)
361+
if (removeLocally) {
362+
// removal of local pin can fail if same CID is present twice,
363+
// this is done in best-effort as well
364+
await Promise.all(files.map(async file => file.pinned && tryAsync(() =>
365+
ipfs.pin.rm(file.cid)
366+
)))
367+
}
339368

340-
const src = files[0]
341-
const path = src.slice(0, src.lastIndexOf('/'))
342-
await store.doUpdateHash(path)
369+
const src = files[0].path
370+
const path = src.slice(0, src.lastIndexOf('/'))
371+
await store.doUpdateHash(path)
343372

344-
return undefined
345-
} finally {
346-
await store.doFilesFetch()
347-
}
373+
return undefined
374+
} finally {
375+
await store.doFilesFetch()
348376
}
349-
350-
return undefined
351377
}),
352378

353379
/**
@@ -366,7 +392,7 @@ const actions = () => ({
366392
const srcPath = src.startsWith('/') ? src : `/ipfs/${name}`
367393

368394
try {
369-
return ipfs.files.cp(srcPath, dst)
395+
return await ipfs.files.cp(srcPath, dst)
370396
} finally {
371397
await store.doFilesFetch()
372398
}

src/bundles/files/consts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const DEFAULT_STATE = {
7474

7575
export const cliCmdKeys = {
7676
DOWNLOAD_OBJECT_COMMAND: 'downloadObjectCommand',
77-
DELETE_FILE_FROM_IPFS: 'deleteFileFromIpfs',
77+
REMOVE_FILE_FROM_IPFS: 'removeFileFromIpfs',
7878
UPDATE_IPFS_CONFIG: 'updateIpfsConfig',
7979
PIN_OBJECT: 'pinObject',
8080
RENAME_IPFS_OBJECT: 'renameObject',
@@ -94,7 +94,7 @@ export const cliCommandList = {
9494
/**
9595
* @param {string} filePath
9696
*/
97-
[cliCmdKeys.DELETE_FILE_FROM_IPFS]: (filePath) => `ipfs files rm -r "${filePath}"`,
97+
[cliCmdKeys.REMOVE_FILE_FROM_IPFS]: (filePath) => `ipfs files rm -r "${filePath}"`,
9898
/**
9999
* @param {string} cid
100100
*/

src/bundles/notify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const notify = {
138138
case FILES_ACTIONS.COPY:
139139
return 'filesCopyFailed'
140140
case FILES_ACTIONS.DELETE:
141-
return 'filesDeleteFailed'
141+
return 'filesRemoveFailed'
142142
default:
143143
return 'filesEventFailed'
144144
}

src/components/modal/Modal.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const ModalBody = ({ className, Icon, title, children, ...props }) => (
2626
</div>
2727
)}
2828

29-
<p className='charcoal-muted fw5'>{title}</p>
29+
<p className='charcoal fw6 truncate'>{title}</p>
3030

3131
{children}
3232
</div>
@@ -46,7 +46,7 @@ ModalBody.defaultProps = {
4646

4747
export const Modal = ({ onCancel, children, className, ...props }) => {
4848
return (
49-
<div className={`${className} bg-white w-80 shadow-4 sans-serif relative`} style={{ maxWidth: '30em' }} {...props}>
49+
<div className={`${className} bg-white w-80 shadow-4 sans-serif relative`} style={{ maxWidth: '34em' }} {...props}>
5050
{ onCancel &&
5151
<CancelIcon className='absolute pointer w2 h2 top-0 right-0 fill-gray' onClick={onCancel} />
5252
}

src/components/text-input-modal/TextInputModal.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ class TextInputModal extends React.Component {
115115
{ description && typeof description === 'object' && description }
116116

117117
{ description && typeof description === 'string' &&
118-
<p className='gray w-80 center'>{description}</p>
118+
<p className='charcoal w-90 tl center'>{description}</p>
119119
}
120120

121121
<input
122122
onChange={this.onChange}
123123
onKeyPress={this.onKeyPress}
124124
value={this.state.value}
125125
required
126-
className={`input-reset charcoal ba b--black-20 br1 pa2 mb2 db w-75 center focus-outline ${this.inputClass}`}
126+
className={`input-reset charcoal ba b--black-20 br1 pa2 mb2 db w-90 center focus-outline ${this.inputClass}`}
127127
type='text' />
128128
</ModalBody>
129129

src/files/FilesPage.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ class FilesPage extends React.Component {
178178
downloadProgress={this.state.downloadProgress}
179179
onShare={(files) => this.showModal(SHARE, files)}
180180
onRename={(files) => this.showModal(RENAME, files)}
181-
onDelete={(files) => this.showModal(DELETE, files)}
182181
onSetPinning={(files) => this.showModal(PINNING, files)}
182+
onRemove={(files) => this.showModal(DELETE, files)}
183183
onInspect={this.onInspect}
184184
onRemotePinClick={this.onRemotePinClick}
185185
onDownload={this.onDownload}
@@ -233,7 +233,7 @@ class FilesPage extends React.Component {
233233
pinned={contextMenu.file && contextMenu.file.pinned}
234234
cid={contextMenu.file && contextMenu.file.cid}
235235
onShare={() => this.showModal(SHARE, [contextMenu.file])}
236-
onDelete={() => this.showModal(DELETE, [contextMenu.file])}
236+
onRemove={() => this.showModal(DELETE, [contextMenu.file])}
237237
onRename={() => this.showModal(RENAME, [contextMenu.file])}
238238
onInspect={() => this.onInspect(contextMenu.file.cid)}
239239
onDownload={() => this.onDownload([contextMenu.file])}
@@ -265,7 +265,7 @@ class FilesPage extends React.Component {
265265
onMove={this.props.doFilesMove}
266266
onMakeDir={this.props.doFilesMakeDir}
267267
onShareLink={this.props.doFilesShareLink}
268-
onDelete={this.props.doFilesDelete}
268+
onRemove={this.props.doFilesDelete}
269269
onAddByPath={this.onAddByPath}
270270
onPinningSet={this.props.doSetPinning}
271271
cliOptions={cliOptions}

0 commit comments

Comments
 (0)