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 = () => { const onConfirm = () => {
dispatch(removeCollection(collection.uid)) dispatch(removeCollection(collection.uid))
.then(() => { .then(() => {
toast.success('Collection removed'); toast.success('Collection closed');
onClose(); onClose();
}) })
.catch(() => toast.error('An error occurred while removing the collection')); .catch(() => toast.error('An error occurred while closing the collection'));
}; };
return ( return (
<Modal size="sm" title="Remove Collection" confirmText="Remove" handleConfirm={onConfirm} handleCancel={onClose}> <Modal size="sm" title="Close Collection" confirmText="Close" handleConfirm={onConfirm} handleCancel={onClose}>
Are you sure you want to remove collection <span className="font-semibold">{collection.name}</span> ? 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> </Modal>
); );
}; };

View File

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