Compare commits
2 Commits
879ba5c37f
...
926b31de78
| Author | SHA1 | Date | |
|---|---|---|---|
| 926b31de78 | |||
| ea6b63de53 |
@@ -73,6 +73,7 @@ GoogleService-Info.plist
|
||||
.idea/
|
||||
.vscode/
|
||||
.claude/
|
||||
.local/
|
||||
|
||||
# OS generated
|
||||
.DS_Store
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
import {
|
||||
REPORT,
|
||||
ROOM_ADD_MEMBER,
|
||||
ROOM_JOIN,
|
||||
ROOM_LEAVE,
|
||||
ROOM_MEMBERS,
|
||||
ROOM_REMOVE_MEMBER,
|
||||
getPubkeyTagValues,
|
||||
getTagValue,
|
||||
sortEventsDesc,
|
||||
} from "@welshman/util"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {first, groupBy, removeUndefined} from "@welshman/lib"
|
||||
import {derived} from "svelte/store"
|
||||
import {deriveEventsForUrl} from "@app/repository"
|
||||
import {getRoomMembers} from "@app/members"
|
||||
// Action items (admin review queue)
|
||||
|
||||
export const deriveSpaceActionItems = (url: string) =>
|
||||
derived(
|
||||
deriveEventsForUrl(url, [
|
||||
{
|
||||
kinds: [REPORT, ROOM_JOIN, ROOM_LEAVE, ROOM_MEMBERS, ROOM_ADD_MEMBER, ROOM_REMOVE_MEMBER],
|
||||
},
|
||||
]),
|
||||
$events => {
|
||||
const getRoomId = (e: TrustedEvent) =>
|
||||
getTagValue(e.kind === ROOM_MEMBERS ? "d" : "h", e.tags)
|
||||
const reports = $events.filter(e => e.kind === REPORT)
|
||||
const pendingJoins: TrustedEvent[] = []
|
||||
|
||||
// Room-level join requests — most recent per pubkey+h
|
||||
for (const [h, roomEvents] of groupBy(getRoomId, $events)) {
|
||||
if (!h) continue
|
||||
|
||||
const roomJoins: TrustedEvent[] = []
|
||||
const roomLeaves: TrustedEvent[] = []
|
||||
const roomMembershipEvents: TrustedEvent[] = []
|
||||
|
||||
for (const event of roomEvents) {
|
||||
switch (event.kind) {
|
||||
case ROOM_JOIN:
|
||||
roomJoins.push(event)
|
||||
break
|
||||
case ROOM_LEAVE:
|
||||
roomLeaves.push(event)
|
||||
break
|
||||
case ROOM_MEMBERS:
|
||||
case ROOM_ADD_MEMBER:
|
||||
case ROOM_REMOVE_MEMBER:
|
||||
roomMembershipEvents.push(event)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const roomMembers = new Set(getRoomMembers(url, h, roomMembershipEvents))
|
||||
|
||||
pendingJoins.push(
|
||||
...removeUndefined(
|
||||
Array.from(groupBy(e => e.pubkey, roomJoins).values()).map(events =>
|
||||
first(sortEventsDesc(events)),
|
||||
),
|
||||
).filter(({pubkey, created_at}) => {
|
||||
if (roomMembers.has(pubkey)) return false
|
||||
if (
|
||||
roomMembershipEvents.some(event => {
|
||||
if (event.created_at <= created_at) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (event.kind === ROOM_MEMBERS) {
|
||||
return true
|
||||
}
|
||||
|
||||
return getPubkeyTagValues(event.tags).includes(pubkey)
|
||||
})
|
||||
) {
|
||||
return false
|
||||
}
|
||||
if (roomLeaves.some(e => e.pubkey === pubkey && e.created_at > created_at)) return false
|
||||
|
||||
return true
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
return sortEventsDesc([...reports, ...pendingJoins])
|
||||
},
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint prefer-rest-params: 0 */
|
||||
|
||||
import {page} from "$app/stores"
|
||||
import {getSetting} from "@app/core/state"
|
||||
import {getSetting} from "@app/settings"
|
||||
|
||||
const w = window as any
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {Room as LiveKitRoom} from "livekit-client"
|
||||
import {derived, writable} from "svelte/store"
|
||||
import {type Room} from "@app/core/state"
|
||||
import type {Room} from "@app/groups"
|
||||
|
||||
export type VoiceSession = {
|
||||
url: string
|
||||
|
||||
@@ -2,7 +2,7 @@ import {Track} from "livekit-client"
|
||||
import {MediaQuery} from "svelte/reactivity"
|
||||
import {derived, get, writable} from "svelte/store"
|
||||
import {currentVoiceSession, VoiceState, type VoiceSession, voiceState} from "@app/call/stores"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
export enum VideoCallLayout {
|
||||
Chat = "chat",
|
||||
|
||||
@@ -36,8 +36,9 @@ import {
|
||||
voiceState,
|
||||
} from "@app/call/stores"
|
||||
import {resetVideoCallLayout, triggerVideoFeedCount, videoPrimaryTileKey} from "@app/call/video"
|
||||
import {deriveLatestEventForUrl, deriveRoom, makeRoomId} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {deriveLatestEventForUrl} from "@app/repository"
|
||||
import {deriveRoom, makeRoomId} from "@app/groups"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
export const LIVEKIT_PARTICIPANTS = 39004
|
||||
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
import {DELETE, PROFILE, getPubkeyTagValues} from "@welshman/util"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {append, call, on, reject, remove, sort, sortBy, spec, uniq, uniqBy} from "@welshman/lib"
|
||||
import type {Override} from "@welshman/lib"
|
||||
import {createSearch, displayProfileByPubkey, pubkey, repository} from "@welshman/app"
|
||||
import {derived, readable} from "svelte/store"
|
||||
import {DM_KINDS} from "@app/content"
|
||||
import type {RepositoryUpdate} from "@welshman/net"
|
||||
import {makeDeriveItem, throttled} from "@welshman/store"
|
||||
export type Chat = {
|
||||
id: string
|
||||
pubkeys: string[]
|
||||
messages: TrustedEvent[]
|
||||
last_activity: number
|
||||
search_text: string
|
||||
}
|
||||
|
||||
export const getChatPubkeys = (pubkeys: string[]) => sort(uniq(append(pubkey.get()!, pubkeys)))
|
||||
|
||||
export const getChatPubkeysFromEvent = (event: TrustedEvent) =>
|
||||
getChatPubkeys(getPubkeyTagValues(event.tags).concat(event.pubkey))
|
||||
|
||||
export const makeChatId = (pubkeys: string[]) => {
|
||||
const userPubkey = pubkey.get()!
|
||||
const otherPubkeys = remove(userPubkey, uniq(pubkeys))
|
||||
const visiblePubkeys = otherPubkeys.length === 0 ? [userPubkey] : otherPubkeys
|
||||
|
||||
return sort(visiblePubkeys).join(",")
|
||||
}
|
||||
|
||||
export const splitChatId = (id: string) => getChatPubkeys(id.split(","))
|
||||
|
||||
export const chatsById = call(() => {
|
||||
const chatsById = new Map<string, Chat>()
|
||||
const chatsByPubkey = new Map<string, string[]>()
|
||||
|
||||
const addSearchText = (chat: Override<Chat, {search_text?: string}>) => {
|
||||
chat.search_text =
|
||||
chat.pubkeys.length === 1
|
||||
? displayProfileByPubkey(chat.pubkeys[0]) + " note to self"
|
||||
: remove(pubkey.get()!, chat.pubkeys).map(displayProfileByPubkey).join(" ")
|
||||
|
||||
return chat as Chat
|
||||
}
|
||||
|
||||
return readable(chatsById, set => {
|
||||
const indexChatByPubkeys = (chat: Chat) => {
|
||||
for (const pubkey of chat.pubkeys) {
|
||||
chatsByPubkey.set(pubkey, uniq(append(chat.id, chatsByPubkey.get(pubkey) || [])))
|
||||
}
|
||||
}
|
||||
|
||||
const addEvents = (events: TrustedEvent[]) => {
|
||||
let dirty = false
|
||||
for (const event of events) {
|
||||
if (DM_KINDS.includes(event.kind)) {
|
||||
const pubkeys = getChatPubkeysFromEvent(event)
|
||||
const id = makeChatId(pubkeys)
|
||||
const chat = chatsById.get(id)
|
||||
const messages = sortBy(
|
||||
e => -e.created_at,
|
||||
uniqBy(e => e.id, append(event, chat?.messages || [])),
|
||||
)
|
||||
const last_activity = Math.max(chat?.last_activity || 0, event.created_at)
|
||||
const updatedChat = addSearchText({id, pubkeys, messages, last_activity})
|
||||
|
||||
chatsById.set(id, updatedChat)
|
||||
indexChatByPubkeys(updatedChat)
|
||||
|
||||
dirty = true
|
||||
}
|
||||
|
||||
if (event.kind === PROFILE) {
|
||||
for (const chatId of chatsByPubkey.get(event.pubkey) || []) {
|
||||
const chat = chatsById.get(chatId)
|
||||
|
||||
if (chat) {
|
||||
addSearchText(chat)
|
||||
dirty = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dirty) {
|
||||
set(chatsById)
|
||||
}
|
||||
}
|
||||
|
||||
const removeEvents = (removed: Set<string>) => {
|
||||
let dirty = false
|
||||
|
||||
for (const id of removed) {
|
||||
const event = repository.getEvent(id)
|
||||
|
||||
if (event && DM_KINDS.includes(event.kind)) {
|
||||
for (const chatId of chatsByPubkey.get(event.pubkey) || []) {
|
||||
const chat = chatsById.get(chatId)
|
||||
|
||||
if (chat) {
|
||||
chat.messages = reject(spec({id: event.id}), chat.messages)
|
||||
dirty = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dirty) {
|
||||
set(chatsById)
|
||||
}
|
||||
}
|
||||
|
||||
addEvents(repository.query([{kinds: [...DM_KINDS, DELETE, PROFILE]}]))
|
||||
|
||||
const unsubscribers = [
|
||||
on(repository, "update", ({added, removed}: RepositoryUpdate) => {
|
||||
// Do this async so that profiles are populated
|
||||
setTimeout(() => {
|
||||
addEvents(added)
|
||||
removeEvents(removed)
|
||||
}, 200)
|
||||
}),
|
||||
]
|
||||
|
||||
return () => unsubscribers.forEach(call)
|
||||
})
|
||||
})
|
||||
|
||||
export const deriveChat = makeDeriveItem(chatsById)
|
||||
|
||||
export const chatSearch = derived(throttled(1500, chatsById), $chatsByPubkey => {
|
||||
return createSearch(
|
||||
sortBy(c => -c.last_activity, Array.from($chatsByPubkey.values())),
|
||||
{
|
||||
getValue: (chat: Chat) => chat.id,
|
||||
fuseOptions: {keys: ["search_text"]},
|
||||
},
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,16 @@
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {COMMENT, makeEvent} from "@welshman/util"
|
||||
import {publishThunk, tagEventForComment} from "@welshman/app"
|
||||
|
||||
export type CommentParams = {
|
||||
event: TrustedEvent
|
||||
content: string
|
||||
tags?: string[][]
|
||||
url?: string
|
||||
}
|
||||
|
||||
export const makeComment = ({url, event, content, tags = []}: CommentParams) =>
|
||||
makeEvent(COMMENT, {content, tags: [...tags, ...tagEventForComment(event, url)]})
|
||||
|
||||
export const publishComment = ({relays, ...params}: CommentParams & {relays: string[]}) =>
|
||||
publishThunk({event: makeComment({url: relays[0], ...params}), relays})
|
||||
@@ -5,7 +5,7 @@
|
||||
import Landing from "@app/components/Landing.svelte"
|
||||
import Toast from "@app/components/Toast.svelte"
|
||||
import PrimaryNav from "@app/components/PrimaryNav.svelte"
|
||||
import {modal} from "@app/util/modal"
|
||||
import {modal} from "@app/modal"
|
||||
|
||||
interface Props {
|
||||
children: Snippet
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import QRCode from "@app/components/QRCode.svelte"
|
||||
import type {Nip46Controller} from "@app/util/nip46"
|
||||
import type {Nip46Controller} from "@app/nip46"
|
||||
|
||||
type Props = {
|
||||
controller: Nip46Controller
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
import QrCode from "@assets/icons/qr-code.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import InfoBunker from "@app/components/InfoBunker.svelte"
|
||||
import type {Nip46Controller} from "@app/util/nip46"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import type {Nip46Controller} from "@app/nip46"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
controller: Nip46Controller
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
import EventActivity from "@app/components/EventActivity.svelte"
|
||||
import EventActions from "@app/components/EventActions.svelte"
|
||||
import CalendarEventEdit from "@app/components/CalendarEventEdit.svelte"
|
||||
import {publishDelete, publishReaction, canEnforceNip70} from "@app/core/commands"
|
||||
import {makeCalendarPath, makeSpacePath} from "@app/util/routes"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {publishDelete} from "@app/deletes"
|
||||
import {publishReaction} from "@app/reactions"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {makeCalendarPath, makeSpacePath} from "@app/routes"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import DateTimeInput from "@lib/components/DateTimeInput.svelte"
|
||||
import EditorContent from "@app/editor/EditorContent.svelte"
|
||||
import {PROTECTED} from "@app/core/state"
|
||||
import {PROTECTED, publishRoomQuote} from "@app/groups"
|
||||
import {makeEditor} from "@app/editor"
|
||||
import {DraftKey} from "@app/util/drafts"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {canEnforceNip70, publishRoomQuote} from "@app/core/commands"
|
||||
import {DraftKey} from "@app/drafts"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
|
||||
type Values = {
|
||||
d: string
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import CalendarEventHeader from "@app/components/CalendarEventHeader.svelte"
|
||||
import ProfileLink from "@app/components/ProfileLink.svelte"
|
||||
import RoomLink from "@app/components/RoomLink.svelte"
|
||||
import {makeCalendarPath} from "@app/util/routes"
|
||||
import {makeCalendarPath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -53,11 +53,13 @@
|
||||
import ChatComposeEdit from "@app/components/ChatComposeEdit.svelte"
|
||||
import ChatComposeParent from "@app/components/ChatComposeParent.svelte"
|
||||
import ThunkToast from "@app/components/ThunkToast.svelte"
|
||||
import {userSettingsValues, deriveChat, makeChatId} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {DraftKey} from "@app/util/drafts"
|
||||
import {makeDelete, prependParent} from "@app/core/commands"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {userSettingsValues} from "@app/settings"
|
||||
import {deriveChat, makeChatId} from "@app/chats"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {DraftKey} from "@app/drafts"
|
||||
import {makeDelete} from "@app/deletes"
|
||||
import {prependParent} from "@app/groups"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
type Props = {
|
||||
pubkeys: string[]
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import EditorContent from "@app/editor/EditorContent.svelte"
|
||||
import {makeEditor} from "@app/editor"
|
||||
import {type DraftKey} from "@app/util/drafts"
|
||||
import {type DraftKey} from "@app/drafts"
|
||||
|
||||
type Values = {
|
||||
content?: string | object
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {DEFAULT_RELAYS, DEFAULT_MESSAGING_RELAYS} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {DEFAULT_RELAYS, DEFAULT_MESSAGING_RELAYS} from "@app/env"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
import ProfileName from "@app/components/ProfileName.svelte"
|
||||
import ProfileCircle from "@app/components/ProfileCircle.svelte"
|
||||
import ProfileCircles from "@app/components/ProfileCircles.svelte"
|
||||
import {makeChatPath, goToChat} from "@app/util/routes"
|
||||
import {notifications} from "@app/util/notifications"
|
||||
import {makeChatPath, goToChat} from "@app/routes"
|
||||
import {notifications} from "@app/notifications"
|
||||
|
||||
interface Props {
|
||||
id: string
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {notificationSettings} from "@app/core/state"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {notificationSettings} from "@app/settings"
|
||||
|
||||
const markAsRead = () => {
|
||||
setChecked("/chat/*")
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import ChatMessageMenu from "@app/components/ChatMessageMenu.svelte"
|
||||
import ChatMessageMenuMobile from "@app/components/ChatMessageMenuMobile.svelte"
|
||||
import {colors} from "@app/core/state"
|
||||
import {makeDelete, makeReaction} from "@app/core/commands"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {colors} from "@app/theme"
|
||||
import {makeDelete} from "@app/deletes"
|
||||
import {makeReaction} from "@app/reactions"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
interface Props {
|
||||
event: TrustedEvent
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import SmileCircle from "@assets/icons/smile-circle.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import EmojiButton from "@lib/components/EmojiButton.svelte"
|
||||
import {makeReaction} from "@app/core/commands"
|
||||
import {makeReaction} from "@app/reactions"
|
||||
|
||||
interface Props {
|
||||
event: TrustedEvent
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ChatMessageEmojiButton from "@app/components/ChatMessageEmojiButton.svelte"
|
||||
import EventInfo from "@app/components/EventInfo.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
import Pen from "@assets/icons/pen.svg?dataurl"
|
||||
import Reply from "@assets/icons/reply-2.svg?dataurl"
|
||||
import Code2 from "@assets/icons/code-2.svg?dataurl"
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import EmojiPicker from "@lib/components/EmojiPicker.svelte"
|
||||
import EventInfo from "@app/components/EventInfo.svelte"
|
||||
import {makeReaction} from "@app/core/commands"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {clip} from "@app/util/toast"
|
||||
import {makeReaction} from "@app/reactions"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {clip} from "@app/toast"
|
||||
|
||||
type Props = {
|
||||
pubkeys: string[]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ProfileMultiSelect from "@app/components/ProfileMultiSelect.svelte"
|
||||
import {goToChat} from "@app/util/routes"
|
||||
import {goToChat} from "@app/routes"
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
import EventActivity from "@app/components/EventActivity.svelte"
|
||||
import EventActions from "@app/components/EventActions.svelte"
|
||||
import ClassifiedEdit from "@app/components/ClassifiedEdit.svelte"
|
||||
import {publishDelete, publishReaction, canEnforceNip70} from "@app/core/commands"
|
||||
import {makeClassifiedPath, makeSpacePath} from "@app/util/routes"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {publishDelete} from "@app/deletes"
|
||||
import {publishReaction} from "@app/reactions"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {makeClassifiedPath, makeSpacePath} from "@app/routes"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
interface Props {
|
||||
url: string
|
||||
|
||||
@@ -17,11 +17,12 @@
|
||||
import CurrencyInput from "@app/components/CurrencyInput.svelte"
|
||||
import TopicMultiSelect from "@app/components/TopicMultiSelect.svelte"
|
||||
import EditorContent from "@app/editor/EditorContent.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PROTECTED} from "@app/core/state"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {PROTECTED, publishRoomQuote} from "@app/groups"
|
||||
import {makeEditor} from "@app/editor"
|
||||
import {DraftKey} from "@app/util/drafts"
|
||||
import {canEnforceNip70, publishRoomQuote, uploadFile} from "@app/core/commands"
|
||||
import {DraftKey} from "@app/drafts"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {uploadFile} from "@app/uploads"
|
||||
|
||||
type Values = {
|
||||
d: string
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import ProfileLink from "@app/components/ProfileLink.svelte"
|
||||
import ClassifiedActions from "@app/components/ClassifiedActions.svelte"
|
||||
import RoomLink from "@app/components/RoomLink.svelte"
|
||||
import {makeClassifiedPath} from "@app/util/routes"
|
||||
import {makeClassifiedPath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
import ThunkStatusOrDeleted from "@app/components/ThunkStatusOrDeleted.svelte"
|
||||
import EventActivity from "@app/components/EventActivity.svelte"
|
||||
import EventActions from "@app/components/EventActions.svelte"
|
||||
import {publishDelete, publishReaction, canEnforceNip70} from "@app/core/commands"
|
||||
import {makeSpacePath} from "@app/util/routes"
|
||||
import {publishDelete} from "@app/deletes"
|
||||
import {publishReaction} from "@app/reactions"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {makeSpacePath} from "@app/routes"
|
||||
|
||||
interface Props {
|
||||
url: string
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import Revote from "@assets/icons/revote.svg?dataurl"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
import CalendarEventCreate from "@app/components/CalendarEventCreate.svelte"
|
||||
import ThreadCreate from "@app/components/ThreadCreate.svelte"
|
||||
import ClassifiedCreate from "@app/components/ClassifiedCreate.svelte"
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
import ContentQuote from "@app/components/ContentQuote.svelte"
|
||||
import ContentTopic from "@app/components/ContentTopic.svelte"
|
||||
import ContentMention from "@app/components/ContentMention.svelte"
|
||||
import {entityLink, userSettingsValues} from "@app/core/state"
|
||||
import {entityLink} from "@app/env"
|
||||
import {userSettingsValues} from "@app/settings"
|
||||
|
||||
interface Props {
|
||||
event: any
|
||||
|
||||
@@ -7,15 +7,10 @@
|
||||
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
||||
import ContentLinkUrl from "@app/components/ContentLinkUrl.svelte"
|
||||
import ContentLinkBlockImage from "@app/components/ContentLinkBlockImage.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {
|
||||
dufflepud,
|
||||
IMAGE_CONTENT_TYPES,
|
||||
PLATFORM_URL,
|
||||
VIDEO_CONTENT_TYPES,
|
||||
THUMBNAIL_URL,
|
||||
isRoomId,
|
||||
} from "@app/core/state"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {dufflepud, PLATFORM_URL, THUMBNAIL_URL} from "@app/env"
|
||||
import {IMAGE_CONTENT_TYPES, VIDEO_CONTENT_TYPES} from "@app/content"
|
||||
import {isRoomId} from "@app/groups"
|
||||
|
||||
const {value, event} = $props()
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
||||
import ContentLinkUrl from "@app/components/ContentLinkUrl.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {IMAGE_CONTENT_TYPES} from "@app/core/state"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {IMAGE_CONTENT_TYPES} from "@app/content"
|
||||
|
||||
const {value, event} = $props()
|
||||
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
import LinkRound from "@assets/icons/link-round.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import {PLATFORM_URL, displayRoom, isRoomId, splitRoomId} from "@app/core/state"
|
||||
import {makeRoomPath, makeSpacePath} from "@app/util/routes"
|
||||
import {PLATFORM_URL} from "@app/env"
|
||||
import {displayRoom, isRoomId, splitRoomId} from "@app/groups"
|
||||
import {makeRoomPath, makeSpacePath} from "@app/routes"
|
||||
|
||||
const {
|
||||
url,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import {deriveProfileDisplay} from "@welshman/app"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
value: ProfilePointer
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
import ContentNewline from "@app/components/ContentNewline.svelte"
|
||||
import ContentTopic from "@app/components/ContentTopic.svelte"
|
||||
import ContentMention from "@app/components/ContentMention.svelte"
|
||||
import {entityLink, userSettingsValues} from "@app/core/state"
|
||||
import {entityLink} from "@app/env"
|
||||
import {userSettingsValues} from "@app/settings"
|
||||
|
||||
interface Props {
|
||||
event: any
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import NoteCard from "@app/components/NoteCard.svelte"
|
||||
import NoteContentMinimal from "@app/components/NoteContentMinimal.svelte"
|
||||
import {deriveEvent, entityLink} from "@app/core/state"
|
||||
import {goToEvent} from "@app/util/routes"
|
||||
import {deriveEvent} from "@app/repository"
|
||||
import {entityLink} from "@app/env"
|
||||
import {goToEvent} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
value: any
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import Bolt from "@assets/icons/bolt.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {clip} from "@app/util/toast"
|
||||
import {clip} from "@app/toast"
|
||||
|
||||
const {value} = $props()
|
||||
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
import ZapButton from "@app/components/ZapButton.svelte"
|
||||
import EmojiButton from "@lib/components/EmojiButton.svelte"
|
||||
import EventMenu from "@app/components/EventMenu.svelte"
|
||||
import {ENABLE_ZAPS} from "@app/core/state"
|
||||
import {publishReaction, canEnforceNip70} from "@app/core/commands"
|
||||
import {ENABLE_ZAPS} from "@app/env"
|
||||
import {publishReaction} from "@app/reactions"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import {deriveArray, deriveEventsById} from "@welshman/store"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {repository} from "@welshman/app"
|
||||
import {deriveChecked} from "@app/util/notifications"
|
||||
import {deriveChecked} from "@app/notifications"
|
||||
import Reply from "@assets/icons/reply-2.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<script lang="ts">
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import Confirm from "@lib/components/Confirm.svelte"
|
||||
import {publishDelete, canEnforceNip70} from "@app/core/commands"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {publishDelete} from "@app/deletes"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {clearModals} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import {clip} from "@app/util/toast"
|
||||
import {clip} from "@app/toast"
|
||||
|
||||
type Props = {
|
||||
url?: string
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
import Report from "@app/components/Report.svelte"
|
||||
import EventShare from "@app/components/EventShare.svelte"
|
||||
import EventDeleteConfirm from "@app/components/EventDeleteConfirm.svelte"
|
||||
import {hasNip29, deriveUserIsSpaceAdmin} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {makeSpaceChatPath} from "@app/util/routes"
|
||||
import {hasNip29} from "@app/relays"
|
||||
import {deriveUserIsSpaceAdmin} from "@app/members"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {makeSpaceChatPath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import EditorContent from "@app/editor/EditorContent.svelte"
|
||||
import {publishComment, canEnforceNip70} from "@app/core/commands"
|
||||
import {PROTECTED} from "@app/core/state"
|
||||
import {publishComment} from "@app/comments"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {PROTECTED} from "@app/groups"
|
||||
import {makeEditor} from "@app/editor"
|
||||
import {DraftKey} from "@app/util/drafts"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {DraftKey} from "@app/drafts"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
type Values = {
|
||||
content?: string | object
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import RoomName from "@app/components/RoomName.svelte"
|
||||
import {roomsByUrl} from "@app/core/state"
|
||||
import {makeRoomPath} from "@app/util/routes"
|
||||
import {roomsByUrl} from "@app/groups"
|
||||
import {makeRoomPath} from "@app/routes"
|
||||
|
||||
const {url, noun, event}: {url: string; noun: string; event: TrustedEvent} = $props()
|
||||
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
import EventActivity from "@app/components/EventActivity.svelte"
|
||||
import EventActions from "@app/components/EventActions.svelte"
|
||||
import RoomName from "@app/components/RoomName.svelte"
|
||||
import {publishDelete, publishReaction, canEnforceNip70} from "@app/core/commands"
|
||||
import {makeGoalPath, makeSpacePath} from "@app/util/routes"
|
||||
import {publishDelete} from "@app/deletes"
|
||||
import {publishReaction} from "@app/reactions"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {makeGoalPath, makeSpacePath} from "@app/routes"
|
||||
|
||||
interface Props {
|
||||
url: string
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import EditorContent from "@app/editor/EditorContent.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PROTECTED} from "@app/core/state"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {PROTECTED, publishRoomQuote} from "@app/groups"
|
||||
import {makeEditor} from "@app/editor"
|
||||
import {DraftKey} from "@app/util/drafts"
|
||||
import {canEnforceNip70, publishRoomQuote} from "@app/core/commands"
|
||||
import {DraftKey} from "@app/drafts"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
|
||||
type Values = {
|
||||
title: string
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import GoalActions from "@app/components/GoalActions.svelte"
|
||||
import GoalSummary from "@app/components/GoalSummary.svelte"
|
||||
import RoomLink from "@app/components/RoomLink.svelte"
|
||||
import {makeGoalPath} from "@app/util/routes"
|
||||
import {makeGoalPath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {PLATFORM_NAME} from "@app/env"
|
||||
</script>
|
||||
|
||||
<Modal
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {PLATFORM_NAME} from "@app/env"
|
||||
</script>
|
||||
|
||||
<Modal
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import KeyRecoveryRequest from "@app/components/KeyRecoveryRequest.svelte"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {PLATFORM_NAME} from "@app/env"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {PLATFORM_NAME} from "@app/env"
|
||||
</script>
|
||||
|
||||
<Modal>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import AddCircle from "@assets/icons/add-circle.svg?dataurl"
|
||||
import GallerySend from "@assets/icons/gallery-send.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import {uploadFile} from "@app/core/commands"
|
||||
import {uploadFile} from "@app/uploads"
|
||||
|
||||
interface Props {
|
||||
file?: File | undefined
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ProgressBar from "@app/components/ProgressBar.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {PLATFORM_NAME} from "@app/env"
|
||||
|
||||
type Props = {
|
||||
secret: string
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import StringMultiInput from "@lib/components/StringMultiInput.svelte"
|
||||
import KeyDownload from "@app/components/KeyDownload.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {pushModal, clearModals} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
peersByPrefix: Map<string, string>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
import KeyRecoveryConfirm from "@app/components/KeyRecoveryConfirm.svelte"
|
||||
|
||||
const {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
import CardButton from "@lib/components/CardButton.svelte"
|
||||
import LogIn from "@app/components/LogIn.svelte"
|
||||
import SignUp from "@app/components/SignUp.svelte"
|
||||
import {PLATFORM_TERMS, PLATFORM_PRIVACY, PLATFORM_NAME} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {PLATFORM_TERMS, PLATFORM_PRIVACY, PLATFORM_NAME} from "@app/env"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const logIn = () => pushModal(LogIn)
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
import LogInBunker from "@app/components/LogInBunker.svelte"
|
||||
import LogInEmail from "@app/components/LogInEmail.svelte"
|
||||
import LogInKey from "@app/components/LogInKey.svelte"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {PLATFORM_NAME, POMADE_SIGNERS} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushModal, clearModals} from "@app/modal"
|
||||
import {PLATFORM_NAME, POMADE_SIGNERS} from "@app/env"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {setChecked} from "@app/notifications"
|
||||
|
||||
let signers: any[] = $state([])
|
||||
let loading: string | undefined = $state()
|
||||
|
||||
@@ -19,11 +19,12 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import BunkerConnect from "@app/components/BunkerConnect.svelte"
|
||||
import BunkerUrl from "@app/components/BunkerUrl.svelte"
|
||||
import {Nip46Controller} from "@app/util/nip46"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {SIGNER_RELAYS, NIP46_PERMS} from "@app/core/state"
|
||||
import {Nip46Controller} from "@app/nip46"
|
||||
import {clearModals} from "@app/modal"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {SIGNER_RELAYS} from "@app/env"
|
||||
import {NIP46_PERMS} from "@app/nip46"
|
||||
|
||||
const back = () => {
|
||||
if (mode === "connect") {
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import LogInOTP from "@app/components/LogInOTP.svelte"
|
||||
import LogInSelect from "@app/components/LogInSelect.svelte"
|
||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
||||
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/pomade"
|
||||
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/pomade"
|
||||
import {pushModal, clearModals} from "@app/modal"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
interface Props {
|
||||
email?: string
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {clearModals} from "@app/modal"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
let loading = $state(false)
|
||||
let keyInput = $state("")
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import LogInOTPConfirm from "@app/components/LogInOTPConfirm.svelte"
|
||||
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/pomade"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
interface Props {
|
||||
email?: string
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import StringMultiInput from "@lib/components/StringMultiInput.svelte"
|
||||
import LogInSelect from "@app/components/LogInSelect.svelte"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
||||
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal, clearModals} from "@app/modal"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/pomade"
|
||||
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/pomade"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
type Props = {
|
||||
email: string
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import Profile from "@app/components/Profile.svelte"
|
||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/util/pomade"
|
||||
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {deleteDeactivatedPomadeSessions, loginWithPomade} from "@app/pomade"
|
||||
import {getPomadeLoginFailureMessage, POMADE_NETWORK_ERROR_MESSAGE} from "@app/pomade"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {clearModals} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
interface Props {
|
||||
email: string
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {logout} from "@app/util/logout"
|
||||
import {logout} from "@app/session"
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import Profile from "@app/components/Profile.svelte"
|
||||
import LogOut from "@app/components/LogOut.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {theme} from "@app/util/theme"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {theme} from "@app/theme"
|
||||
|
||||
const logout = () => pushModal(LogOut)
|
||||
const toggleTheme = () => theme.set($theme === "dark" ? "light" : "dark")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import {onMount, mount, unmount} from "svelte"
|
||||
import Drawer from "@lib/components/Drawer.svelte"
|
||||
import Dialog from "@lib/components/Dialog.svelte"
|
||||
import {modal, modalStack, popModal} from "@app/util/modal"
|
||||
import {modal, modalStack, popModal} from "@app/modal"
|
||||
|
||||
const closeModal = () => {
|
||||
if ($modal && !$modal.options.noEscape) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {notificationSettings} from "@app/core/state"
|
||||
import {onNotification} from "@app/util/push"
|
||||
import {notificationSettings} from "@app/settings"
|
||||
import {onNotification} from "@app/push"
|
||||
|
||||
let audioElement: HTMLAudioElement
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Profile from "@app/components/Profile.svelte"
|
||||
import ProfileName from "@app/components/ProfileName.svelte"
|
||||
import {goToEvent} from "@app/util/routes"
|
||||
import {isEventMuted} from "@app/core/state"
|
||||
import {goToEvent} from "@app/routes"
|
||||
import {isEventMuted} from "@app/social"
|
||||
|
||||
const {
|
||||
event,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
import {derived} from "svelte/store"
|
||||
import {POLL_RESPONSE} from "@welshman/util"
|
||||
import ContentMinimal from "@app/components/ContentMinimal.svelte"
|
||||
import {deriveEvents} from "@app/core/state"
|
||||
import {getPollResults} from "@app/util/polls"
|
||||
import {deriveEvents} from "@app/repository"
|
||||
import {getPollResults} from "@app/polls"
|
||||
|
||||
const props: ComponentProps<typeof ContentMinimal> = $props()
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
import NoteContent from "@app/components/NoteContent.svelte"
|
||||
import NoteCard from "@app/components/NoteCard.svelte"
|
||||
import ReactionSummary from "@app/components/ReactionSummary.svelte"
|
||||
import {publishDelete, publishReaction, canEnforceNip70} from "@app/core/commands"
|
||||
import {publishDelete} from "@app/deletes"
|
||||
import {publishReaction} from "@app/reactions"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
|
||||
type Props = {
|
||||
event: TrustedEvent
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import StringMultiInput from "@lib/components/StringMultiInput.svelte"
|
||||
import PasswordResetConfirm from "@app/components/PasswordResetConfirm.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {getPomadeClient} from "@app/util/pomade"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {getPomadeClient} from "@app/pomade"
|
||||
|
||||
type Props = {
|
||||
peersByPrefix: Map<string, string>
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {loginWithPomade, deleteCurrentPomadeSession} from "@app/util/pomade"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {loginWithPomade, deleteCurrentPomadeSession} from "@app/pomade"
|
||||
import {clearModals} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
type Props = {
|
||||
userSecret: string
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import ProfileInfo from "@app/components/ProfileInfo.svelte"
|
||||
import ProfileBadges from "@app/components/ProfileBadges.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
pubkey: string
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PROTECTED} from "@app/core/state"
|
||||
import {canEnforceNip70, publishRoomQuote} from "@app/core/commands"
|
||||
import {DraftKey} from "@app/util/drafts"
|
||||
import type {PollType} from "@app/util/polls"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {PROTECTED, publishRoomQuote} from "@app/groups"
|
||||
import {canEnforceNip70} from "@app/relays"
|
||||
import {DraftKey} from "@app/drafts"
|
||||
import type {PollType} from "@app/polls"
|
||||
|
||||
type Option = {
|
||||
id: string
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import CommentActions from "@app/components/CommentActions.svelte"
|
||||
import RoomLink from "@app/components/RoomLink.svelte"
|
||||
import ProfileLink from "@app/components/ProfileLink.svelte"
|
||||
import {makePollPath} from "@app/util/routes"
|
||||
import {makePollPath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {noop} from "@welshman/lib"
|
||||
import {stopPropagation} from "@lib/html"
|
||||
import {getPollType, isPollClosed} from "@app/util/polls"
|
||||
import {getPollType, isPollClosed} from "@app/polls"
|
||||
|
||||
type Props = {
|
||||
event: TrustedEvent
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
import {POLL_RESPONSE} from "@welshman/util"
|
||||
import {pubkey, publishThunk, abortThunk} from "@welshman/app"
|
||||
import {formatTimestampRelative} from "@welshman/lib"
|
||||
import {deriveEvents} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {makePollResponse} from "@app/core/commands"
|
||||
import {deriveEvents} from "@app/repository"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {makePollResponse} from "@app/polls"
|
||||
import PollOption from "@app/components/PollOption.svelte"
|
||||
import {
|
||||
getPollEndsAt,
|
||||
@@ -15,7 +15,7 @@
|
||||
getPollResults,
|
||||
getPollType,
|
||||
isPollClosed,
|
||||
} from "@app/util/polls"
|
||||
} from "@app/polls"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Popover from "@lib/components/Popover.svelte"
|
||||
import TrashBin2 from "@assets/icons/trash-bin-2.svg?dataurl"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {loadOtherPomadeSessions} from "@app/util/pomade"
|
||||
import type {PomadeSessionWithPeers} from "@app/util/pomade"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {loadOtherPomadeSessions} from "@app/pomade"
|
||||
import type {PomadeSessionWithPeers} from "@app/pomade"
|
||||
|
||||
const toggleMenu = (client: string) => {
|
||||
menuClient = menuClient === client ? "" : client
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
import MenuSettings from "@app/components/MenuSettings.svelte"
|
||||
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
|
||||
import PrimaryNavSpaces from "@app/components/PrimaryNavSpaces.svelte"
|
||||
import {userSpaceUrls, PLATFORM_RELAYS} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {notifications} from "@app/util/notifications"
|
||||
import {goToChat, makeSpacePath} from "@app/util/routes"
|
||||
import {userSpaceUrls} from "@app/groups"
|
||||
import {PLATFORM_RELAYS} from "@app/env"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {notifications} from "@app/notifications"
|
||||
import {goToChat, makeSpacePath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
children?: Snippet
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import {deriveRelayDisplay} from "@welshman/app"
|
||||
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
|
||||
import RelayIcon from "@app/components/RelayIcon.svelte"
|
||||
import {makeSpacePath, goToSpace} from "@app/util/routes"
|
||||
import {notifications} from "@app/util/notifications"
|
||||
import {makeSpacePath, goToSpace} from "@app/routes"
|
||||
import {notifications} from "@app/notifications"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
import Divider from "@lib/components/Divider.svelte"
|
||||
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
|
||||
import PrimaryNavItemSpace from "@app/components/PrimaryNavItemSpace.svelte"
|
||||
import {userSpaceUrls, PLATFORM_RELAYS, PLATFORM_LOGO} from "@app/core/state"
|
||||
import {notifications} from "@app/util/notifications"
|
||||
import {userSpaceUrls} from "@app/groups"
|
||||
import {PLATFORM_RELAYS, PLATFORM_LOGO} from "@app/env"
|
||||
import {notifications} from "@app/notifications"
|
||||
|
||||
let windowHeight = $state(0)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
import ProfileCircle from "@app/components/ProfileCircle.svelte"
|
||||
import WotScore from "@app/components/WotScore.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {clip} from "@app/util/toast"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {clip} from "@app/toast"
|
||||
import Copy from "@assets/icons/copy.svg?dataurl"
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import {repository, loadRelayList} from "@welshman/app"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ProfileSpaces from "@app/components/ProfileSpaces.svelte"
|
||||
import {deriveGroupList, getSpaceUrlsFromGroupList} from "@app/core/state"
|
||||
import {goToEvent} from "@app/util/routes"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {deriveGroupList, getSpaceUrlsFromGroupList} from "@app/groups"
|
||||
import {goToEvent} from "@app/routes"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
pubkey: string
|
||||
|
||||
@@ -22,9 +22,10 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import {INDEXER_RELAYS, PLATFORM_NAME, userSpaceUrls} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {logout} from "@app/util/logout"
|
||||
import {INDEXER_RELAYS, PLATFORM_NAME} from "@app/env"
|
||||
import {userSpaceUrls} from "@app/groups"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {logout} from "@app/session"
|
||||
|
||||
let progress: number | undefined = $state(undefined)
|
||||
let confirmText = $state("")
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
import ProfileInfo from "@app/components/ProfileInfo.svelte"
|
||||
import EventInfo from "@app/components/EventInfo.svelte"
|
||||
import ProfileBadges from "@app/components/ProfileBadges.svelte"
|
||||
import {pubkeyLink, deriveUserIsSpaceAdmin, deriveSpaceBannedPubkeyItems} from "@app/core/state"
|
||||
import {addSpaceMembers} from "@app/core/commands"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {goToChat} from "@app/util/routes"
|
||||
import {pubkeyLink} from "@app/env"
|
||||
import {deriveUserIsSpaceAdmin, deriveSpaceBannedPubkeyItems, addSpaceMembers} from "@app/members"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {goToChat} from "@app/routes"
|
||||
|
||||
export type Props = {
|
||||
pubkey: string
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import ProfileEditForm from "@app/components/ProfileEditForm.svelte"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {updateProfile} from "@app/core/commands"
|
||||
import {clearModals} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {updateProfile} from "@app/profiles"
|
||||
|
||||
const profile = $profilesByPubkey.get($pubkey!) || makeProfile()
|
||||
const initialValues = {profile}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import InputProfilePicture from "@app/components/InputProfilePicture.svelte"
|
||||
import InfoHandle from "@app/components/InfoHandle.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Values = {
|
||||
profile: Profile
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ProfileName from "@app/components/ProfileName.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
pubkey: string
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import ProfileSuggestion from "@app/editor/ProfileSuggestion.svelte"
|
||||
import ProfileName from "@app/components/ProfileName.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
interface Props {
|
||||
value: string[]
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import RelayIcon from "@app/components/RelayIcon.svelte"
|
||||
import RelayName from "@app/components/RelayName.svelte"
|
||||
import {makeSpacePath} from "@app/util/routes"
|
||||
import {deriveGroupList, getSpaceUrlsFromGroupList} from "@app/core/state"
|
||||
import {makeSpacePath} from "@app/routes"
|
||||
import {deriveGroupList, getSpaceUrlsFromGroupList} from "@app/groups"
|
||||
|
||||
type Props = {
|
||||
pubkey: string
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import QRCode from "qrcode"
|
||||
import {onMount} from "svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {clip} from "@app/util/toast"
|
||||
import {clip} from "@app/toast"
|
||||
|
||||
const {code, ...props} = $props()
|
||||
|
||||
|
||||
@@ -23,8 +23,9 @@
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Reaction from "@app/components/Reaction.svelte"
|
||||
import ReportDetails from "@app/components/ReportDetails.svelte"
|
||||
import {REACTION_KINDS, deriveUserIsSpaceAdmin} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {REACTION_KINDS} from "@app/content"
|
||||
import {deriveUserIsSpaceAdmin} from "@app/members"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
interface Props {
|
||||
event: TrustedEvent
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import NoteContentMinimal from "@app/components/NoteContentMinimal.svelte"
|
||||
import ProfileCircle from "@app/components/ProfileCircle.svelte"
|
||||
import RoomNameWithImage from "@app/components/RoomNameWithImage.svelte"
|
||||
import {makeRoomPath, makeSpaceChatPath} from "@app/util/routes"
|
||||
import {makeRoomPath, makeSpaceChatPath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import RelayItem from "@app/components/RelayItem.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
interface Props {
|
||||
relays: Readable<string[]>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import RelayAdd from "@app/components/RelayAdd.svelte"
|
||||
import RelayItem from "@app/components/RelayItem.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
interface Props {
|
||||
title: string
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import Stars from "@assets/icons/stars.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import type {HealthCheck} from "@app/util/health"
|
||||
import {applyHealthCheck} from "@app/util/health"
|
||||
import type {HealthCheck} from "@app/healthChecks"
|
||||
import {applyHealthCheck} from "@app/healthChecks"
|
||||
|
||||
type Props = {
|
||||
healthCheck: HealthCheck
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import RelaySettingsHealthCheck from "@app/components/RelaySettingsHealthCheck.svelte"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {pendingHealthChecks, applyHealthCheck} from "@app/util/health"
|
||||
import {PLATFORM_NAME} from "@app/env"
|
||||
import {pendingHealthChecks, applyHealthCheck} from "@app/healthChecks"
|
||||
|
||||
const applyAll = () => {
|
||||
for (const healthCheck of $pendingHealthChecks) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import DangerTriangle from "@assets/icons/danger-triangle.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import RelayList from "@app/components/RelayList.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
interface Props {
|
||||
icon: string
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import RelayIcon from "@app/components/RelayIcon.svelte"
|
||||
import RelayDescription from "@app/components/RelayDescription.svelte"
|
||||
import ProfileCircles from "@app/components/ProfileCircles.svelte"
|
||||
import {deriveGroupListPubkeys, deriveUserRooms} from "@app/core/state"
|
||||
import {deriveGroupListPubkeys, deriveUserRooms} from "@app/groups"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {publishReport} from "@app/core/commands"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {publishReport} from "@app/reports"
|
||||
|
||||
const {url, event} = $props()
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user