forked from coracle/flotilla
Rename app utils
This commit is contained in:
+11
-11
@@ -26,23 +26,23 @@
|
||||
import {maybeInstallRelayMocks} from "@lib/test/relayMocks"
|
||||
import AppContainer from "@app/components/AppContainer.svelte"
|
||||
import ModalContainer from "@app/components/ModalContainer.svelte"
|
||||
import {setupHistory} from "@app/util/history"
|
||||
import {setupAnalytics} from "@app/util/analytics"
|
||||
import {authPolicy, blockPolicy, trustPolicy, mostlyRestrictedPolicy} from "@app/util/policies"
|
||||
import {setupHistory} from "@app/routes"
|
||||
import {setupAnalytics} from "@app/analytics"
|
||||
import {authPolicy, blockPolicy, trustPolicy, mostlyRestrictedPolicy} from "@app/policies"
|
||||
import {db, kv, ss} from "@app/core/storage"
|
||||
import {device, userSettingsValues, notificationSettings, pushState} from "@app/core/state"
|
||||
import {syncApplicationData} from "@app/core/sync"
|
||||
import * as commands from "@app/core/commands"
|
||||
import * as requests from "@app/core/requests"
|
||||
import * as appState from "@app/core/state"
|
||||
import {theme} from "@app/util/theme"
|
||||
import {toast, pushToast} from "@app/util/toast"
|
||||
import * as notifications from "@app/util/notifications"
|
||||
import {Push} from "@app/util/push"
|
||||
import {onPushNotificationAction} from "@app/util/push/adapters/common"
|
||||
import * as storage from "@app/util/storage"
|
||||
import {syncKeyboard} from "@app/util/keyboard"
|
||||
import {getPageTitle} from "@app/util/title"
|
||||
import {theme} from "@app/theme"
|
||||
import {toast, pushToast} from "@app/toast"
|
||||
import * as notifications from "@app/notifications"
|
||||
import {Push} from "@app/push"
|
||||
import {onPushNotificationAction} from "@app/push/adapters/common"
|
||||
import * as storage from "@app/storage"
|
||||
import {syncKeyboard} from "@app/keyboard"
|
||||
import {getPageTitle} from "@app/title"
|
||||
import NewNotificationSound from "@src/app/components/NewNotificationSound.svelte"
|
||||
|
||||
const {children} = $props()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {goto} from "$app/navigation"
|
||||
import {goToSpace} from "@app/util/routes"
|
||||
import {goToSpace} from "@app/routes"
|
||||
import {PLATFORM_RELAYS} from "@app/core/state"
|
||||
|
||||
onMount(async () => {
|
||||
|
||||
@@ -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/util/routes"
|
||||
import {goToEvent} from "@app/routes"
|
||||
|
||||
const {bech32} = $page.params as MakeNonOptional<typeof $page.params>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import ChatStart from "@app/components/ChatStart.svelte"
|
||||
import ChatItem from "@app/components/ChatItem.svelte"
|
||||
import {chatSearch} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
type Props = {
|
||||
children?: Snippet
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import ChatStart from "@app/components/ChatStart.svelte"
|
||||
import ChatMenu from "@app/components/ChatMenu.svelte"
|
||||
import {chatSearch} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
let term = $state("")
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
import Chat from "@app/components/Chat.svelte"
|
||||
import {splitChatId} from "@app/core/state"
|
||||
import {notificationSettings} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {Push} from "@app/util/push"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {Push} from "@app/push"
|
||||
|
||||
const {chat} = $page.params as MakeNonOptional<typeof $page.params>
|
||||
const pubkeys = uniq(append($pubkey!, splitChatId(chat)))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import CardButton from "@lib/components/CardButton.svelte"
|
||||
import {goToSpace} from "@app/util/routes"
|
||||
import {goToSpace} from "@app/routes"
|
||||
import {PLATFORM_NAME, PLATFORM_RELAYS} from "@app/core/state"
|
||||
|
||||
const openChat = () => goto("/chat")
|
||||
|
||||
@@ -17,8 +17,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/util/modal"
|
||||
import {theme} from "@app/util/theme"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {theme} from "@app/theme"
|
||||
|
||||
type Props = {
|
||||
children?: Snippet
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ProfileDetail from "@app/components/ProfileDetail.svelte"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
import Code from "@assets/icons/code-2.svg?dataurl"
|
||||
import Global from "@assets/icons/global.svg?dataurl"
|
||||
import Pen from "@assets/icons/pen.svg?dataurl"
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {clearBadges} from "@app/util/notifications"
|
||||
import {Push} from "@app/util/push"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {clearBadges} from "@app/notifications"
|
||||
import {Push} from "@app/push"
|
||||
import {notificationSettings} from "@app/core/state"
|
||||
|
||||
const reset = () => {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ProfileMultiSelect from "@app/components/ProfileMultiSelect.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {PLATFORM_NAME, userSettingsValues} from "@app/core/state"
|
||||
import {publishSettings} from "@app/core/commands"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {PLATFORM_NAME, RelayAuthMode, userSettingsValues} from "@app/core/state"
|
||||
import {publishSettings} from "@app/core/commands"
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
import SignerStatus from "@app/components/SignerStatus.svelte"
|
||||
import PasswordReset from "@app/components/PasswordReset.svelte"
|
||||
import InfoKeys from "@app/components/InfoKeys.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/util/pomadeErrors"
|
||||
import {clip, pushToast} from "@app/util/toast"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {POMADE_NETWORK_ERROR_MESSAGE} from "@app/pomade"
|
||||
import {clip, pushToast} from "@app/toast"
|
||||
|
||||
const npub = nip19.npubEncode($pubkey!)
|
||||
const profile = deriveProfile($pubkey!)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import WalletConnect from "@app/components/WalletConnect.svelte"
|
||||
import WalletDisconnect from "@app/components/WalletDisconnect.svelte"
|
||||
import WalletUpdateReceivingAddress from "@app/components/WalletUpdateReceivingAddress.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {getNwcClient, getWebLn} from "@app/core/commands"
|
||||
import Wallet2 from "@assets/icons/wallet.svg?dataurl"
|
||||
import CheckCircle from "@assets/icons/check-circle.svg?dataurl"
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
parseInviteLink,
|
||||
} from "@app/core/state"
|
||||
import {setSpaceMembershipOrder} from "@app/core/commands"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {goToSpace, makeSpacePath} from "@app/util/routes"
|
||||
import {notifications} from "@app/util/notifications"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {goToSpace, makeSpacePath} from "@app/routes"
|
||||
import {notifications} from "@app/notifications"
|
||||
|
||||
const addSpace = () => pushModal(SpaceAdd)
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
import SpaceAuthError from "@app/components/SpaceAuthError.svelte"
|
||||
import SpaceTrustRelay from "@app/components/SpaceTrustRelay.svelte"
|
||||
import SpaceJoin from "@app/components/SpaceJoin.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {makeSpacePath} from "@app/util/routes"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {makeSpacePath} from "@app/routes"
|
||||
import {decodeRelay, userGroupList, relaysPendingTrust, userSpaceUrls} from "@app/core/state"
|
||||
import {deriveRelayAuthError} from "@app/core/commands"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import theme from "tailwindcss/defaultTheme"
|
||||
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
||||
import {decodeRelay} from "@app/core/state"
|
||||
import {goToSpace} from "@app/util/routes"
|
||||
import {goToSpace} from "@app/routes"
|
||||
import PrimaryNavSpaces from "@app/components/PrimaryNavSpaces.svelte"
|
||||
import SpaceMenu from "@app/components/SpaceMenu.svelte"
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
import {VideoCallLayout, videoCallLayout, videoTileCount} from "@app/call/video"
|
||||
import {makeFeed} from "@app/core/requests"
|
||||
import {popKey} from "@lib/implicit"
|
||||
import {checked, deferredRoomPath, setChecked} from "@app/util/notifications"
|
||||
import {makeRoomPath} from "@app/util/routes"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {checked, deferredRoomPath, setChecked} from "@app/notifications"
|
||||
import {makeRoomPath} from "@app/routes"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
const {h, relay} = $page.params as MakeNonOptional<typeof $page.params>
|
||||
const mounted = now()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import SpaceBar from "@app/components/SpaceBar.svelte"
|
||||
import CalendarEventItem from "@app/components/CalendarEventItem.svelte"
|
||||
import CalendarEventCreate from "@app/components/CalendarEventCreate.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
import {decodeRelay, makeCommentFilter} from "@app/core/state"
|
||||
import {makeCalendarFeed} from "@app/core/requests"
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
import RoomComposeParent from "@app/components/RoomComposeParent.svelte"
|
||||
import {userSettingsValues, decodeRelay, PROTECTED} from "@app/core/state"
|
||||
import {prependParent, canEnforceNip70, publishDelete} from "@app/core/commands"
|
||||
import {checked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {checked} from "@app/notifications"
|
||||
import {pushToast} from "@app/toast"
|
||||
import {makeFeed} from "@app/core/requests"
|
||||
import {popKey} from "@lib/implicit"
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import {decodeRelay} from "@app/core/state"
|
||||
import {makeCommentFilter} from "@app/core/state"
|
||||
import {makeFeed} from "@app/core/requests"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const url = decodeRelay($page.params.relay!)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import GoalCreate from "@app/components/GoalCreate.svelte"
|
||||
import {decodeRelay, makeCommentFilter} from "@app/core/state"
|
||||
import {makeFeed} from "@app/core/requests"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const url = decodeRelay($page.params.relay!)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import PollCreate from "@app/components/PollCreate.svelte"
|
||||
import {decodeRelay, makeCommentFilter} from "@app/core/state"
|
||||
import {makeFeed} from "@app/core/requests"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const url = decodeRelay($page.params.relay!)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
import PollItem from "@app/components/PollItem.svelte"
|
||||
import RecentConversation from "@app/components/RecentConversation.svelte"
|
||||
import {decodeRelay, deriveEventsForUrl, CONTENT_KINDS} from "@app/core/state"
|
||||
import {goToEvent} from "@app/util/routes"
|
||||
import {goToEvent} from "@app/routes"
|
||||
|
||||
const url = decodeRelay($page.params.relay!)
|
||||
const since = ago(3, MONTH)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import {decodeRelay} from "@app/core/state"
|
||||
import {makeCommentFilter} from "@app/core/state"
|
||||
import {makeFeed} from "@app/core/requests"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
const url = decodeRelay($page.params.relay!)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user