migrate: change settings from a store to a state
This commit is contained in:
1 parent
ffcd9faa96
commit
d597349887
128 files changed
+1010
-1144
No files matched your search
@@ -92,8 +92,6 @@
|
||||
|
||||
import SvelteMarkdown from 'svelte-markdown'
|
||||
|
||||
options.inline = inline
|
||||
|
||||
interface Props {
|
||||
source?: string
|
||||
inline?: boolean
|
||||
@@ -110,10 +108,9 @@
|
||||
class: clazz = '',
|
||||
}: Props = $props()
|
||||
|
||||
let tokens
|
||||
run(() => {
|
||||
tokens = marked.lexer(source)
|
||||
})
|
||||
options.inline = inline
|
||||
|
||||
let tokens = $derived.by(() => marked.lexer(source))
|
||||
</script>
|
||||
|
||||
<div
|
||||
@@ -123,7 +120,7 @@
|
||||
{style}
|
||||
>
|
||||
<SvelteMarkdown
|
||||
bind:source={tokens}
|
||||
source={tokens}
|
||||
{renderers}
|
||||
{options}
|
||||
isInline={inline || undefined}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { run } from 'svelte/legacy'
|
||||
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { profile } from '$lib/auth.svelte.js'
|
||||
import MultiSelect from '$lib/components/input/Switch.svelte'
|
||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import { uploadImage } from '$lib/util.js'
|
||||
import { uploadImage } from '$lib/util.svelte.js'
|
||||
import { ImageInput, toast } from 'mono-svelte'
|
||||
import { Button, Label, Modal, TextArea } from 'mono-svelte'
|
||||
import { createEventDispatcher, tick } from 'svelte'
|
||||
|
||||
Reference in new issue
Block a user