ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Renaming file will override existing one without warning

Open rafaelramalho19 opened this issue 4 years ago • 4 comments

Describe the bug When you rename a file to match a file that already exists with that name, it overrides the later without any warning.

To Reproduce Steps to reproduce the behavior:

  1. Go to files page
  2. Have 2 files: 1.png and 2.png
  3. Rename 2.png to 1.png
  4. No warning that original 1.png will be permanently lost with the rename

Expected behavior @jessicaschilling thoughts on the expected behavior? Maybe open a modal that requires confirmation before actually replacing file?

rafaelramalho19 avatar Oct 07 '20 15:10 rafaelramalho19

@rafaelramalho19 Modal to confirm overwrite would be totally consistent; good call. I'll mock something up in the next day or so if that's OK for you 😊

jessicaschilling avatar Oct 07 '20 19:10 jessicaschilling

Related is https://github.com/ipfs-shipyard/ipfs-webui/issues/1612 for overwrite on file drag -- we can probably use the same modal in both places.

jessicaschilling avatar Oct 07 '20 19:10 jessicaschilling

@rafaelramalho19 -- how about this? image

  • Icon is stroke_attention
  • Headline is Overwrite file?
  • Text is You already have a file named (funny-cat.gif) in this directory. Are you sure you want to overwrite it? This action is permanent and cannot be reversed.
  • Buttons are Overwrite and Cancel

jessicaschilling avatar Oct 07 '20 19:10 jessicaschilling

NB: Latest mockup of this is at https://github.com/ipfs-shipyard/ipfs-webui/issues/1612#issuecomment-709605768 for feedback.

jessicaschilling avatar Oct 20 '20 20:10 jessicaschilling

closing in favor of https://github.com/ipfs/ipfs-webui/issues/1612

SgtPooki avatar Dec 02 '22 21:12 SgtPooki