Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use confirmation modal when deleting from context menu #191
- Loading branch information
Showing
3 changed files
with
13 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53c548b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.$store.state.selectMode = true
need this
53c548b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? You don't want to trigger select-mode when trying to delete 1 torrent?
53c548b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some kind of UI bug where a list is selected but not displayed.
The best way is to return the selected list to its previous state when the 'ConfirmDeleteModal' modal is closed. However, there are many variables and it gets complicated.
53c548b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, when creating 'ComfirmDeleteModal', pass the hash value, and if there is a prop value in the 'ComfirmDeleteModal' modal, can make it work based on the prop value.
53c548b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those modals have been a pain since the start 😭
Idealy I would like to refactor them to make them 'promise-based'. So I can instantiate them like a function (with props) en wait for it's response. That way the behavior is way more predictable throughout the app. Sadly, I still haven't found a nice way to do this yet.
53c548b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel better about the current way it goes smoothly without waiting for a response.
nah I didn't see the code 'this.$store.state.selected_torrents = []'
Forget about my initial opinion. It seems to be the perfect way in terms of user feedback.
53c548b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the user's request is completed by'ComfirmDeleteModal', I think positive to clearing all selected lists.