mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
Allow mark all as read on desktop
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import type {Snippet} from "svelte"
|
||||||
import {page} from "$app/stores"
|
import {page} from "$app/stores"
|
||||||
import {WRAP} from "@welshman/util"
|
import {WRAP} from "@welshman/util"
|
||||||
import {Router} from "@welshman/router"
|
import {Router} from "@welshman/router"
|
||||||
@@ -10,18 +11,19 @@
|
|||||||
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
||||||
import SecondaryNavHeader from "@lib/components/SecondaryNavHeader.svelte"
|
import SecondaryNavHeader from "@lib/components/SecondaryNavHeader.svelte"
|
||||||
import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte"
|
import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte"
|
||||||
import ChatStart from "@app/components/ChatStart.svelte"
|
import ChatMenu from "@app/components/ChatMenu.svelte"
|
||||||
import ChatItem from "@app/components/ChatItem.svelte"
|
import ChatItem from "@app/components/ChatItem.svelte"
|
||||||
import {chatSearch} from "@app/state"
|
import {chatSearch} from "@app/state"
|
||||||
import {pullConservatively} from "@app/requests"
|
import {pullConservatively} from "@app/requests"
|
||||||
import {pushModal} from "@app/modal"
|
import {pushModal} from "@app/modal"
|
||||||
interface Props {
|
|
||||||
children?: import("svelte").Snippet
|
type Props = {
|
||||||
|
children?: Snippet
|
||||||
}
|
}
|
||||||
|
|
||||||
const {children}: Props = $props()
|
const {children}: Props = $props()
|
||||||
|
|
||||||
const startChat = () => pushModal(ChatStart)
|
const openMenu = () => pushModal(ChatMenu)
|
||||||
|
|
||||||
const promise = pullConservatively({
|
const promise = pullConservatively({
|
||||||
filters: [{kinds: [WRAP], "#p": [$pubkey!]}],
|
filters: [{kinds: [WRAP], "#p": [$pubkey!]}],
|
||||||
@@ -37,8 +39,8 @@
|
|||||||
<SecondaryNavSection>
|
<SecondaryNavSection>
|
||||||
<SecondaryNavHeader>
|
<SecondaryNavHeader>
|
||||||
Chats
|
Chats
|
||||||
<Button onclick={startChat}>
|
<Button onclick={openMenu}>
|
||||||
<Icon icon="add-circle" />
|
<Icon icon="menu-dots" />
|
||||||
</Button>
|
</Button>
|
||||||
</SecondaryNavHeader>
|
</SecondaryNavHeader>
|
||||||
</SecondaryNavSection>
|
</SecondaryNavSection>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import ContentSearch from "@lib/components/ContentSearch.svelte"
|
import ContentSearch from "@lib/components/ContentSearch.svelte"
|
||||||
import ChatItem from "@app/components/ChatItem.svelte"
|
import ChatItem from "@app/components/ChatItem.svelte"
|
||||||
import ChatStart from "@app/components/ChatStart.svelte"
|
import ChatStart from "@app/components/ChatStart.svelte"
|
||||||
import ChatMenuMobile from "@app/components/ChatMenuMobile.svelte"
|
import ChatMenu from "@app/components/ChatMenu.svelte"
|
||||||
import {chatSearch} from "@app/state"
|
import {chatSearch} from "@app/state"
|
||||||
import {pushModal} from "@app/modal"
|
import {pushModal} from "@app/modal"
|
||||||
import {setChecked} from "@app/notifications"
|
import {setChecked} from "@app/notifications"
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
const startChat = () => pushModal(ChatStart)
|
const startChat = () => pushModal(ChatStart)
|
||||||
|
|
||||||
const openMenu = () => pushModal(ChatMenuMobile)
|
const openMenu = () => pushModal(ChatMenu)
|
||||||
|
|
||||||
const chats = $derived($chatSearch.searchOptions(term))
|
const chats = $derived($chatSearch.searchOptions(term))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user