migrate: change settings from a store to a state

This commit is contained in:
Xylight committed 2024-10-25 21:09:32 -07:00
1 parent ffcd9faa96
commit d597349887
128 files changed
+1010 -1144

No files matched your search

@@ -1,7 +1,7 @@
<script lang="ts">
import { stopPropagation } from 'svelte/legacy'
import { userSettings, type View } from '$lib/settings'
import { settings, type View } from '$lib/settings.svelte'
import type { Post } from 'lemmy-js-client'
import { bestImageURL, postLink } from '../helpers'
import { showImage } from '$lib/components/ui/ExpandableImage.svelte'
@@ -24,7 +24,7 @@
<!--disabled preloads here since most people will hover over every image while scrolling-->
<svelte:element
this={$userSettings.expandImages ? 'button' : 'a'}
this={settings.expandImages ? 'button' : 'a'}
href={postLink(post)}
class="container mx-auto z-10 rounded-xl max-h-[60vh] relative overflow-hidden bg-slate-100 dark:bg-zinc-900"
data-sveltekit-preload-data="off"