Bug fixes.

This commit is contained in:
Aodhan
2025-07-19 21:46:31 +01:00
parent 7bebc95c09
commit c2ecf93abe
12 changed files with 618 additions and 373 deletions

View File

@@ -7,6 +7,9 @@
function addSwipeDecisionIndicators() {
const swipeContainer = document.querySelector('.swipe-container');
// Only proceed if swipe container exists (not on history page)
if (!swipeContainer) return;
// Create decision indicators for each direction
const directions = ['left', 'right', 'up', 'down'];
const icons = ['fa-trash', 'fa-folder-plus', 'fa-star', 'fa-clock'];
@@ -34,6 +37,9 @@ function enhanceLoadingIndicator() {
function enhanceDirectionArrows() {
const arrows = document.querySelectorAll('.direction-arrow');
// Only proceed if direction arrows exist
if (arrows.length === 0) return;
arrows.forEach(arrow => {
arrow.addEventListener('mouseenter', function() {
this.style.transform = this.classList.contains('arrow-left') || this.classList.contains('arrow-right')
@@ -54,13 +60,13 @@ function enhanceDirectionArrows() {
// Show swipe decision indicator
function showSwipeDecision(direction) {
const indicator = document.querySelector(`.decision-${direction}`);
if (indicator) {
indicator.classList.add('visible');
setTimeout(() => {
indicator.classList.remove('visible');
}, 800);
}
if (!indicator) return;
indicator.classList.add('visible');
setTimeout(() => {
indicator.classList.remove('visible');
}, 800);
}
// Enhance the performSwipe function
@@ -68,6 +74,7 @@ function enhancePerformSwipe() {
// Store the original performSwipe function
const originalPerformSwipe = window.performSwipe;
// Only proceed if performSwipe exists (main page only)
if (typeof originalPerformSwipe === 'function') {
// Override with enhanced version
window.performSwipe = function(direction) {