2024-07-21 13:13:41 +02:00
|
|
|
import * as React from "bloatless-react";
|
2026-04-18 11:55:01 +00:00
|
|
|
import { MessageReactionEntry } from "../Components/messageReactionEntry";
|
2026-04-07 19:13:29 +00:00
|
|
|
import { MessageReactionButtonRow } from "../Components/messageReactionButtonRow";
|
2026-04-09 15:42:53 +00:00
|
|
|
import { InfoTile } from "../Components/infoTile";
|
2026-04-09 16:48:22 +00:00
|
|
|
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
|
2026-04-18 11:55:01 +00:00
|
|
|
import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel";
|
2024-07-21 13:13:41 +02:00
|
|
|
|
|
|
|
|
export function ChatMessageInfoModal(
|
2026-04-09 16:48:22 +00:00
|
|
|
coreViewModel: CoreViewModel,
|
2026-04-01 08:29:39 +00:00
|
|
|
chatMessageViewModel: ChatMessageViewModel,
|
2024-07-21 13:13:41 +02:00
|
|
|
) {
|
2026-04-01 08:29:39 +00:00
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
class="modal"
|
|
|
|
|
toggle:open={chatMessageViewModel.isPresentingInfoModal}
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<main>
|
2026-04-09 16:48:22 +00:00
|
|
|
<h2>
|
|
|
|
|
{
|
|
|
|
|
coreViewModel.translations.chatPage.message
|
|
|
|
|
.messageInfoHeadline
|
|
|
|
|
}
|
|
|
|
|
</h2>
|
2024-07-21 13:13:41 +02:00
|
|
|
|
2026-04-01 08:29:39 +00:00
|
|
|
<div class="flex-column gap">
|
2026-04-09 15:45:19 +00:00
|
|
|
{InfoTile(
|
|
|
|
|
"account_circle",
|
2026-04-09 16:48:22 +00:00
|
|
|
coreViewModel.translations.chatPage.message.sentBy,
|
2026-04-09 15:45:19 +00:00
|
|
|
chatMessageViewModel.sender,
|
|
|
|
|
)}
|
|
|
|
|
{InfoTile(
|
|
|
|
|
"schedule",
|
2026-04-09 16:48:22 +00:00
|
|
|
coreViewModel.translations.chatPage.message
|
|
|
|
|
.timeSent,
|
2026-04-09 15:45:19 +00:00
|
|
|
chatMessageViewModel.dateSent,
|
|
|
|
|
)}
|
|
|
|
|
{InfoTile(
|
|
|
|
|
"forum",
|
2026-04-09 16:48:22 +00:00
|
|
|
coreViewModel.translations.chatPage.message.channel,
|
2026-04-09 15:45:19 +00:00
|
|
|
chatMessageViewModel.channel,
|
|
|
|
|
)}
|
|
|
|
|
{InfoTile(
|
|
|
|
|
"description",
|
2026-04-09 16:48:22 +00:00
|
|
|
coreViewModel.translations.chatPage.message
|
|
|
|
|
.messageContent,
|
2026-04-09 15:45:19 +00:00
|
|
|
chatMessageViewModel.body,
|
|
|
|
|
)}
|
2026-04-01 08:29:39 +00:00
|
|
|
</div>
|
2024-07-21 13:13:41 +02:00
|
|
|
|
2026-04-01 08:29:39 +00:00
|
|
|
<hr></hr>
|
2024-07-21 13:13:41 +02:00
|
|
|
|
2026-04-01 08:29:39 +00:00
|
|
|
<div class="flex-column gap">
|
|
|
|
|
<button on:click={chatMessageViewModel.copyMessage}>
|
2026-04-09 16:48:22 +00:00
|
|
|
{
|
|
|
|
|
coreViewModel.translations.chatPage.message
|
|
|
|
|
.copyMessageButton
|
|
|
|
|
}
|
2026-04-01 08:29:39 +00:00
|
|
|
<span class="icon">content_copy</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button on:click={chatMessageViewModel.resendMessage}>
|
2026-04-09 16:48:22 +00:00
|
|
|
{
|
|
|
|
|
coreViewModel.translations.chatPage.message
|
|
|
|
|
.resendMessageButton
|
|
|
|
|
}
|
2026-04-01 08:29:39 +00:00
|
|
|
<span class="icon">redo</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button on:click={chatMessageViewModel.decryptMessage}>
|
2026-04-09 16:48:22 +00:00
|
|
|
{
|
|
|
|
|
coreViewModel.translations.chatPage.message
|
|
|
|
|
.decryptMessageButton
|
|
|
|
|
}
|
2026-04-01 08:29:39 +00:00
|
|
|
<span class="icon">key</span>
|
|
|
|
|
</button>
|
2026-04-14 13:15:38 +00:00
|
|
|
<button on:click={chatMessageViewModel.reply}>
|
|
|
|
|
{
|
|
|
|
|
coreViewModel.translations.chatPage.message
|
|
|
|
|
.replyToMessageButton
|
|
|
|
|
}
|
|
|
|
|
<span class="icon">reply</span>
|
|
|
|
|
</button>
|
2026-04-01 08:29:39 +00:00
|
|
|
</div>
|
2026-04-07 18:39:55 +00:00
|
|
|
|
|
|
|
|
<hr></hr>
|
|
|
|
|
|
2026-04-11 17:47:24 +00:00
|
|
|
<div class="flex-column gap">
|
|
|
|
|
{MessageReactionButtonRow(
|
|
|
|
|
coreViewModel,
|
|
|
|
|
chatMessageViewModel,
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
class="flex-column gap"
|
|
|
|
|
children:append={[
|
|
|
|
|
chatMessageViewModel.allReactions,
|
|
|
|
|
MessageReactionEntry,
|
|
|
|
|
]}
|
|
|
|
|
></div>
|
|
|
|
|
</div>
|
2026-04-01 08:29:39 +00:00
|
|
|
</main>
|
|
|
|
|
<button on:click={chatMessageViewModel.hideInfoModal}>
|
2026-04-09 16:48:22 +00:00
|
|
|
{coreViewModel.translations.general.closeButton}
|
2026-04-01 08:29:39 +00:00
|
|
|
<span class="icon">close</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2024-07-21 13:13:41 +02:00
|
|
|
}
|