diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-01-14 22:21:59 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-01-14 22:21:59 +0000 |
| commit | b4cbbefbd2dac62a0e334da43d1e076d4bef00a7 (patch) | |
| tree | 3e3355c8b55d64a4592bf0e1525c70d33f6a5443 /src/components/media_modal/media_modal.js | |
| parent | e74482d84b3ae88c98d9d4c6a4e6b4ec0376356e (diff) | |
| parent | 274d384572f5699ddf0b43065235b32304954ca1 (diff) | |
Merge branch 'tusooa/noswipe-1img' into 'develop'
Make media modal easier to close if there is only one image
Closes #1237
See merge request pleroma/pleroma-fe!1755
Diffstat (limited to 'src/components/media_modal/media_modal.js')
| -rw-r--r-- | src/components/media_modal/media_modal.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index ff993664..05ef9fbe 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -63,6 +63,11 @@ const MediaModal = { }, type () { return this.currentMedia ? this.getType(this.currentMedia) : null + }, + swipeDisableClickThreshold () { + // If there is only one media, allow more mouse movements to close the modal + // because there is less chance that the user wants to switch to another image + return () => this.canNavigate ? 1 : 30 } }, methods: { |
