fix: Fix lint errors (#559)
* cleanup: postactions styling * misc: fix first round of errors * pkg: remove vitest * fix: fix lint errors stage 2 * fix: fix lint errors stage 3 * fix: fix lint errors, stage 3 * misc: update eslint rules to warn for writable derived
This commit is contained in:
1 parent
1824245f13
commit
76c581123a
225 files changed
+1553
-2352
No files matched your search
@@ -7,17 +7,16 @@
|
||||
} from '$lib/components/lemmy/post/helpers.js'
|
||||
import { showImage } from '$lib/components/ui/ExpandableImage.svelte'
|
||||
import { settings, type View } from '$lib/settings.svelte.js'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { isImage } from '$lib/ui/image'
|
||||
import type { Post } from 'lemmy-js-client'
|
||||
import { Material, modal, Popover } from 'mono-svelte'
|
||||
import { modal } from 'mono-svelte'
|
||||
import Button from 'mono-svelte/button/Button.svelte'
|
||||
import {
|
||||
DocumentText,
|
||||
ExclamationTriangle,
|
||||
Icon,
|
||||
Link,
|
||||
VideoCamera,
|
||||
ExclamationTriangle,
|
||||
} from 'svelte-hero-icons'
|
||||
|
||||
const thumbnailSize = (view: View) =>
|
||||
@@ -68,6 +67,7 @@
|
||||
}}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
{#if post.thumbnail_url || isImage(post.url)}
|
||||
<div class="relative overflow-hidden rounded-xl">
|
||||
@@ -75,16 +75,20 @@
|
||||
<img
|
||||
src={optimizeImageURL(post.thumbnail_url || post.url || '', 256)}
|
||||
loading="lazy"
|
||||
class="object-cover relative overflow-hidden bg-slate-100 dark:bg-zinc-800 rounded-xl
|
||||
transition-colors {size}"
|
||||
class={[
|
||||
'object-cover relative overflow-hidden bg-slate-100 dark:bg-zinc-800 rounded-xl transition-colors',
|
||||
size,
|
||||
]}
|
||||
alt={post.alt_text ?? ' '}
|
||||
class:blur-xl={blur}
|
||||
/>
|
||||
{#if type != 'image'}
|
||||
<div
|
||||
class="absolute w-8 h-8 m-1 bottom-0 left-0 rounded-xl text-slate-800 dark:text-zinc-200
|
||||
bg-slate-25 dark:bg-zinc-900 border border-slate-200 dark:border-zinc-700
|
||||
grid place-items-center"
|
||||
class={[
|
||||
'absolute w-8 h-8 m-1 bottom-0 left-0 rounded-xl text-slate-800 dark:text-zinc-200',
|
||||
'bg-slate-25 dark:bg-zinc-900 border border-slate-200 dark:border-zinc-700',
|
||||
'grid place-items-center',
|
||||
]}
|
||||
>
|
||||
<Icon
|
||||
src={type == 'iframe' ? VideoCamera : Link}
|
||||
@@ -109,10 +113,13 @@
|
||||
{/if}
|
||||
{:else}
|
||||
<div
|
||||
class="object-cover overflow-hidden bg-slate-50 dark:bg-zinc-900 rounded-xl
|
||||
border border-slate-200 dark:border-zinc-800 group-hover/media:border-slate-400
|
||||
dark:group-hover/media:border-zinc-600 transition-colors text-slate-400 dark:text-zinc-600 grid
|
||||
place-items-center {size}"
|
||||
class={[
|
||||
'object-cover overflow-hidden bg-slate-50 dark:bg-zinc-900 rounded-xl',
|
||||
'border border-slate-200 dark:border-zinc-800 group-hover/media:border-slate-400',
|
||||
'dark:group-hover/media:border-zinc-600 transition-colors text-slate-400 dark:text-zinc-600 grid',
|
||||
'place-items-center',
|
||||
size,
|
||||
]}
|
||||
>
|
||||
<Icon
|
||||
src={type == 'embed'
|
||||
|
||||
Reference in new issue
Block a user