fix: markdown editor not working
This commit is contained in:
2 files changed
+12
-11
No files matched your search
@@ -32,7 +32,7 @@
|
||||
str: string,
|
||||
startIndex: number,
|
||||
endIndex: number,
|
||||
replacement: string,
|
||||
replacement: string
|
||||
) {
|
||||
return str.substring(0, startIndex) + replacement + str.substring(endIndex)
|
||||
}
|
||||
@@ -49,7 +49,7 @@
|
||||
textArea.value,
|
||||
startPos,
|
||||
endPos,
|
||||
newText,
|
||||
newText
|
||||
)
|
||||
|
||||
textArea.focus()
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
|
||||
let uploadingImage = $state(false)
|
||||
let image: any = $state()
|
||||
let image = $state<any>(null)
|
||||
|
||||
const shortcuts = {
|
||||
KeyB: () => wrapSelection('**', '**'),
|
||||
|
||||
@@ -35,12 +35,9 @@
|
||||
}
|
||||
|
||||
function conversationPreviews(
|
||||
conversations: PrivateMessageView[],
|
||||
conversations: PrivateMessageView[]
|
||||
): ConversationPreview[] {
|
||||
const deduplicated = filterDuplicates(
|
||||
conversations.toReversed(),
|
||||
(i) => i.creator.id,
|
||||
)
|
||||
const deduplicated = filterDuplicates(conversations, (i) => i.creator.id)
|
||||
|
||||
return deduplicated.map((i) => ({
|
||||
user: i.creator,
|
||||
@@ -64,7 +61,7 @@
|
||||
{:then data}
|
||||
{@const conversations = data.private_messages}
|
||||
{@const previews = conversationPreviews(conversations).filter(
|
||||
(c) => c.user.id != profile.data?.user?.local_user_view.person.id,
|
||||
(c) => c.user.id != profile.data?.user?.local_user_view.person.id
|
||||
)}
|
||||
|
||||
<ul
|
||||
@@ -83,9 +80,13 @@
|
||||
}}
|
||||
>
|
||||
<Avatar url={preview.user.avatar} alt={preview.user.name} width={32} />
|
||||
<div class="flex flex-col">
|
||||
<div class="flex flex-col w-full overflow-hidden">
|
||||
<div class="font-medium">{preview.user.name}</div>
|
||||
<div class="text-slate-700 dark:text-zinc-300 text-sm">
|
||||
<div
|
||||
class="text-sm overflow-ellipsis whitespace-nowrap
|
||||
bg-gradient-to-r from-slate-700 via-slate-700 to-slate-700/0 dark:from-zinc-300 dark:via-zinc-300 dark:to-zinc-300/0
|
||||
text-transparent bg-clip-text"
|
||||
>
|
||||
{preview.message.content}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user