Add chat start dialog

This commit is contained in:
Jon Staab
2024-10-03 15:28:06 -07:00
parent d956e5ac4a
commit 749185190b
8 changed files with 148 additions and 74 deletions
+3 -1
View File
@@ -1,6 +1,6 @@
import {nip19} from "nostr-tools"
import type {Page} from "@sveltejs/kit"
import {userMembership, decodeNRelay} from "@app/state"
import {userMembership, makeChatId, decodeNRelay} from "@app/state"
export const makeSpacePath = (url: string, extra = "") => {
let path = `/spaces/${nip19.nrelayEncode(url)}`
@@ -12,6 +12,8 @@ export const makeSpacePath = (url: string, extra = "") => {
return path
}
export const makeChatPath = (pubkeys: string[]) => `/home/${makeChatId(pubkeys)}`
export const getPrimaryNavItem = ($page: Page) => $page.route?.id?.split("/")[1]
export const getPrimaryNavItemIndex = ($page: Page) => {