Add contributing file, rename some files

This commit is contained in:
Jon Staab
2025-08-21 15:01:31 -07:00
parent d4943daa82
commit ba80ebac63
155 changed files with 438 additions and 349 deletions
+11 -11
View File
@@ -58,23 +58,23 @@
import {nsecDecode} from "@lib/util"
import AppContainer from "@app/components/AppContainer.svelte"
import ModalContainer from "@app/components/ModalContainer.svelte"
import {setupTracking} from "@app/tracking"
import {setupAnalytics} from "@app/analytics"
import {setupTracking} from "@app/util/tracking"
import {setupAnalytics} from "@app/util/analytics"
import {
INDEXER_RELAYS,
userMembership,
userSettingValues,
ensureUnwrapped,
canDecrypt,
} from "@app/state"
import {loadUserData, listenForNotifications} from "@app/requests"
import {theme} from "@app/theme"
import {toast, pushToast} from "@app/toast"
import {initializePushNotifications} from "@app/push"
import * as commands from "@app/commands"
import * as requests from "@app/requests"
import * as notifications from "@app/notifications"
import * as appState from "@app/state"
} from "@app/core/state"
import {loadUserData, listenForNotifications} from "@app/core/requests"
import {theme} from "@app/util/theme"
import {toast, pushToast} from "@app/util/toast"
import {initializePushNotifications} from "@app/util/push"
import * as commands from "@app/core/commands"
import * as requests from "@app/core/requests"
import * as notifications from "@app/util/notifications"
import * as appState from "@app/core/state"
// Migration: old nostrtalk instance used different sessions
if ($session && !$signer) {
+1 -1
View File
@@ -8,7 +8,7 @@
import {page} from "$app/stores"
import {goto} from "$app/navigation"
import Spinner from "@lib/components/Spinner.svelte"
import {goToEvent} from "@app/routes"
import {goToEvent} from "@app/util/routes"
const {bech32} = $page.params
+3 -3
View File
@@ -13,9 +13,9 @@
import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte"
import ChatMenu from "@app/components/ChatMenu.svelte"
import ChatItem from "@app/components/ChatItem.svelte"
import {chatSearch} from "@app/state"
import {pullConservatively} from "@app/requests"
import {pushModal} from "@app/modal"
import {chatSearch} from "@app/core/state"
import {pullConservatively} from "@app/core/requests"
import {pushModal} from "@app/util/modal"
type Props = {
children?: Snippet
+3 -3
View File
@@ -7,9 +7,9 @@
import ChatItem from "@app/components/ChatItem.svelte"
import ChatStart from "@app/components/ChatStart.svelte"
import ChatMenu from "@app/components/ChatMenu.svelte"
import {chatSearch} from "@app/state"
import {pushModal} from "@app/modal"
import {setChecked} from "@app/notifications"
import {chatSearch} from "@app/core/state"
import {pushModal} from "@app/util/modal"
import {setChecked} from "@app/util/notifications"
let term = $state("")
+1 -1
View File
@@ -2,7 +2,7 @@
import {onDestroy} from "svelte"
import {page} from "$app/stores"
import Chat from "@app/components/Chat.svelte"
import {setChecked} from "@app/notifications"
import {setChecked} from "@app/util/notifications"
onDestroy(() => {
setChecked($page.url.pathname)
+2 -2
View File
@@ -23,8 +23,8 @@
loadMembership,
userRoomsByUrl,
getDefaultPubkeys,
} from "@app/state"
import {pushModal} from "@app/modal"
} from "@app/core/state"
import {pushModal} from "@app/util/modal"
const discoverRelays = () =>
Promise.all([
+3 -3
View File
@@ -7,9 +7,9 @@
import CardButton from "@lib/components/CardButton.svelte"
import SpaceAdd from "@app/components/SpaceAdd.svelte"
import ChatEnable from "@app/components/ChatEnable.svelte"
import {pushModal} from "@app/modal"
import {makeSpacePath} from "@app/routes"
import {PLATFORM_NAME, PLATFORM_RELAYS, canDecrypt} from "@app/state"
import {pushModal} from "@app/util/modal"
import {makeSpacePath} from "@app/util/routes"
import {PLATFORM_NAME, PLATFORM_RELAYS, canDecrypt} from "@app/core/state"
const addSpace = () => pushModal(SpaceAdd)
+1 -1
View File
@@ -6,7 +6,7 @@
import Page from "@lib/components/Page.svelte"
import ContentSearch from "@lib/components/ContentSearch.svelte"
import PeopleItem from "@app/components/PeopleItem.svelte"
import {getDefaultPubkeys} from "@app/state"
import {getDefaultPubkeys} from "@app/core/state"
const defaultPubkeys = getDefaultPubkeys()
+2 -2
View File
@@ -7,8 +7,8 @@
import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte"
import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte"
import LogOut from "@app/components/LogOut.svelte"
import {pushModal} from "@app/modal"
import {theme} from "@app/theme"
import {pushModal} from "@app/util/modal"
import {theme} from "@app/util/theme"
type Props = {
children?: Snippet
+2 -2
View File
@@ -23,8 +23,8 @@
import InputList from "@lib/components/InputList.svelte"
import Button from "@lib/components/Button.svelte"
import ProfileMultiSelect from "@app/components/ProfileMultiSelect.svelte"
import {pushToast} from "@app/toast"
import {SETTINGS, PLATFORM_NAME, userSettingValues} from "@app/state"
import {pushToast} from "@app/util/toast"
import {SETTINGS, PLATFORM_NAME, userSettingValues} from "@app/core/state"
const reset = () => {
settings = {...$userSettingValues}
+2 -2
View File
@@ -4,8 +4,8 @@
import Button from "@lib/components/Button.svelte"
import Icon from "@lib/components/Icon.svelte"
import ProfileDetail from "@app/components/ProfileDetail.svelte"
import {PLATFORM_NAME} from "@app/state"
import {pushModal} from "@app/modal"
import {PLATFORM_NAME} from "@app/core/state"
import {pushModal} from "@app/util/modal"
const hash = import.meta.env.VITE_BUILD_HASH
+3 -3
View File
@@ -14,9 +14,9 @@
import SignerStatus from "@app/components/SignerStatus.svelte"
import InfoKeys from "@app/components/InfoKeys.svelte"
import Alerts from "@app/components/Alerts.svelte"
import {PLATFORM_NAME} from "@app/state"
import {pushModal} from "@app/modal"
import {clip} from "@app/toast"
import {PLATFORM_NAME} from "@app/core/state"
import {pushModal} from "@app/util/modal"
import {clip} from "@app/util/toast"
const npub = nip19.npubEncode($pubkey!)
const profile = deriveProfile($pubkey!)
+3 -3
View File
@@ -7,9 +7,9 @@
import Collapse from "@lib/components/Collapse.svelte"
import RelayItem from "@app/components/RelayItem.svelte"
import RelayAdd from "@app/components/RelayAdd.svelte"
import {pushModal} from "@app/modal"
import {discoverRelays} from "@app/requests"
import {setRelayPolicy, setInboxRelayPolicy} from "@app/commands"
import {pushModal} from "@app/util/modal"
import {discoverRelays} from "@app/core/requests"
import {setRelayPolicy, setInboxRelayPolicy} from "@app/core/commands"
const readRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Read)
const writeRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Write)
+2 -2
View File
@@ -7,8 +7,8 @@
import Button from "@lib/components/Button.svelte"
import WalletConnect from "@app/components/WalletConnect.svelte"
import WalletDisconnect from "@app/components/WalletDisconnect.svelte"
import {pushModal} from "@app/modal"
import {getWebLn} from "@app/commands"
import {pushModal} from "@app/util/modal"
import {getWebLn} from "@app/core/commands"
const connect = () => pushModal(WalletConnect)
+7 -7
View File
@@ -8,13 +8,13 @@
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
import MenuSpace from "@app/components/MenuSpace.svelte"
import SpaceAuthError from "@app/components/SpaceAuthError.svelte"
import {pushToast} from "@app/toast"
import {pushModal} from "@app/modal"
import {setChecked} from "@app/notifications"
import {checkRelayConnection, checkRelayAuth, checkRelayAccess} from "@app/commands"
import {decodeRelay, userRoomsByUrl} from "@app/state"
import {pullConservatively} from "@app/requests"
import {notifications} from "@app/notifications"
import {pushToast} from "@app/util/toast"
import {pushModal} from "@app/util/modal"
import {setChecked} from "@app/util/notifications"
import {checkRelayConnection, checkRelayAuth, checkRelayAccess} from "@app/core/commands"
import {decodeRelay, userRoomsByUrl} from "@app/core/state"
import {pullConservatively} from "@app/core/requests"
import {notifications} from "@app/util/notifications"
type Props = {
children?: Snippet
+3 -3
View File
@@ -15,9 +15,9 @@
import SpaceQuickLinks from "@app/components/SpaceQuickLinks.svelte"
import SpaceRecentActivity from "@app/components/SpaceRecentActivity.svelte"
import SpaceRelayStatus from "@app/components/SpaceRelayStatus.svelte"
import {decodeRelay, userRoomsByUrl} from "@app/state"
import {makeChatPath} from "@app/routes"
import {pushModal} from "@app/modal"
import {decodeRelay, userRoomsByUrl} from "@app/core/state"
import {makeChatPath} from "@app/util/routes"
import {pushModal} from "@app/util/modal"
const url = decodeRelay($page.params.relay)
const relay = deriveRelay(url)
@@ -38,18 +38,18 @@
deriveChannel,
MembershipStatus,
REACTION_KINDS,
} from "@app/state"
import {setChecked, checked} from "@app/notifications"
} from "@app/core/state"
import {setChecked, checked} from "@app/util/notifications"
import {
addRoomMembership,
canEnforceNip70,
removeRoomMembership,
prependParent,
} from "@app/commands"
import {PROTECTED} from "@app/state"
import {makeFeed} from "@app/requests"
import {popKey} from "@app/implicit"
import {pushToast} from "@app/toast"
} from "@app/core/commands"
import {PROTECTED} from "@app/core/state"
import {makeFeed} from "@app/core/requests"
import {popKey} from "@lib/implicit"
import {pushToast} from "@app/util/toast"
const {room} = $page.params
const mounted = now()
@@ -16,10 +16,10 @@
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
import CalendarEventItem from "@app/components/CalendarEventItem.svelte"
import CalendarEventCreate from "@app/components/CalendarEventCreate.svelte"
import {pushModal} from "@app/modal"
import {getEventsForUrl, decodeRelay, REACTION_KINDS} from "@app/state"
import {makeCalendarFeed} from "@app/requests"
import {setChecked} from "@app/notifications"
import {pushModal} from "@app/util/modal"
import {getEventsForUrl, decodeRelay, REACTION_KINDS} from "@app/core/state"
import {makeCalendarFeed} from "@app/core/requests"
import {setChecked} from "@app/util/notifications"
const url = decodeRelay($page.params.relay)
@@ -19,8 +19,8 @@
import CalendarEventMeta from "@app/components/CalendarEventMeta.svelte"
import CalendarEventDate from "@app/components/CalendarEventDate.svelte"
import EventReply from "@app/components/EventReply.svelte"
import {deriveEvent, decodeRelay} from "@app/state"
import {setChecked} from "@app/notifications"
import {deriveEvent, decodeRelay} from "@app/core/state"
import {setChecked} from "@app/util/notifications"
const {relay, id} = $page.params
const url = decodeRelay(relay)
+6 -6
View File
@@ -25,12 +25,12 @@
getEventsForUrl,
PROTECTED,
REACTION_KINDS,
} from "@app/state"
import {prependParent, canEnforceNip70} from "@app/commands"
import {setChecked, checked} from "@app/notifications"
import {pushToast} from "@app/toast"
import {makeFeed} from "@app/requests"
import {popKey} from "@app/implicit"
} from "@app/core/state"
import {prependParent, canEnforceNip70} from "@app/core/commands"
import {setChecked, checked} from "@app/util/notifications"
import {pushToast} from "@app/util/toast"
import {makeFeed} from "@app/core/requests"
import {popKey} from "@lib/implicit"
const mounted = now()
const lastChecked = $checked[$page.url.pathname]
+4 -4
View File
@@ -14,10 +14,10 @@
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
import GoalItem from "@app/components/GoalItem.svelte"
import GoalCreate from "@app/components/GoalCreate.svelte"
import {decodeRelay, getEventsForUrl, REACTION_KINDS} from "@app/state"
import {setChecked} from "@app/notifications"
import {makeFeed} from "@app/requests"
import {pushModal} from "@app/modal"
import {decodeRelay, getEventsForUrl, REACTION_KINDS} from "@app/core/state"
import {setChecked} from "@app/util/notifications"
import {makeFeed} from "@app/core/requests"
import {pushModal} from "@app/util/modal"
const url = decodeRelay($page.params.relay)
const mutedPubkeys = getPubkeyTagValues(getListTags($userMutes))
@@ -18,8 +18,8 @@
import GoalActions from "@app/components/GoalActions.svelte"
import CommentActions from "@app/components/CommentActions.svelte"
import EventReply from "@app/components/EventReply.svelte"
import {deriveEvent, decodeRelay} from "@app/state"
import {setChecked} from "@app/notifications"
import {deriveEvent, decodeRelay} from "@app/core/state"
import {setChecked} from "@app/util/notifications"
const {relay, id} = $page.params
const url = decodeRelay(relay)
@@ -14,11 +14,11 @@
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
import ThreadItem from "@app/components/ThreadItem.svelte"
import ThreadCreate from "@app/components/ThreadCreate.svelte"
import {decodeRelay, getEventsForUrl} from "@app/state"
import {setChecked} from "@app/notifications"
import {REACTION_KINDS} from "@app/state"
import {makeFeed} from "@app/requests"
import {pushModal} from "@app/modal"
import {decodeRelay, getEventsForUrl} from "@app/core/state"
import {setChecked} from "@app/util/notifications"
import {REACTION_KINDS} from "@app/core/state"
import {makeFeed} from "@app/core/requests"
import {pushModal} from "@app/util/modal"
const url = decodeRelay($page.params.relay)
const mutedPubkeys = getPubkeyTagValues(getListTags($userMutes))
@@ -17,8 +17,8 @@
import ThreadActions from "@app/components/ThreadActions.svelte"
import CommentActions from "@app/components/CommentActions.svelte"
import EventReply from "@app/components/EventReply.svelte"
import {deriveEvent, decodeRelay} from "@app/state"
import {setChecked} from "@app/notifications"
import {deriveEvent, decodeRelay} from "@app/core/state"
import {setChecked} from "@app/util/notifications"
const {relay, id} = $page.params
const url = decodeRelay(relay)