2025-11-03 23:27:05 -06:00
|
|
|
@namespace LANCommander.UI.Components
|
|
|
|
|
|
2025-12-30 18:08:20 -06:00
|
|
|
<Flex Direction="FlexDirection.Vertical">
|
|
|
|
|
@foreach (var thread in Threads)
|
|
|
|
|
{
|
|
|
|
|
<ChatListThread Thread="thread" OnSelected="SelectThread" Active="@(SelectedThread?.Id == thread.Id)" />
|
|
|
|
|
}
|
|
|
|
|
</Flex>
|
2025-11-03 23:27:05 -06:00
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
}
|
|
|
|
|
}
|