Remove extra attach and rename bottom button
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m18s

This commit is contained in:
2026-03-10 12:02:14 +00:00
parent c58c19cc1e
commit 165852e738

View File

@@ -57,7 +57,10 @@ function parseMessageParts(text) {
let match; let match;
while ((match = urlRegex.exec(text)) !== null) { while ((match = urlRegex.exec(text)) !== null) {
if (match.index > lastIndex) { if (match.index > lastIndex) {
parts.push({ type: "text", value: text.slice(lastIndex, match.index) }); parts.push({
type: "text",
value: text.slice(lastIndex, match.index),
});
} }
parts.push({ type: "link", value: match[1] }); parts.push({ type: "link", value: match[1] });
lastIndex = urlRegex.lastIndex; lastIndex = urlRegex.lastIndex;
@@ -85,8 +88,18 @@ onUnmounted(() => {
> >
<p v-for="message in messages" :key="message.id"> <p v-for="message in messages" :key="message.id">
<span class="text-tertiary">{{ message.authorId }}:</span> <span class="text-tertiary">{{ message.authorId }}:</span>
<template v-for="(part, i) in parseMessageParts(message.text || '')" :key="i"> <template
<a v-if="part.type === 'link'" :href="part.value" target="_blank" rel="noopener noreferrer" class="text-primary underline">{{ part.value }}</a> v-for="(part, i) in parseMessageParts(message.text || '')"
:key="i"
>
<a
v-if="part.type === 'link'"
:href="part.value"
target="_blank"
rel="noopener noreferrer"
class="text-primary underline"
>{{ part.value }}</a
>
<span v-else>{{ part.value }}</span> <span v-else>{{ part.value }}</span>
</template> </template>
<template <template
@@ -126,8 +139,7 @@ onUnmounted(() => {
>Attach</Button >Attach</Button
> >
<div class="flex gap-2"> <div class="flex gap-2">
<Button @click="fileInput.click()">Attach</Button> <Button @click="scrollToBottom">Bottom</Button>
<Button @click="scrollToBottom">To Bottom</Button>
</div> </div>
</div> </div>
</div> </div>