flotilla/src/app/components/ChatMenu.svelte

26 lines
718 B
Svelte
Raw Normal View History

2025-01-15 19:07:21 +00:00
<script lang="ts">
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
import ChatStart from "@app/components/ChatStart.svelte"
import {setChecked} from "@app/util/notifications"
import {pushModal} from "@app/util/modal"
2025-01-15 19:07:21 +00:00
const startChat = () => pushModal(ChatStart, {}, {replaceState: true})
const markAsRead = () => {
setChecked("/chat/*")
history.back()
}
</script>
<div class="col-2">
<Button class="btn btn-primary" onclick={startChat}>
2025-01-15 19:07:21 +00:00
<Icon size={4} icon="add-circle" />
Start chat
</Button>
<Button class="btn btn-neutral" onclick={markAsRead}>
2025-01-15 19:07:21 +00:00
<Icon size={4} icon="check-circle" />
Mark all read
</Button>
</div>