refactor(web): remove buffer package ()

This commit is contained in:
Michel Heusschen 2024-07-12 18:40:57 +02:00 committed by GitHub
parent 1b3a7feb67
commit 5748f50c1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 47 deletions
web/src/lib/components/assets/thumbnail

View file

@ -1,9 +1,8 @@
<script lang="ts">
import { onMount, tick } from 'svelte';
import { decodeBase64 } from '$lib/utils';
import { fade } from 'svelte/transition';
import { thumbHashToDataURL } from 'thumbhash';
// eslint-disable-next-line unicorn/prefer-node-protocol
import { Buffer } from 'buffer';
import { mdiEyeOffOutline } from '@mdi/js';
import Icon from '$lib/components/elements/icon.svelte';
@ -62,7 +61,7 @@
<img
style:width={widthStyle}
style:height={heightStyle}
src={thumbHashToDataURL(Buffer.from(thumbhash, 'base64'))}
src={thumbHashToDataURL(decodeBase64(thumbhash))}
alt={altText}
{title}
class="absolute top-0 object-cover"