renamed Remove & altered popover description (#1538)

* renamed Remove button to Disconnect & altered popover dialog description accordingly
* altered toast text on success & on error
* fixed namings & replaced anyways with file path
This commit is contained in:
Eugen Soliar 2024-02-13 23:12:43 +01:00 committed by GitHub
parent 485b2f48bc
commit ea5993fa76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -10,15 +10,16 @@ const RemoveCollection = ({ onClose, collection }) => {
const onConfirm = () => {
dispatch(removeCollection(collection.uid))
.then(() => {
toast.success('Collection removed');
toast.success('Collection closed');
onClose();
})
.catch(() => toast.error('An error occurred while removing the collection'));
.catch(() => toast.error('An error occurred while closing the collection'));
};
return (
<Modal size="sm" title="Remove Collection" confirmText="Remove" handleConfirm={onConfirm} handleCancel={onClose}>
Are you sure you want to remove collection <span className="font-semibold">{collection.name}</span> ?
<Modal size="sm" title="Close Collection" confirmText="Close" handleConfirm={onConfirm} handleCancel={onClose}>
Are you sure you want to close collection <span className="font-semibold">{collection.name}</span> from Bruno? It
will remain in your file system in <span className="font-semibold break-words">{collection.pathname}</span>.
</Modal>
);
};

View File

@ -217,7 +217,7 @@ const Collection = ({ collection, searchText }) => {
setShowRemoveCollectionModal(true);
}}
>
Remove
Close
</div>
<div
className="dropdown-item"