Enable modal switching with smooth slide transitions
- Allow clicking between payments in recent activities while modal is open - Add fly transition for seamless horizontal slide animation - Use absolute positioning to prevent modal stacking issues - Replace fadeIn animation with proper slide-in-from-right effect 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
import { fly } from 'svelte/transition';
|
||||||
|
import { quintOut } from 'svelte/easing';
|
||||||
import PaymentModal from '$lib/components/PaymentModal.svelte';
|
import PaymentModal from '$lib/components/PaymentModal.svelte';
|
||||||
|
|
||||||
let showModal = false;
|
let showModal = false;
|
||||||
@@ -41,7 +43,11 @@
|
|||||||
<div class="side-panel">
|
<div class="side-panel">
|
||||||
{#if showModal}
|
{#if showModal}
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<PaymentModal {paymentId} on:close={() => showModal = false} />
|
{#key paymentId}
|
||||||
|
<div in:fly={{x: 50, duration: 300, easing: quintOut}} out:fly={{x: -50, duration: 300, easing: quintOut}}>
|
||||||
|
<PaymentModal {paymentId} on:close={() => showModal = false} />
|
||||||
|
</div>
|
||||||
|
{/key}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -82,19 +88,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
opacity: 0;
|
position: relative;
|
||||||
animation: fadeIn 0.3s ease-out 0.1s forwards;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
.modal-content > div {
|
||||||
from {
|
position: absolute;
|
||||||
opacity: 0;
|
top: 0;
|
||||||
transform: translateX(20px);
|
left: 0;
|
||||||
}
|
right: 0;
|
||||||
to {
|
bottom: 0;
|
||||||
opacity: 1;
|
overflow-y: auto;
|
||||||
transform: translateX(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
Reference in New Issue
Block a user