prepare UI
This commit is contained in:
+13
-2
@@ -2,14 +2,25 @@ import * as React from "bloatless-react";
|
||||
|
||||
import { MessageComposer } from "../Views/messageComposer";
|
||||
import { ThreadView } from "../Views/threadView";
|
||||
import { clearMessageHistory } from "../model";
|
||||
import { selectedChat } from "../Model/model";
|
||||
import { translation } from "../translations";
|
||||
|
||||
export function MessageTab() {
|
||||
function clearMessageHistory() {
|
||||
selectedChat.value?.clearMessages();
|
||||
}
|
||||
|
||||
const headerText = React.createProxyState([selectedChat], () =>
|
||||
selectedChat.value != undefined
|
||||
? selectedChat.value.currentChannel
|
||||
: translation.messages
|
||||
);
|
||||
|
||||
return (
|
||||
<article id="message-tab">
|
||||
<header>
|
||||
{translation.messages}
|
||||
<span subscribe:innerText={headerText}>
|
||||
</span>
|
||||
<span>
|
||||
<button
|
||||
aria-label={translation.clearHistory}
|
||||
|
||||
Reference in New Issue
Block a user