feat: change grouped messages being called compact to grouped
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
3c65a700ff
commit
4da2ede58a
2 changed files with 5 additions and 4 deletions
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else ref="messageElement" class="message compact-message">
|
||||
<div v-else ref="messageElement" class="message grouped-message">
|
||||
<div class="left-column">
|
||||
<div>
|
||||
<span :class="{ 'invisible': dateHidden }" class="message-date" :title="date.toString()">
|
||||
|
@ -42,7 +42,7 @@ const props = defineProps<{
|
|||
text: string,
|
||||
timestamp: number,
|
||||
format: "12" | "24",
|
||||
type: "normal" | "compact",
|
||||
type: "normal" | "grouped",
|
||||
marginBottom: boolean
|
||||
}>();
|
||||
|
||||
|
|
|
@ -27,12 +27,13 @@ import scrollToBottom from '~/utils/scrollToBottom';
|
|||
const props = defineProps<{ channelUrl: string, amount?: number, offset?: number }>();
|
||||
|
||||
const messageTimestamps = ref<Record<string, number>>({});
|
||||
const messagesType = ref<Record<string, "normal" | "compact">>({});
|
||||
const messagesType = ref<Record<string, "normal" | "grouped">>({});
|
||||
|
||||
const messagesRes: MessageResponse[] | undefined = await fetchWithApi(
|
||||
`${props.channelUrl}/messages`,
|
||||
{ query: { "amount": props.amount ?? 100, "offset": props.offset ?? 0 } }
|
||||
);
|
||||
|
||||
if (messagesRes) {
|
||||
messagesRes.reverse();
|
||||
console.log("messages res:", messagesRes.map(msg => msg.message));
|
||||
|
@ -77,7 +78,7 @@ if (messagesRes) {
|
|||
continue;
|
||||
}
|
||||
console.log("RETURNING " + lessThanMax.toString().toUpperCase());
|
||||
messagesType.value[message.uuid] = "compact";
|
||||
messagesType.value[message.uuid] = "grouped";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue