mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-30 03:06:37 +00:00
feat: disable animations setting toggle (#442)
Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import appConfigStore from '$lib/stores/application-configuration-store';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
let {
|
||||
@@ -12,7 +13,7 @@
|
||||
children: Snippet;
|
||||
} = $props();
|
||||
|
||||
let containerNode: HTMLElement;
|
||||
let containerNode: HTMLElement | null = $state(null);
|
||||
|
||||
$effect(() => {
|
||||
page.route;
|
||||
@@ -53,6 +54,10 @@
|
||||
</style>
|
||||
</svelte:head>
|
||||
|
||||
<div class="fade-wrapper" bind:this={containerNode}>
|
||||
{#if $appConfigStore.disableAnimations}
|
||||
{@render children()}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="fade-wrapper" bind:this={containerNode}>
|
||||
{@render children()}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user