fix bugs, improve UI

This commit is contained in:
marlon-erler
2024-07-11 22:27:15 +02:00
parent afc0a10b52
commit 1bf2f4ced2
12 changed files with 209 additions and 90 deletions
+6 -12
View File
@@ -2,6 +2,7 @@ import * as React from "bloatless-react";
import { Chat, MessageObject } from "../../Model/chatModel";
import { ObjectEntryView } from "./objectEntryView";
import { translation } from "../../translations";
export function AllObjectsView(
@@ -12,18 +13,11 @@ export function AllObjectsView(
const objectConverter: React.StateItemConverter<MessageObject> = (
messageObject
) => {
function select() {
selectedObject.value = messageObject;
isShowingObjectModal.value = true;
}
return (
<button class="tile" on:click={select}>
<div>
<b>{chat.getObjectTitle(messageObject)}</b>
<span class="secondary">{messageObject.id}</span>
</div>
</button>
return ObjectEntryView(
chat,
messageObject,
selectedObject,
isShowingObjectModal
);
};