Add thread share button

This commit is contained in:
Jon Staab
2024-10-23 16:41:11 -07:00
parent 306a0f0f3d
commit e327bebe12
7 changed files with 143 additions and 47 deletions
+12
View File
@@ -4,6 +4,7 @@
import Icon from "@lib/components/Icon.svelte"
import Confirm from "@lib/components/Confirm.svelte"
import EventInfo from "@app/components/EventInfo.svelte"
import ThreadShare from "@app/components/ThreadShare.svelte"
import {publishDelete} from "@app/commands"
import {pushModal} from "@app/modal"
@@ -16,6 +17,11 @@
pushModal(EventInfo, {event})
}
const share = () => {
onClick()
pushModal(ThreadShare, {url, event})
}
const showDelete = () => {
onClick()
pushModal(Confirm, {
@@ -34,6 +40,12 @@
</script>
<ul class="menu whitespace-nowrap rounded-box bg-base-100 p-2 shadow-xl">
<li>
<Button on:click={share}>
<Icon size={4} icon="share-circle" />
Share to Chat
</Button>
</li>
<li>
<Button on:click={showInfo}>
<Icon size={4} icon="code-2" />