2026-04-14 13:15:38 +00:00
|
|
|
import * as React from "bloatless-react";
|
|
|
|
|
|
|
|
|
|
import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel";
|
|
|
|
|
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
|
|
|
|
|
|
|
|
|
|
export function ReplyPreview(
|
|
|
|
|
coreViewModel: CoreViewModel,
|
|
|
|
|
chatMessageViewModel: ChatMessageViewModel,
|
|
|
|
|
) {
|
|
|
|
|
return (
|
2026-04-14 19:29:49 +00:00
|
|
|
<div class="reply-preview">
|
2026-04-14 19:35:58 +00:00
|
|
|
<div class="surface blur">
|
2026-04-14 13:15:38 +00:00
|
|
|
<span class="secondary">{chatMessageViewModel.sender}</span>
|
|
|
|
|
<b class="ellipsis" subscribe:innerText={chatMessageViewModel.body}></b>
|
|
|
|
|
</div>
|
|
|
|
|
<button
|
2026-04-14 19:35:58 +00:00
|
|
|
class="standard square blur"
|
2026-04-14 13:15:38 +00:00
|
|
|
on:click={chatMessageViewModel.cancelReply}
|
|
|
|
|
aria-label={coreViewModel.translations.chatPage.message.cancelReplyAudioLabel}
|
|
|
|
|
>
|
|
|
|
|
<span class="icon">close</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|