- Load thread after creation - Change thread list from DataList to Flex - Move unread badge to right side of chat thread list item - Fix avatar rerendering after another message is added to message group - Add styling to thread list - Change message input to support markdown and add markdown rendering for message contents
22 lines
No EOL
748 B
Text
22 lines
No EOL
748 B
Text
@namespace LANCommander.UI.Components
|
|
|
|
<Flex Direction="FlexDirection.Vertical">
|
|
@foreach (var thread in Threads)
|
|
{
|
|
<ChatListThread Thread="thread" OnSelected="SelectThread" Active="@(SelectedThread?.Id == thread.Id)" />
|
|
}
|
|
</Flex>
|
|
|
|
@code {
|
|
[Parameter] public required IEnumerable<SDK.Models.ChatThread> Threads { get; set; } = [];
|
|
[Parameter] public SDK.Models.ChatThread? SelectedThread { get; set; }
|
|
[Parameter] public EventCallback<SDK.Models.ChatThread> SelectedThreadChanged { get; set; }
|
|
|
|
async Task SelectThread(SDK.Models.ChatThread thread)
|
|
{
|
|
SelectedThread = thread;
|
|
|
|
if (SelectedThreadChanged.HasDelegate)
|
|
await SelectedThreadChanged.InvokeAsync(SelectedThread);
|
|
}
|
|
} |