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>
|
||||||
</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 class="left-column">
|
||||||
<div>
|
<div>
|
||||||
<span :class="{ 'invisible': dateHidden }" class="message-date" :title="date.toString()">
|
<span :class="{ 'invisible': dateHidden }" class="message-date" :title="date.toString()">
|
||||||
|
@ -42,7 +42,7 @@ const props = defineProps<{
|
||||||
text: string,
|
text: string,
|
||||||
timestamp: number,
|
timestamp: number,
|
||||||
format: "12" | "24",
|
format: "12" | "24",
|
||||||
type: "normal" | "compact",
|
type: "normal" | "grouped",
|
||||||
marginBottom: boolean
|
marginBottom: boolean
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,13 @@ import scrollToBottom from '~/utils/scrollToBottom';
|
||||||
const props = defineProps<{ channelUrl: string, amount?: number, offset?: number }>();
|
const props = defineProps<{ channelUrl: string, amount?: number, offset?: number }>();
|
||||||
|
|
||||||
const messageTimestamps = ref<Record<string, 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(
|
const messagesRes: MessageResponse[] | undefined = await fetchWithApi(
|
||||||
`${props.channelUrl}/messages`,
|
`${props.channelUrl}/messages`,
|
||||||
{ query: { "amount": props.amount ?? 100, "offset": props.offset ?? 0 } }
|
{ query: { "amount": props.amount ?? 100, "offset": props.offset ?? 0 } }
|
||||||
);
|
);
|
||||||
|
|
||||||
if (messagesRes) {
|
if (messagesRes) {
|
||||||
messagesRes.reverse();
|
messagesRes.reverse();
|
||||||
console.log("messages res:", messagesRes.map(msg => msg.message));
|
console.log("messages res:", messagesRes.map(msg => msg.message));
|
||||||
|
@ -77,7 +78,7 @@ if (messagesRes) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
console.log("RETURNING " + lessThanMax.toString().toUpperCase());
|
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