prepare UI

This commit is contained in:
marlon-erler
2024-07-09 14:11:20 +02:00
parent ff0f3d9499
commit 48633ce534
19 changed files with 640 additions and 901 deletions
+13 -2
View File
@@ -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}