Skip to content

Commit

Permalink
fix: only show swipe hint on mobile screens
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Ribeiro committed Nov 3, 2024
1 parent 49f4288 commit 0054952
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$version = "v2.36.1";
$version = "v2.36.2";
?>
4 changes: 3 additions & 1 deletion scripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ function setSwipeElements() {
}
element.style.transition = 'transform 0.2s ease'; // Smooth snap effect
element.style.transform = `translateX(${translateX}px)`;
element.style.zIndex = '1';
});
});

Expand Down Expand Up @@ -715,7 +716,7 @@ function expandActions(event, subscriptionId) {
}

function swipeHintAnimation() {
if (window.mobileNavigation) {
if (window.mobileNavigation && window.matchMedia('(max-width: 768px)').matches) {
const maxAnimations = 3;
const cookieName = 'swipeHintCount';

Expand All @@ -728,6 +729,7 @@ function swipeHintAnimation() {

setTimeout(() => {
firstElement.style.transform = 'translateX(0px)';
firstElement.style.zIndex = '1';
}, 600);
}

Expand Down

0 comments on commit 0054952

Please sign in to comment.