forked from coracle/flotilla
Handle escape in chat
This commit is contained in:
@@ -280,6 +280,12 @@
|
||||
cleanup = feed.cleanup
|
||||
}
|
||||
|
||||
const onEscape = () => {
|
||||
clearParent()
|
||||
clearShare()
|
||||
eventToEdit = undefined
|
||||
}
|
||||
|
||||
const canEditEvent = (event: TrustedEvent) =>
|
||||
event.pubkey === $pubkey && event.created_at >= ago(5, MINUTE)
|
||||
|
||||
@@ -492,6 +498,7 @@
|
||||
{url}
|
||||
{h}
|
||||
{onSubmit}
|
||||
{onEscape}
|
||||
{onEditPrevious}
|
||||
content={eventToEdit?.content}
|
||||
bind:this={compose} />
|
||||
|
||||
@@ -188,6 +188,12 @@
|
||||
return elements
|
||||
})
|
||||
|
||||
const onEscape = () => {
|
||||
clearParent()
|
||||
clearShare()
|
||||
eventToEdit = undefined
|
||||
}
|
||||
|
||||
const canEditEvent = (event: TrustedEvent) =>
|
||||
event.pubkey === $pubkey && event.created_at >= ago(5, MINUTE)
|
||||
|
||||
@@ -315,6 +321,7 @@
|
||||
<RoomCompose
|
||||
{url}
|
||||
{onSubmit}
|
||||
{onEscape}
|
||||
{onEditPrevious}
|
||||
content={eventToEdit?.content}
|
||||
bind:this={compose} />
|
||||
|
||||
Reference in New Issue
Block a user