diff --git a/src/web/Jordnaer/Features/Chat/ChatMessageList.razor b/src/web/Jordnaer/Features/Chat/ChatMessageList.razor index d0ae3f81..0247082b 100644 --- a/src/web/Jordnaer/Features/Chat/ChatMessageList.razor +++ b/src/web/Jordnaer/Features/Chat/ChatMessageList.razor @@ -9,13 +9,17 @@ @attribute [Authorize] -@if (ActiveChat is null) -{ - Der er ingen chat valgt - return; -} + + + @if (ActiveChat is null) + { + + + Vælg én at skrive med + + return; + } - @if (IsMobile) { + @code { [Parameter, EditorRequired] @@ -117,6 +122,14 @@ private bool IsMessageFromSelf(ChatMessageDto message) => message.SenderId == CurrentUser.Id; + private string MudItemClass => ActiveChat is null + ? "chat-message-window d-flex align-center justify-center" + : "chat-message-window"; + + private string MudItemStyle => ActiveChat is null + ? "padding: 0" + : ""; + private string GetRecipientsProfilePictureUrl(ChatMessageDto message) => ActiveChat? .Recipients @@ -149,7 +162,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) { - await ScrollToBottom(); + await ScrollToBottom(); } private void MarkMessageIfSuccessfullySentByCurrentUser() diff --git a/src/web/Jordnaer/Features/Chat/UserAutoComplete.razor b/src/web/Jordnaer/Features/Chat/UserAutoComplete.razor index d095fabd..8aaee1c7 100644 --- a/src/web/Jordnaer/Features/Chat/UserAutoComplete.razor +++ b/src/web/Jordnaer/Features/Chat/UserAutoComplete.razor @@ -17,7 +17,7 @@ - + @if ((_activeChat is null && _isMobile) || _isMobile is false) { @@ -27,17 +27,15 @@ @if (_isMobile is false) { - - + + } - @if (_activeChat is not null) - { - - } + +