2022-05-27 14:02:06 -05:00
|
|
|
<script lang="ts">
|
2024-06-07 14:22:46 -04:00
|
|
|
import { shortcuts } from '$lib/actions/shortcut';
|
2024-08-22 23:24:49 -04:00
|
|
|
import { zoomImageAction, zoomed } from '$lib/actions/zoom-image';
|
|
|
|
|
import BrokenAsset from '$lib/components/assets/broken-asset.svelte';
|
2023-12-05 16:43:15 +01:00
|
|
|
import { photoViewer } from '$lib/stores/assets.store';
|
|
|
|
|
import { boundingBoxesArray } from '$lib/stores/people.store';
|
2024-02-13 15:42:29 +01:00
|
|
|
import { alwaysLoadOriginalFile } from '$lib/stores/preferences.store';
|
2024-06-07 14:22:46 -04:00
|
|
|
import { SlideshowLook, SlideshowState, slideshowLookCssMapping, slideshowStore } from '$lib/stores/slideshow.store';
|
2024-02-14 08:09:49 -05:00
|
|
|
import { photoZoomState } from '$lib/stores/zoom-image.store';
|
2024-06-07 14:22:46 -04:00
|
|
|
import { getAssetOriginalUrl, getAssetThumbnailUrl, handlePromiseError } from '$lib/utils';
|
2024-02-14 08:09:49 -05:00
|
|
|
import { isWebCompatibleImage } from '$lib/utils/asset-utils';
|
|
|
|
|
import { getBoundingBox } from '$lib/utils/people-utils';
|
2024-06-07 14:22:46 -04:00
|
|
|
import { getAltText } from '$lib/utils/thumbnail-util';
|
2024-08-22 23:24:49 -04:00
|
|
|
import { AssetMediaSize, AssetTypeEnum, type AssetResponseDto, type SharedLinkResponseDto } from '@immich/sdk';
|
2024-06-07 14:22:46 -04:00
|
|
|
import { canCopyImagesToClipboard, copyImageToClipboard } from 'copy-image-clipboard';
|
feat(web): Scroll to asset in gridview; increase gridview perf; reduce memory; scrollbar ticks in fixed position (#10646)
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-08-21 22:15:21 -04:00
|
|
|
import { onDestroy, onMount } from 'svelte';
|
2024-08-22 23:24:49 -04:00
|
|
|
import { t } from 'svelte-i18n';
|
2024-08-29 17:40:17 +02:00
|
|
|
import { type SwipeCustomEvent, swipe } from 'svelte-gestures';
|
2024-02-14 08:09:49 -05:00
|
|
|
import { fade } from 'svelte/transition';
|
|
|
|
|
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
|
|
|
|
import { NotificationType, notificationController } from '../shared-components/notification/notification';
|
2024-04-19 12:49:29 +02:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
export let asset: AssetResponseDto;
|
2024-06-07 14:22:46 -04:00
|
|
|
export let preloadAssets: AssetResponseDto[] | undefined = undefined;
|
2023-07-16 03:31:33 +02:00
|
|
|
export let element: HTMLDivElement | undefined = undefined;
|
2023-10-27 15:34:01 -05:00
|
|
|
export let haveFadeTransition = true;
|
2024-06-13 09:21:47 -05:00
|
|
|
export let sharedLink: SharedLinkResponseDto | undefined = undefined;
|
2024-08-29 17:40:17 +02:00
|
|
|
export let onPreviousAsset: (() => void) | null = null;
|
|
|
|
|
export let onNextAsset: (() => void) | null = null;
|
2024-06-07 14:22:46 -04:00
|
|
|
export let copyImage: (() => Promise<void>) | null = null;
|
|
|
|
|
export let zoomToggle: (() => void) | null = null;
|
2023-07-01 00:50:47 -04:00
|
|
|
|
2024-06-07 14:22:46 -04:00
|
|
|
const { slideshowState, slideshowLook } = slideshowStore;
|
2023-07-01 00:50:47 -04:00
|
|
|
|
2024-06-07 14:22:46 -04:00
|
|
|
let assetFileUrl: string = '';
|
|
|
|
|
let imageLoaded: boolean = false;
|
|
|
|
|
let imageError: boolean = false;
|
|
|
|
|
let forceUseOriginal: boolean = false;
|
feat(web): Scroll to asset in gridview; increase gridview perf; reduce memory; scrollbar ticks in fixed position (#10646)
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-08-21 22:15:21 -04:00
|
|
|
let loader: HTMLImageElement;
|
2024-06-07 14:22:46 -04:00
|
|
|
|
|
|
|
|
$: isWebCompatible = isWebCompatibleImage(asset);
|
|
|
|
|
$: useOriginalByDefault = isWebCompatible && $alwaysLoadOriginalFile;
|
|
|
|
|
$: useOriginalImage = useOriginalByDefault || forceUseOriginal;
|
|
|
|
|
// when true, will force loading of the original image
|
2024-06-13 12:57:46 +02:00
|
|
|
$: forceUseOriginal =
|
|
|
|
|
forceUseOriginal || asset.originalMimeType === 'image/gif' || ($photoZoomState.currentZoom > 1 && isWebCompatible);
|
2024-06-07 14:22:46 -04:00
|
|
|
|
|
|
|
|
$: preload(useOriginalImage, preloadAssets);
|
|
|
|
|
$: imageLoaderUrl = getAssetUrl(asset.id, useOriginalImage, asset.checksum);
|
|
|
|
|
|
|
|
|
|
photoZoomState.set({
|
|
|
|
|
currentRotation: 0,
|
|
|
|
|
currentZoom: 1,
|
|
|
|
|
enable: true,
|
|
|
|
|
currentPositionX: 0,
|
|
|
|
|
currentPositionY: 0,
|
|
|
|
|
});
|
|
|
|
|
$zoomed = false;
|
2024-05-28 13:15:50 +02:00
|
|
|
|
2023-09-20 05:16:53 +02:00
|
|
|
onDestroy(() => {
|
2023-12-05 16:43:15 +01:00
|
|
|
$boundingBoxesArray = [];
|
2023-09-20 05:16:53 +02:00
|
|
|
});
|
|
|
|
|
|
2024-06-07 14:22:46 -04:00
|
|
|
const preload = (useOriginal: boolean, preloadAssets?: AssetResponseDto[]) => {
|
|
|
|
|
for (const preloadAsset of preloadAssets || []) {
|
|
|
|
|
if (preloadAsset.type === AssetTypeEnum.Image) {
|
|
|
|
|
let img = new Image();
|
|
|
|
|
img.src = getAssetUrl(preloadAsset.id, useOriginal, preloadAsset.checksum);
|
2024-05-28 13:15:50 +02:00
|
|
|
}
|
|
|
|
|
}
|
2024-05-23 20:26:22 -04:00
|
|
|
};
|
|
|
|
|
|
2024-06-07 14:22:46 -04:00
|
|
|
const getAssetUrl = (id: string, useOriginal: boolean, checksum: string) => {
|
2024-06-13 09:21:47 -05:00
|
|
|
if (sharedLink && (!sharedLink.allowDownload || !sharedLink.showMetadata)) {
|
|
|
|
|
return getAssetThumbnailUrl({ id, size: AssetMediaSize.Preview, checksum });
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-07 14:22:46 -04:00
|
|
|
return useOriginal
|
|
|
|
|
? getAssetOriginalUrl({ id, checksum })
|
|
|
|
|
: getAssetThumbnailUrl({ id, size: AssetMediaSize.Preview, checksum });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
copyImage = async () => {
|
2023-07-01 00:50:47 -04:00
|
|
|
if (!canCopyImagesToClipboard()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
2024-06-07 14:22:46 -04:00
|
|
|
await copyImageToClipboard(assetFileUrl);
|
2023-07-01 00:50:47 -04:00
|
|
|
notificationController.show({
|
|
|
|
|
type: NotificationType.Info,
|
2024-06-04 21:53:00 +02:00
|
|
|
message: $t('copied_image_to_clipboard'),
|
2023-07-01 00:50:47 -04:00
|
|
|
timeout: 3000,
|
|
|
|
|
});
|
2024-02-02 04:18:00 +01:00
|
|
|
} catch (error) {
|
|
|
|
|
console.error('Error [photo-viewer]:', error);
|
2023-07-01 00:50:47 -04:00
|
|
|
notificationController.show({
|
|
|
|
|
type: NotificationType.Error,
|
|
|
|
|
message: 'Copying image to clipboard failed.',
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2024-06-07 14:22:46 -04:00
|
|
|
zoomToggle = () => {
|
|
|
|
|
$zoomed = $zoomed ? false : true;
|
2023-07-01 00:50:47 -04:00
|
|
|
};
|
|
|
|
|
|
2024-05-24 10:56:36 +02:00
|
|
|
const onCopyShortcut = (event: KeyboardEvent) => {
|
2024-06-12 13:13:10 +02:00
|
|
|
if (window.getSelection()?.type === 'Range') {
|
2024-03-15 00:16:55 +01:00
|
|
|
return;
|
|
|
|
|
}
|
2024-05-24 10:56:36 +02:00
|
|
|
event.preventDefault();
|
2024-06-07 14:22:46 -04:00
|
|
|
handlePromiseError(copyImage());
|
2024-03-15 00:16:55 +01:00
|
|
|
};
|
feat(web): Scroll to asset in gridview; increase gridview perf; reduce memory; scrollbar ticks in fixed position (#10646)
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-08-21 22:15:21 -04:00
|
|
|
|
2024-08-29 17:40:17 +02:00
|
|
|
const onSwipe = (event: SwipeCustomEvent) => {
|
|
|
|
|
if ($photoZoomState.currentZoom > 1) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (onNextAsset && event.detail.direction === 'left') {
|
|
|
|
|
onNextAsset();
|
|
|
|
|
}
|
|
|
|
|
if (onPreviousAsset && event.detail.direction === 'right') {
|
|
|
|
|
onPreviousAsset();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
feat(web): Scroll to asset in gridview; increase gridview perf; reduce memory; scrollbar ticks in fixed position (#10646)
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-08-21 22:15:21 -04:00
|
|
|
onMount(() => {
|
|
|
|
|
const onload = () => {
|
|
|
|
|
imageLoaded = true;
|
|
|
|
|
assetFileUrl = imageLoaderUrl;
|
|
|
|
|
};
|
|
|
|
|
const onerror = () => {
|
|
|
|
|
imageError = imageLoaded = true;
|
|
|
|
|
};
|
|
|
|
|
if (loader.complete) {
|
|
|
|
|
onload();
|
|
|
|
|
}
|
|
|
|
|
loader.addEventListener('load', onload);
|
|
|
|
|
loader.addEventListener('error', onerror);
|
|
|
|
|
return () => {
|
|
|
|
|
loader?.removeEventListener('load', onload);
|
|
|
|
|
loader?.removeEventListener('error', onerror);
|
|
|
|
|
};
|
|
|
|
|
});
|
2022-05-27 14:02:06 -05:00
|
|
|
</script>
|
|
|
|
|
|
2024-03-15 00:16:55 +01:00
|
|
|
<svelte:window
|
|
|
|
|
use:shortcuts={[
|
2024-05-24 10:56:36 +02:00
|
|
|
{ shortcut: { key: 'c', ctrl: true }, onShortcut: onCopyShortcut, preventDefault: false },
|
|
|
|
|
{ shortcut: { key: 'c', meta: true }, onShortcut: onCopyShortcut, preventDefault: false },
|
2024-03-15 00:16:55 +01:00
|
|
|
]}
|
|
|
|
|
/>
|
2024-06-07 14:22:46 -04:00
|
|
|
{#if imageError}
|
2024-08-22 23:24:49 -04:00
|
|
|
<BrokenAsset square />
|
2024-06-07 14:22:46 -04:00
|
|
|
{/if}
|
feat(web): Scroll to asset in gridview; increase gridview perf; reduce memory; scrollbar ticks in fixed position (#10646)
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-08-21 22:15:21 -04:00
|
|
|
<!-- svelte-ignore a11y-missing-attribute -->
|
|
|
|
|
<img bind:this={loader} style="display:none" src={imageLoaderUrl} aria-hidden="true" />
|
2024-06-07 14:22:46 -04:00
|
|
|
<div bind:this={element} class="relative h-full select-none">
|
|
|
|
|
<img
|
|
|
|
|
style="display:none"
|
|
|
|
|
src={imageLoaderUrl}
|
2024-07-07 22:29:56 +00:00
|
|
|
alt={$getAltText(asset)}
|
2024-06-07 14:22:46 -04:00
|
|
|
on:load={() => ((imageLoaded = true), (assetFileUrl = imageLoaderUrl))}
|
|
|
|
|
on:error={() => (imageError = imageLoaded = true)}
|
|
|
|
|
/>
|
2024-03-14 17:12:32 -04:00
|
|
|
{#if !imageLoaded}
|
feat(web): Scroll to asset in gridview; increase gridview perf; reduce memory; scrollbar ticks in fixed position (#10646)
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-08-21 22:15:21 -04:00
|
|
|
<div id="spinner" class="flex h-full items-center justify-center">
|
2024-04-21 06:06:49 +02:00
|
|
|
<LoadingSpinner />
|
|
|
|
|
</div>
|
2024-06-07 14:22:46 -04:00
|
|
|
{:else if !imageError}
|
|
|
|
|
<div use:zoomImageAction class="h-full w-full" transition:fade={{ duration: haveFadeTransition ? 150 : 0 }}>
|
2024-05-28 13:15:50 +02:00
|
|
|
{#if $slideshowState !== SlideshowState.None && $slideshowLook === SlideshowLook.BlurredBackground}
|
2024-04-21 06:06:49 +02:00
|
|
|
<img
|
2024-06-07 14:22:46 -04:00
|
|
|
src={assetFileUrl}
|
2024-07-07 22:29:56 +00:00
|
|
|
alt={$getAltText(asset)}
|
2024-05-28 13:15:50 +02:00
|
|
|
class="absolute top-0 left-0 -z-10 object-cover h-full w-full blur-lg"
|
2024-04-21 06:06:49 +02:00
|
|
|
draggable="false"
|
|
|
|
|
/>
|
2024-05-28 13:15:50 +02:00
|
|
|
{/if}
|
|
|
|
|
<img
|
|
|
|
|
bind:this={$photoViewer}
|
2024-06-07 14:22:46 -04:00
|
|
|
src={assetFileUrl}
|
2024-08-29 17:40:17 +02:00
|
|
|
use:swipe
|
|
|
|
|
on:swipe={onSwipe}
|
2024-07-07 22:29:56 +00:00
|
|
|
alt={$getAltText(asset)}
|
2024-05-28 13:15:50 +02:00
|
|
|
class="h-full w-full {$slideshowState === SlideshowState.None
|
|
|
|
|
? 'object-contain'
|
|
|
|
|
: slideshowLookCssMapping[$slideshowLook]}"
|
|
|
|
|
draggable="false"
|
|
|
|
|
/>
|
|
|
|
|
{#each getBoundingBox($boundingBoxesArray, $photoZoomState, $photoViewer) as boundingbox}
|
|
|
|
|
<div
|
|
|
|
|
class="absolute border-solid border-white border-[3px] rounded-lg"
|
|
|
|
|
style="top: {boundingbox.top}px; left: {boundingbox.left}px; height: {boundingbox.height}px; width: {boundingbox.width}px;"
|
|
|
|
|
/>
|
|
|
|
|
{/each}
|
|
|
|
|
</div>
|
2024-03-14 17:12:32 -04:00
|
|
|
{/if}
|
2022-05-27 14:02:06 -05:00
|
|
|
</div>
|
feat(web): Scroll to asset in gridview; increase gridview perf; reduce memory; scrollbar ticks in fixed position (#10646)
* Squashed
* Change strategy - now pre-measure buckets offscreen, so don't need to worry about sub-bucket scroll preservation
* Reduce jank on scroll, delay DOM updates until after scroll
* css opt, log measure time
* Trickle out queue while scrolling, flush when stopped
* yay
* Cleanup cleanup...
* everybody...
* everywhere...
* Clean up cleanup!
* Everybody do their share
* CLEANUP!
* package-lock ?
* dynamic measure, todo
* Fix web test
* type lint
* fix e2e
* e2e test
* Better scrollbar
* Tuning, and more tunables
* Tunable tweaks, more tunables
* Scrollbar dots and viewport events
* lint
* Tweaked tunnables, use requestIdleCallback for garbage tasks, bug fixes
* New tunables, and don't update url by default
* Bug fixes
* Bug fix, with debug
* Fix flickr, fix graybox bug, reduced debug
* Refactor/cleanup
* Fix
* naming
* Final cleanup
* review comment
* Forgot to update this after naming change
* scrubber works, with debug
* cleanup
* Rename scrollbar to scrubber
* rename to
* left over rename and change to previous album bar
* bugfix addassets, comments
* missing destroy(), cleanup
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-08-21 22:15:21 -04:00
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
@keyframes delayedVisibility {
|
|
|
|
|
to {
|
|
|
|
|
visibility: visible;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#spinner {
|
|
|
|
|
visibility: hidden;
|
|
|
|
|
animation: 0s linear 0.4s forwards delayedVisibility;
|
|
|
|
|
}
|
|
|
|
|
</style>
|