-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code(WEB::Drawer): Implement chat deletion from history
- Loading branch information
1 parent
a8d5bf3
commit 15900c2
Showing
4 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
14 changes: 10 additions & 4 deletions
14
src/Client/StellarChat.Client.Web/Components/ChatHistoryItem.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
@inject NavigationManager NavigationManager | ||
@inject IChatService _chatService | ||
@inject IDialogService _dialogService | ||
|
||
<div Class="d-flex flex-row flex-grow-1 gap-1 pa-2" Elevation="0"> | ||
<MudAvatar Class="my-auto"> | ||
<MudImage Size="Size.Medium" Src="https://avatars.githubusercontent.com/u/49451143?v=4"></MudImage> | ||
</MudAvatar> | ||
<MudListItem OnClick="@NavigateToChat"> | ||
@ChatSessionIteam?.Title | ||
@ChatSessionItem?.Title | ||
</MudListItem> | ||
<MudMenu Class="" Icon="@Icons.Material.Filled.MoreVert"> | ||
<MudMenuItem>Rename</MudMenuItem> | ||
<MudMenuItem>Delete</MudMenuItem> | ||
<MudMenuItem OnClick="DeleteChat">Delete</MudMenuItem> | ||
</MudMenu> | ||
</div> | ||
<MudDivider /> | ||
|
||
@code | ||
{ | ||
[Parameter] public ChatSessionResponse? ChatSessionIteam { get; set; } | ||
[Parameter] public ChatSessionResponse? ChatSessionItem { get; set; } | ||
[Parameter] public EventCallback<ChatSessionResponse> OnDeleteChat { get; set; } | ||
|
||
private void NavigateToChat() | ||
{ | ||
|
||
} | ||
|
||
private async Task DeleteChat() | ||
=> await OnDeleteChat.InvokeAsync(ChatSessionItem); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters