|
@ -81,7 +81,7 @@ |
|
|
|
|
|
|
|
|
const dispatch = createEventDispatcher(); |
|
|
const dispatch = createEventDispatcher(); |
|
|
let showProfileMenu = false; |
|
|
let showProfileMenu = false; |
|
|
let selectedUser = null; |
|
|
let selectedUser: string | null = null; |
|
|
function openProfile(username: string) { |
|
|
function openProfile(username: string) { |
|
|
showProfileMenu = true; |
|
|
showProfileMenu = true; |
|
|
selectedUser = username; |
|
|
selectedUser = username; |
|
@ -301,7 +301,12 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onSendMessage() { |
|
|
|
|
|
dispatch("send-message", selectedUser); |
|
|
|
|
|
showProfileMenu = false; |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<div class="overlay"> |
|
|
<div class="overlay"> |
|
|
<div class="chat" on:click|stopPropagation on:keydown|stopPropagation> |
|
|
<div class="chat" on:click|stopPropagation on:keydown|stopPropagation> |
|
|
<div class="messages"> |
|
|
<div class="messages"> |
|
@ -328,7 +333,7 @@ |
|
|
> |
|
|
> |
|
|
<ul> |
|
|
<ul> |
|
|
<li> |
|
|
<li> |
|
|
<button on:click={() => dispatch("send-message", selectedUser)}> |
|
|
<button on:click={onSendMessage}> |
|
|
Send Message |
|
|
Send Message |
|
|
</button> |
|
|
</button> |
|
|
</li> |
|
|
</li> |
|
|