implement showing only replies
This commit is contained in:
@@ -7,6 +7,7 @@ import * as React from "../../react";
|
|||||||
import MessagePageViewModel from "../../ViewModel/Pages/messagePageViewModel";
|
import MessagePageViewModel from "../../ViewModel/Pages/messagePageViewModel";
|
||||||
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
|
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
|
||||||
import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel";
|
import ChatMessageViewModel from "../../ViewModel/Chat/chatMessageViewModel";
|
||||||
|
import {ReplyViewHeader} from "../Components/replyViewHeader";
|
||||||
|
|
||||||
export function MessagePage(
|
export function MessagePage(
|
||||||
coreViewModel: CoreViewModel,
|
coreViewModel: CoreViewModel,
|
||||||
@@ -99,6 +100,7 @@ export function MessagePage(
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
{ReplyViewHeader(coreViewModel, messagePageViewModel)}
|
||||||
{messageContainer}
|
{messageContainer}
|
||||||
<div id="composer">
|
<div id="composer">
|
||||||
<div class="content-width-constraint">
|
<div class="content-width-constraint">
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import * as React from "../../react";
|
||||||
|
import CoreViewModel from "../../ViewModel/Global/coreViewModel";
|
||||||
|
import MessagePageViewModel from "../../ViewModel/Pages/messagePageViewModel";
|
||||||
|
|
||||||
|
export function ReplyViewHeader(coreViewModel: CoreViewModel, messagePageViewModel: MessagePageViewModel) {
|
||||||
|
const isHidden = React.createProxyState([messagePageViewModel.replyViewSelectedMessage], ()=>messagePageViewModel.replyViewSelectedMessage.value == undefined);
|
||||||
|
|
||||||
|
const label = React.createProxyState([messagePageViewModel.replyViewSelectedMessage], ()=>coreViewModel.translations.chatPage.message.replyHeaderLabel(messagePageViewModel.replyViewSelectedMessage.value.sender));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
class="reply-header"
|
||||||
|
toggle:hidden={isHidden}
|
||||||
|
>
|
||||||
|
<b class="ellipsis" subscribe:innerText={label}></b>
|
||||||
|
<button
|
||||||
|
class="primary square"
|
||||||
|
on:click={messagePageViewModel.resetReplyView}
|
||||||
|
>
|
||||||
|
<span class="icon">close</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -252,6 +252,7 @@ const englishTranslations = {
|
|||||||
//
|
//
|
||||||
|
|
||||||
replyPrefixLabel: "Replies: ",
|
replyPrefixLabel: "Replies: ",
|
||||||
|
replyHeaderLabel: (sender: string) => `Replies to ${sender}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
task: {
|
task: {
|
||||||
@@ -575,6 +576,7 @@ export const allTranslations: {
|
|||||||
questionReaction: "Reaktion: Fragezeichen",
|
questionReaction: "Reaktion: Fragezeichen",
|
||||||
|
|
||||||
replyPrefixLabel: "Antworten: ",
|
replyPrefixLabel: "Antworten: ",
|
||||||
|
replyHeaderLabel: (sender: string) => `Antworten an ${sender}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
task: {
|
task: {
|
||||||
@@ -879,6 +881,7 @@ export const allTranslations: {
|
|||||||
questionReaction: "Reaccion: signo de interrogación",
|
questionReaction: "Reaccion: signo de interrogación",
|
||||||
|
|
||||||
replyPrefixLabel: "Respuestas: ",
|
replyPrefixLabel: "Respuestas: ",
|
||||||
|
replyHeaderLabel: (sender: string) => `Respuestas a ${sender}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
task: {
|
task: {
|
||||||
|
|||||||
Reference in New Issue
Block a user