reorganize code into smaller files & dirs
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import Changelog from "@/../CHANGELOG.md";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Markdown } from "@/Element/Event/Markdown";
|
||||
import { Markdown } from "@/Components/Event/Markdown";
|
||||
|
||||
export function AboutPage() {
|
||||
const [changelog, setChangelog] = useState("");
|
||||
|
@ -7,21 +7,21 @@ import { NostrLink, TaggedNostrEvent } from "@snort/system";
|
||||
import useLoginFeed from "@/Feed/LoginFeed";
|
||||
import { useLoginRelays } from "@/Hooks/useLoginRelays";
|
||||
import { useTheme } from "@/Hooks/useTheme";
|
||||
import Articles from "@/Element/Feed/Articles";
|
||||
import TimelineFollows from "@/Element/Feed/TimelineFollows";
|
||||
import Articles from "@/Components/Feed/Articles";
|
||||
import TimelineFollows from "@/Components/Feed/TimelineFollows";
|
||||
import { transformTextCached } from "@/Hooks/useTextTransformCache";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import NotificationsPage from "./Notifications/Notifications";
|
||||
import Modal from "@/Element/Modal";
|
||||
import { RootTabs } from "@/Element/Feed/RootTabs";
|
||||
import Toaster from "@/Toaster";
|
||||
import Modal from "@/Components/Modal/Modal";
|
||||
import { RootTabs } from "@/Components/Feed/RootTabs";
|
||||
import Toaster from "@/Components/Toaster/Toaster";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { LongFormText } from "@/Element/Event/LongFormText";
|
||||
import { LongFormText } from "@/Components/Event/LongFormText";
|
||||
import NavSidebar from "@/Pages/Layout/NavSidebar";
|
||||
import ErrorBoundary from "@/Element/ErrorBoundary";
|
||||
import { getCurrentSubscription } from "@/Subscription";
|
||||
import ErrorBoundary from "@/Components/ErrorBoundary";
|
||||
import { getCurrentSubscription } from "@/Utils/Subscription";
|
||||
import { mapPlanName } from "./subscribe";
|
||||
import { SpotlightThreadModal } from "@/Element/Spotlight/SpotlightThreadModal";
|
||||
import { SpotlightThreadModal } from "@/Components/Spotlight/SpotlightThreadModal";
|
||||
|
||||
type Cols = "notes" | "articles" | "media" | "streams" | "notifications";
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import SuggestedProfiles from "@/Element/SuggestedProfiles";
|
||||
import { Tab, TabElement } from "@/Element/Tabs";
|
||||
import TrendingNotes from "@/Element/Trending/TrendingPosts";
|
||||
import TrendingUsers from "@/Element/Trending/TrendingUsers";
|
||||
import SuggestedProfiles from "@/Components/SuggestedProfiles";
|
||||
import { Tab, TabElement } from "@/Components/Tabs/Tabs";
|
||||
import TrendingNotes from "@/Components/Trending/TrendingPosts";
|
||||
import TrendingUsers from "@/Components/Trending/TrendingUsers";
|
||||
import { useState } from "react";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
|
@ -2,17 +2,17 @@ import { useEffect, useState, useSyncExternalStore } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { HexKey } from "@snort/system";
|
||||
|
||||
import { ApiHost, DeveloperAccounts, SnortPubKey } from "@/Const";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import ZapButton from "@/Element/Event/ZapButton";
|
||||
import { bech32ToHex, unwrap } from "@/SnortUtils";
|
||||
import { ApiHost, DeveloperAccounts, SnortPubKey } from "@/Utils/Const";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import ZapButton from "@/Components/Event/ZapButton";
|
||||
import { bech32ToHex, unwrap } from "@/Utils";
|
||||
import SnortApi, { RevenueSplit, RevenueToday } from "@/External/SnortApi";
|
||||
import Modal from "@/Element/Modal";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import QrCode from "@/Element/QrCode";
|
||||
import Copy from "@/Element/Copy";
|
||||
import Modal from "@/Components/Modal/Modal";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import QrCode from "@/Components/QrCode";
|
||||
import Copy from "@/Components/Copy/Copy";
|
||||
import { Link } from "react-router-dom";
|
||||
import { ZapPoolController, ZapPoolRecipientType } from "@/ZapPoolController";
|
||||
import { ZapPoolController, ZapPoolRecipientType } from "@/Utils/ZapPoolController";
|
||||
import { ZapPoolTarget } from "./ZapPool";
|
||||
|
||||
const Contributors = [
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { db } from "@/Db";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useRouteError } from "react-router-dom";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import IrisAccount from "@/Element/IrisAccount/IrisAccount";
|
||||
import IrisAccount from "@/Components/IrisAccount/IrisAccount";
|
||||
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -5,14 +5,14 @@ import { EventKind, NoteCollection, RequestBuilder } from "@snort/system";
|
||||
import { dedupe } from "@snort/shared";
|
||||
import { useRequestBuilder } from "@snort/system-react";
|
||||
|
||||
import Timeline from "@/Element/Feed/Timeline";
|
||||
import Timeline from "@/Components/Feed/Timeline";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { setTags } from "@/Login";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import { setTags } from "@/Utils/Login";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import classNames from "classnames";
|
||||
import { formatShort } from "@/Number";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
|
||||
const HashTagsPage = () => {
|
||||
const params = useParams();
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { KieranPubKey } from "@/Const";
|
||||
import { KieranPubKey } from "@/Utils/Const";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { TLVEntryType, encodeTLVEntries, NostrPrefix } from "@snort/system";
|
||||
import { bech32ToHex } from "@/SnortUtils";
|
||||
import { bech32ToHex } from "@/Utils";
|
||||
|
||||
export default function HelpPage() {
|
||||
return (
|
||||
|
@ -1,12 +1,12 @@
|
||||
import React, { useState } from "react";
|
||||
import NavLink from "@/Element/Button/NavLink";
|
||||
import NavLink from "@/Components/Button/NavLink";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { ProfileLink } from "@/Element/User/ProfileLink";
|
||||
import { NoteCreatorButton } from "@/Element/Event/Create/NoteCreatorButton";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { ProfileLink } from "@/Components/User/ProfileLink";
|
||||
import { NoteCreatorButton } from "@/Components/Event/Create/NoteCreatorButton";
|
||||
import classNames from "classnames";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import Avatar from "@/Element/User/Avatar";
|
||||
import Avatar from "@/Components/User/Avatar";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
type MenuItem = {
|
||||
|
@ -2,15 +2,15 @@ import { useLocation, useNavigate } from "react-router-dom";
|
||||
import React, { useCallback, useMemo } from "react";
|
||||
import classNames from "classnames";
|
||||
import { LogoHeader } from "@/Pages/Layout/LogoHeader";
|
||||
import { rootTabItems, RootTabs } from "@/Element/Feed/RootTabs";
|
||||
import { rootTabItems, RootTabs } from "@/Components/Feed/RootTabs";
|
||||
import NotificationsHeader from "@/Pages/Layout/NotificationsHeader";
|
||||
import { NostrLink, NostrPrefix, parseNostrLink } from "@snort/system";
|
||||
import { bech32ToHex } from "@/SnortUtils";
|
||||
import { bech32ToHex } from "@/Utils";
|
||||
import { useEventFeed } from "@snort/system-react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import DisplayName from "@/Element/User/DisplayName";
|
||||
import DisplayName from "@/Components/User/DisplayName";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
|
||||
export function Header() {
|
||||
const navigate = useNavigate();
|
||||
|
@ -1,11 +1,11 @@
|
||||
import useLogin from "../../Hooks/useLogin";
|
||||
import { getCurrentSubscription } from "../../Subscription";
|
||||
import { isBirthday, isChristmas, isHalloween, isStPatricksDay } from "../../SnortUtils";
|
||||
import { getCurrentSubscription } from "../../Utils/Subscription";
|
||||
import { isBirthday, isChristmas, isHalloween, isStPatricksDay } from "../../Utils";
|
||||
import { Link } from "react-router-dom";
|
||||
import { mapPlanName } from "../subscribe";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { unixNowMs } from "@snort/shared";
|
||||
import { Birthday, Day } from "@/Const";
|
||||
import { Birthday, Day } from "@/Utils/Const";
|
||||
|
||||
const getExtra = () => {
|
||||
if (isBirthday()) {
|
||||
|
@ -1,17 +1,17 @@
|
||||
import { LogoHeader } from "./LogoHeader";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { ProfileLink } from "../../Element/User/ProfileLink";
|
||||
import Avatar from "../../Element/User/Avatar";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { ProfileLink } from "@/Components/User/ProfileLink";
|
||||
import Avatar from "@/Components/User/Avatar";
|
||||
import useLogin from "../../Hooks/useLogin";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { NoteCreatorButton } from "../../Element/Event/Create/NoteCreatorButton";
|
||||
import { NoteCreatorButton } from "@/Components/Event/Create/NoteCreatorButton";
|
||||
import { FormattedMessage, FormattedNumber, useIntl } from "react-intl";
|
||||
import classNames from "classnames";
|
||||
import { getCurrentSubscription } from "@/Subscription";
|
||||
import { getCurrentSubscription } from "@/Utils/Subscription";
|
||||
import { HasNotificationsMarker } from "@/Pages/Layout/HasNotificationsMarker";
|
||||
import NavLink from "@/Element/Button/NavLink";
|
||||
import { subscribeToNotifications } from "@/Notifications";
|
||||
import NavLink from "@/Components/Button/NavLink";
|
||||
import { subscribeToNotifications } from "@/Utils/Notifications";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { Sats, useWallet } from "@/Wallet";
|
||||
import { useEffect, useState } from "react";
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import useKeyboardShortcut from "@/Hooks/useKeyboardShortcut";
|
||||
import { isFormElement } from "@/SnortUtils";
|
||||
import { isFormElement } from "@/Utils";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { HasNotificationsMarker } from "@/Pages/Layout/HasNotificationsMarker";
|
||||
import NavLink from "@/Element/Button/NavLink";
|
||||
import NavLink from "@/Components/Button/NavLink";
|
||||
import classNames from "classnames";
|
||||
import { subscribeToNotifications } from "@/Notifications";
|
||||
import { subscribeToNotifications } from "@/Utils/Notifications";
|
||||
|
||||
const NotificationsHeader = () => {
|
||||
const navigate = useNavigate();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import SearchBox from "@/Element/SearchBox";
|
||||
import TrendingNotes from "@/Element/Trending/TrendingPosts";
|
||||
import TrendingHashtags from "@/Element/Trending/TrendingHashtags";
|
||||
import SearchBox from "@/Components/SearchBox/SearchBox";
|
||||
import TrendingNotes from "@/Components/Trending/TrendingPosts";
|
||||
import TrendingHashtags from "@/Components/Trending/TrendingHashtags";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import classNames from "classnames";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
@ -3,20 +3,20 @@ import { useCallback } from "react";
|
||||
import { Outlet, useLocation } from "react-router-dom";
|
||||
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { isFormElement } from "@/SnortUtils";
|
||||
import Toaster from "@/Toaster";
|
||||
import { isFormElement } from "@/Utils";
|
||||
import Toaster from "@/Components/Toaster/Toaster";
|
||||
import { useTheme } from "@/Hooks/useTheme";
|
||||
import { useLoginRelays } from "@/Hooks/useLoginRelays";
|
||||
import { LoginUnlock } from "@/Element/PinPrompt";
|
||||
import { LoginUnlock } from "@/Components/PinPrompt/PinPrompt";
|
||||
import useKeyboardShortcut from "@/Hooks/useKeyboardShortcut";
|
||||
import { LoginStore } from "@/Login";
|
||||
import { LoginStore } from "@/Utils/Login";
|
||||
import NavSidebar from "./NavSidebar";
|
||||
import RightColumn from "./RightColumn";
|
||||
import useLoginFeed from "@/Feed/LoginFeed";
|
||||
import ErrorBoundary from "@/Element/ErrorBoundary";
|
||||
import ErrorBoundary from "@/Components/ErrorBoundary";
|
||||
import Footer from "@/Pages/Layout/Footer";
|
||||
import { Header } from "@/Pages/Layout/Header";
|
||||
import CloseButton from "@/Element/Button/CloseButton";
|
||||
import CloseButton from "@/Components/Button/CloseButton";
|
||||
import { useCommunityLeaders } from "@/Hooks/useCommunityLeaders";
|
||||
|
||||
export default function Index() {
|
||||
|
@ -4,9 +4,9 @@ import { useEventFeed } from "@snort/system-react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { Hour } from "@/Const";
|
||||
import Timeline from "@/Element/Feed/Timeline";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import { Hour } from "@/Utils/Const";
|
||||
import Timeline from "@/Components/Feed/Timeline";
|
||||
import PageSpinner from "@/Components/PageSpinner";
|
||||
|
||||
export function ListFeedPage() {
|
||||
const { id } = useParams();
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { MetadataCache } from "@snort/system";
|
||||
|
||||
import { ChatParticipant } from "@/chat";
|
||||
import NoteToSelf from "../../Element/User/NoteToSelf";
|
||||
import ProfileImage from "../../Element/User/ProfileImage";
|
||||
import NoteToSelf from "@/Components/User/NoteToSelf";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
export function ChatParticipantProfile({ participant }: { participant: ChatParticipant }) {
|
||||
|
@ -5,13 +5,13 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import NoteTime from "@/Element/Event/NoteTime";
|
||||
import Text from "@/Element/Text";
|
||||
import NoteTime from "@/Components/Event/NoteTime";
|
||||
import Text from "@/Components/Text/Text";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { Chat, ChatMessage, ChatType, setLastReadIn } from "@/chat";
|
||||
import ProfileImage from "../../Element/User/ProfileImage";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
|
||||
import messages from "../../Element/messages";
|
||||
import messages from "@/Components/messages";
|
||||
|
||||
export interface DMProps {
|
||||
chat: Chat;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useEffect, useMemo, useRef } from "react";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import DM from "@/Pages/Messages/DM";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import WriteMessage from "@/Pages/Messages/WriteMessage";
|
||||
|
@ -3,12 +3,12 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
|
||||
import UnreadCount from "@/Pages/Messages/UnreadCount";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import { parseId } from "@/SnortUtils";
|
||||
import NoteToSelf from "@/Element/User/NoteToSelf";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import { parseId } from "@/Utils";
|
||||
import NoteToSelf from "@/Components/User/NoteToSelf";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import usePageWidth from "@/Hooks/usePageWidth";
|
||||
import NoteTime from "@/Element/Event/NoteTime";
|
||||
import NoteTime from "@/Components/Event/NoteTime";
|
||||
import DmWindow from "@/Pages/Messages/DmWindow";
|
||||
import { Chat, ChatType, useChatSystem } from "@/chat";
|
||||
import { ChatParticipantProfile } from "@/Pages/Messages/ChatParticipant";
|
||||
|
@ -3,15 +3,15 @@ import { useNavigate } from "react-router-dom";
|
||||
import { useUserSearch } from "@snort/system-react";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { appendDedupe, debounce } from "@/SnortUtils";
|
||||
import { appendDedupe, debounce } from "@/Utils";
|
||||
import { ChatType, createChatLink } from "@/chat";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Modal from "@/Element/Modal";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import Modal from "@/Components/Modal/Modal";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import { Nip28ChatSystem } from "@/chat/nip28";
|
||||
import { LoginSession, LoginStore } from "@/Login";
|
||||
import { LoginSession, LoginStore } from "@/Utils/Login";
|
||||
import { decodeTLV, EventKind } from "@snort/system";
|
||||
import Nip28ChatProfile from "@/Pages/Messages/Nip28ChatProfile";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useEventFeed } from "@snort/system-react";
|
||||
import { NostrLink, UserMetadata } from "@snort/system";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import React from "react";
|
||||
|
||||
export default function Nip28ChatProfile({ id, onClick }: { id: string; onClick: (id: string) => void }) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useState } from "react";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import Textarea from "../../Element/Textarea";
|
||||
import Textarea from "@/Components/Textarea/Textarea";
|
||||
import { Chat } from "@/chat";
|
||||
import { AsyncIcon } from "@/Element/Button/AsyncIcon";
|
||||
import { AsyncIcon } from "@/Components/Button/AsyncIcon";
|
||||
|
||||
export default function WriteMessage({ chat }: { chat: Chat }) {
|
||||
const [msg, setMsg] = useState("");
|
||||
|
@ -2,11 +2,11 @@ import { NodeObject } from "react-force-graph-3d";
|
||||
import { useContext, useEffect, useState } from "react";
|
||||
import { MetadataCache, socialGraphInstance, STR, UID } from "@snort/system";
|
||||
import { SnortContext } from "@snort/system-react";
|
||||
import { defaultAvatar } from "../SnortUtils";
|
||||
import { defaultAvatar } from "../Utils";
|
||||
import { proxyImg } from "@/Hooks/useImgProxy";
|
||||
import { LoginStore } from "@/Login";
|
||||
import { LoginStore } from "@/Utils/Login";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
|
||||
interface GraphNode {
|
||||
id: UID;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { ApiHost } from "@/Const";
|
||||
import Nip5Service from "@/Element/Nip5Service";
|
||||
import { ApiHost } from "@/Utils/Const";
|
||||
import Nip5Service from "@/Components/Nip5Service";
|
||||
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useParams, useLocation } from "react-router-dom";
|
||||
import { fetchNip05Pubkey } from "@snort/shared";
|
||||
import Spinner from "@/Icons/Spinner";
|
||||
import Spinner from "@/Components/Icons/Spinner";
|
||||
import ProfilePage from "@/Pages/Profile/ProfilePage";
|
||||
import { ThreadRoute } from "@/Element/Event/Thread";
|
||||
import { GenericFeed } from "@/Element/Feed/Generic";
|
||||
import { ThreadRoute } from "@/Components/Event/Thread";
|
||||
import { GenericFeed } from "@/Components/Feed/Generic";
|
||||
import { NostrPrefix, tryParseNostrLink } from "@snort/system";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { Day } from "@/Const";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { formatShort } from "@/Number";
|
||||
import { orderAscending } from "@/SnortUtils";
|
||||
import { Day } from "@/Utils/Const";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { orderAscending } from "@/Utils";
|
||||
import { unixNow, unwrap } from "@snort/shared";
|
||||
import { TaggedNostrEvent, EventKind } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
import { useState, useMemo } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { AsyncIcon } from "../../Element/Button/AsyncIcon";
|
||||
import Tabs, { Tab } from "../../Element/Tabs";
|
||||
import { AsyncIcon } from "@/Components/Button/AsyncIcon";
|
||||
import Tabs, { Tab } from "@/Components/Tabs/Tabs";
|
||||
import { Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
|
||||
|
||||
interface StatSlot {
|
||||
|
@ -8,18 +8,18 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { markNotificationsRead } from "@/Login";
|
||||
import { markNotificationsRead } from "@/Utils/Login";
|
||||
import { Notifications } from "@/Cache";
|
||||
import { dedupe, orderDescending, getDisplayName } from "@/SnortUtils";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import { dedupe, orderDescending, getDisplayName } from "@/Utils";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import Text from "@/Element/Text";
|
||||
import { formatShort } from "@/Number";
|
||||
import { LiveEvent } from "@/Element/LiveEvent";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import { ShowMoreInView } from "@/Element/Event/ShowMore";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import Text from "@/Components/Text/Text";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { LiveEvent } from "@/Components/LiveStream/LiveEvent";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import { ShowMoreInView } from "@/Components/Event/ShowMore";
|
||||
import PageSpinner from "@/Components/PageSpinner";
|
||||
const NotificationGraph = lazy(() => import("@/Pages/Notifications/NotificationChart"));
|
||||
|
||||
function notificationContext(ev: TaggedNostrEvent) {
|
||||
|
@ -14,36 +14,36 @@ import {
|
||||
import { fetchNip05Pubkey, LNURL } from "@snort/shared";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import { findTag, getLinkReactions, hexToBech32, parseId, unwrap } from "@/SnortUtils";
|
||||
import Note from "@/Element/Event/Note";
|
||||
import { Tab, TabElement } from "@/Element/Tabs";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { findTag, getLinkReactions, hexToBech32, parseId, unwrap } from "@/Utils";
|
||||
import Note from "@/Components/Event/Note";
|
||||
import { Tab, TabElement } from "@/Components/Tabs/Tabs";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import useFollowsFeed from "@/Feed/FollowsFeed";
|
||||
import useProfileBadges from "@/Feed/BadgesFeed";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import FollowButton from "@/Element/User/FollowButton";
|
||||
import Avatar from "@/Element/User/Avatar";
|
||||
import Timeline from "@/Element/Feed/Timeline";
|
||||
import Text from "@/Element/Text";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import Nip05 from "@/Element/User/Nip05";
|
||||
import Copy from "@/Element/Copy";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import BlockList from "@/Element/User/BlockList";
|
||||
import MutedList from "@/Element/User/MutedList";
|
||||
import FollowsList from "@/Element/User/FollowListBase";
|
||||
import IconButton from "@/Element/Button/IconButton";
|
||||
import FollowsYou from "@/Element/User/FollowsYou";
|
||||
import QrCode from "@/Element/QrCode";
|
||||
import Modal from "@/Element/Modal";
|
||||
import BadgeList from "@/Element/User/BadgeList";
|
||||
import { ProxyImg } from "@/Element/ProxyImg";
|
||||
import FollowButton from "@/Components/User/FollowButton";
|
||||
import Avatar from "@/Components/User/Avatar";
|
||||
import Timeline from "@/Components/Feed/Timeline";
|
||||
import Text from "@/Components/Text/Text";
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import Nip05 from "@/Components/User/Nip05";
|
||||
import Copy from "@/Components/Copy/Copy";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import BlockList from "@/Components/User/BlockList";
|
||||
import MutedList from "@/Components/User/MutedList";
|
||||
import FollowsList from "@/Components/User/FollowListBase";
|
||||
import IconButton from "@/Components/Button/IconButton";
|
||||
import FollowsYou from "@/Components/User/FollowsYou";
|
||||
import QrCode from "@/Components/QrCode";
|
||||
import Modal from "@/Components/Modal/Modal";
|
||||
import BadgeList from "@/Components/User/BadgeList";
|
||||
import { ProxyImg } from "@/Components/ProxyImg";
|
||||
import useHorizontalScroll from "@/Hooks/useHorizontalScroll";
|
||||
import { EmailRegex } from "@/Const";
|
||||
import { EmailRegex } from "@/Utils/Const";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { ZapTarget } from "@/Zapper";
|
||||
import { ZapTarget } from "@/Utils/Zapper";
|
||||
import { useStatusFeed } from "@/Feed/StatusFeed";
|
||||
import { SpotlightMediaModal } from "@/Element/Spotlight/SpotlightMedia";
|
||||
import { SpotlightMediaModal } from "@/Components/Spotlight/SpotlightMedia";
|
||||
import ProfileTab, {
|
||||
BookMarksTab,
|
||||
FollowersTab,
|
||||
@ -52,10 +52,10 @@ import ProfileTab, {
|
||||
RelaysTab,
|
||||
ZapsProfileTab,
|
||||
} from "@/Pages/Profile/ProfileTab";
|
||||
import DisplayName from "@/Element/User/DisplayName";
|
||||
import { UserWebsiteLink } from "@/Element/User/UserWebsiteLink";
|
||||
import DisplayName from "@/Components/User/DisplayName";
|
||||
import { UserWebsiteLink } from "@/Components/User/UserWebsiteLink";
|
||||
import { useMuteList, usePinList } from "@/Hooks/useLists";
|
||||
import FollowedBy from "@/Element/User/FollowedBy";
|
||||
import FollowedBy from "@/Components/User/FollowedBy";
|
||||
|
||||
interface ProfilePageProps {
|
||||
id?: string;
|
||||
|
@ -3,16 +3,16 @@ import { HexKey, NostrLink, NostrPrefix } from "@snort/system";
|
||||
import { useReactions } from "@snort/system-react";
|
||||
|
||||
import useZapsFeed from "@/Feed/ZapsFeed";
|
||||
import { formatShort } from "@/Number";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import useFollowersFeed from "@/Feed/FollowersFeed";
|
||||
import FollowsList from "@/Element/User/FollowListBase";
|
||||
import FollowsList from "@/Components/User/FollowListBase";
|
||||
import useFollowsFeed from "@/Feed/FollowsFeed";
|
||||
import useRelaysFeed from "@/Feed/RelaysFeed";
|
||||
import RelaysMetadata from "@/Element/Relay/RelaysMetadata";
|
||||
import Bookmarks from "@/Element/User/Bookmarks";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { Tab } from "@/Element/Tabs";
|
||||
import { default as ZapElement } from "@/Element/Event/Zap";
|
||||
import RelaysMetadata from "@/Components/Relay/RelaysMetadata";
|
||||
import Bookmarks from "@/Components/User/Bookmarks";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { Tab } from "@/Components/Tabs/Tabs";
|
||||
import { default as ZapElement } from "@/Components/Event/Zap";
|
||||
import { useBookmarkList } from "@/Hooks/useLists";
|
||||
|
||||
import messages from "../messages";
|
||||
|
@ -5,20 +5,20 @@ import { unixNow } from "@snort/shared";
|
||||
import { NostrLink } from "@snort/system";
|
||||
import { SnortContext } from "@snort/system-react";
|
||||
|
||||
import Timeline from "@/Element/Feed/Timeline";
|
||||
import Timeline from "@/Components/Feed/Timeline";
|
||||
import { TimelineSubject } from "@/Feed/TimelineFeed";
|
||||
import { debounce, getCurrentRefCode, getRelayName, sha256 } from "@/SnortUtils";
|
||||
import { debounce, getCurrentRefCode, getRelayName, sha256 } from "@/Utils";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Discover from "@/Pages/Discover";
|
||||
import TrendingNotes from "@/Element/Trending/TrendingPosts";
|
||||
import TrendingNotes from "@/Components/Trending/TrendingPosts";
|
||||
import HashTagsPage from "@/Pages/HashTagsPage";
|
||||
import SuggestedProfiles from "@/Element/SuggestedProfiles";
|
||||
import { TaskList } from "@/Tasks/TaskList";
|
||||
import TimelineFollows from "@/Element/Feed/TimelineFollows";
|
||||
import SuggestedProfiles from "@/Components/SuggestedProfiles";
|
||||
import { TaskList } from "@/Components/Tasks/TaskList";
|
||||
import TimelineFollows from "@/Components/Feed/TimelineFollows";
|
||||
import { DeckContext } from "@/Pages/DeckLayout";
|
||||
import { TopicsPage } from "./TopicsPage";
|
||||
import TrendingHashtags from "@/Element/Trending/TrendingHashtags";
|
||||
const InviteModal = lazy(() => import("@/Element/Invite"));
|
||||
import TrendingHashtags from "@/Components/Trending/TrendingHashtags";
|
||||
const InviteModal = lazy(() => import("@/Components/Invite"));
|
||||
|
||||
import messages from "./messages";
|
||||
import useHistoryState from "@/Hooks/useHistoryState";
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { useIntl, FormattedMessage } from "react-intl";
|
||||
import { useParams } from "react-router-dom";
|
||||
import Timeline from "@/Element/Feed/Timeline";
|
||||
import Tabs, { Tab } from "@/Element/Tabs";
|
||||
import Timeline from "@/Components/Feed/Timeline";
|
||||
import Tabs, { Tab } from "@/Components/Tabs/Tabs";
|
||||
import { useEffect, useState } from "react";
|
||||
import { debounce } from "@/SnortUtils";
|
||||
import { debounce } from "@/Utils";
|
||||
import { router } from "@/index";
|
||||
import TrendingUsers from "@/Element/Trending/TrendingUsers";
|
||||
import TrendingUsers from "@/Components/Trending/TrendingUsers";
|
||||
|
||||
import TrendingNotes from "@/Element/Trending/TrendingPosts";
|
||||
import UsersFeed from "@/Element/Feed/UsersFeed";
|
||||
import TrendingNotes from "@/Components/Trending/TrendingPosts";
|
||||
import UsersFeed from "@/Components/Feed/UsersFeed";
|
||||
|
||||
const NOTES = 0;
|
||||
const PROFILES = 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Timeline from "@/Element/Feed/Timeline";
|
||||
import Timeline from "@/Components/Feed/Timeline";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
export function TopicsPage() {
|
||||
|
@ -4,13 +4,13 @@ import { useEffect, useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { FormattedMessage, FormattedNumber, useIntl } from "react-intl";
|
||||
|
||||
import NoteTime from "@/Element/Event/NoteTime";
|
||||
import NoteTime from "@/Components/Event/NoteTime";
|
||||
import { WalletInvoice, Sats, useWallet, LNWallet, Wallets } from "@/Wallet";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { unwrap } from "@/Utils";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { useRates } from "@/Hooks/useRates";
|
||||
import { AsyncIcon } from "@/Element/Button/AsyncIcon";
|
||||
import { AsyncIcon } from "@/Components/Button/AsyncIcon";
|
||||
import classNames from "classnames";
|
||||
|
||||
export default function WalletPage(props: { showHistory: boolean }) {
|
||||
|
@ -4,13 +4,13 @@ import { useMemo, useSyncExternalStore } from "react";
|
||||
import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import { SnortPubKey } from "@/Const";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import { SnortPubKey } from "@/Utils/Const";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { UploaderServices } from "@/Upload";
|
||||
import { bech32ToHex, getRelayName, trackEvent, unwrap } from "@/SnortUtils";
|
||||
import { ZapPoolController, ZapPoolRecipient, ZapPoolRecipientType } from "@/ZapPoolController";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { UploaderServices } from "@/Utils/Upload";
|
||||
import { bech32ToHex, getRelayName, trackEvent, unwrap } from "@/Utils";
|
||||
import { ZapPoolController, ZapPoolRecipient, ZapPoolRecipientType } from "@/Utils/ZapPoolController";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { useWallet } from "@/Wallet";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { NewUserState } from ".";
|
||||
import TrendingUsers from "@/Element/Trending/TrendingUsers";
|
||||
import TrendingUsers from "@/Components/Trending/TrendingUsers";
|
||||
|
||||
export function Discover() {
|
||||
const location = useLocation();
|
||||
|
@ -2,7 +2,7 @@ import "./index.css";
|
||||
import { Outlet, RouteObject } from "react-router-dom";
|
||||
import { SignIn, SignUp } from "./start";
|
||||
import { AllLanguageCodes } from "@/Pages/settings/Preferences";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { Profile } from "./profile";
|
||||
import { Topics } from "./topics";
|
||||
import { Discover } from "./discover";
|
||||
|
@ -3,10 +3,10 @@ import { FormattedMessage } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { unixNowMs } from "@snort/shared";
|
||||
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { appendDedupe } from "@/SnortUtils";
|
||||
import { ToggleSwitch } from "@/Icons/Toggle";
|
||||
import { updateAppData } from "@/Login";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { appendDedupe } from "@/Utils";
|
||||
import { ToggleSwitch } from "@/Components/Icons/Toggle";
|
||||
import { updateAppData } from "@/Utils/Login";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
export const FixedModeration = {
|
||||
|
@ -1,13 +1,13 @@
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import AvatarEditor from "@/Element/User/AvatarEditor";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import AvatarEditor from "@/Components/User/AvatarEditor";
|
||||
import { useContext, useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { generateNewLogin } from "@/Login";
|
||||
import { generateNewLogin } from "@/Utils/Login";
|
||||
import { SnortContext } from "@snort/system-react";
|
||||
import { NotEncrypted } from "@snort/system";
|
||||
import { NewUserState } from ".";
|
||||
import { trackEvent } from "@/SnortUtils";
|
||||
import { trackEvent } from "@/Utils";
|
||||
|
||||
export function Profile() {
|
||||
const system = useContext(SnortContext);
|
||||
|
@ -3,14 +3,14 @@ import { useState } from "react";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { unwrap } from "@snort/shared";
|
||||
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { NewUserState } from ".";
|
||||
import { LoginSessionType, LoginStore } from "@/Login";
|
||||
import { LoginSessionType, LoginStore } from "@/Utils/Login";
|
||||
import useLoginHandler from "@/Hooks/useLoginHandler";
|
||||
import { NotEncrypted } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
import { trackEvent } from "@/SnortUtils";
|
||||
import { trackEvent } from "@/Utils";
|
||||
|
||||
const NSEC_NPUB_REGEX = /(nsec1|npub1)[a-zA-Z0-9]{20,65}/gi;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { ReactNode, useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import classNames from "classnames";
|
||||
import { appendDedupe } from "@/SnortUtils";
|
||||
import { appendDedupe } from "@/Utils";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { EventKind } from "@snort/system";
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import { LoginStore } from "@/Login";
|
||||
import { getActiveSubscriptions } from "@/Subscription";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import { LoginStore } from "@/Utils/Login";
|
||||
import { getActiveSubscriptions } from "@/Utils/Subscription";
|
||||
|
||||
export default function AccountsPage() {
|
||||
const logins = LoginStore.getSessions();
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
UserCache,
|
||||
UserRelays,
|
||||
} from "@/Cache";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { ReactNode, useSyncExternalStore } from "react";
|
||||
import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
|
||||
|
@ -2,10 +2,10 @@ import "./Keys.css";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { encodeTLV, KeyStorage, NostrPrefix } from "@snort/system";
|
||||
|
||||
import Copy from "@/Element/Copy";
|
||||
import Copy from "@/Components/Copy/Copy";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { hexToMnemonic } from "@/nip6";
|
||||
import { hexToBech32 } from "@/SnortUtils";
|
||||
import { hexToMnemonic } from "@/Utils/nip6";
|
||||
import { hexToBech32 } from "@/Utils";
|
||||
|
||||
export default function ExportKeys() {
|
||||
const { publicKey, privateKeyData, generatedEntropy } = useLogin();
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { ReactNode, useCallback } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { LoginStore, logout } from "@/Login";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { LoginStore, logout } from "@/Utils/Login";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import classNames from "classnames";
|
||||
import { getCurrentSubscription } from "@/Subscription";
|
||||
import { getCurrentSubscription } from "@/Utils/Subscription";
|
||||
|
||||
export type SettingsMenuItems = Array<{
|
||||
title: ReactNode;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { unixNowMs } from "@snort/shared";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { SnortAppData, updateAppData } from "@/Login";
|
||||
import { appendDedupe } from "@/SnortUtils";
|
||||
import { SnortAppData, updateAppData } from "@/Utils/Login";
|
||||
import { appendDedupe } from "@/Utils";
|
||||
import { useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useEffect, useState } from "react";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { subscribeToNotifications } from "@/Notifications";
|
||||
import { subscribeToNotifications } from "@/Utils/Notifications";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -2,9 +2,9 @@ import "./Preferences.css";
|
||||
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { updatePreferences, UserPreferences } from "@/Login";
|
||||
import { DefaultImgProxy } from "@/Const";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import { updatePreferences, UserPreferences } from "@/Utils/Login";
|
||||
import { DefaultImgProxy } from "@/Utils/Const";
|
||||
import { unwrap } from "@/Utils";
|
||||
import { useLocale } from "@/IntlProvider";
|
||||
|
||||
import messages from "./messages";
|
||||
|
@ -5,18 +5,18 @@ import { mapEventToProfile } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { openFile, debounce } from "@/SnortUtils";
|
||||
import useFileUpload from "@/Upload";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { openFile, debounce } from "@/Utils";
|
||||
import useFileUpload from "@/Utils/Upload";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { UserCache } from "@/Cache";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Avatar from "@/Element/User/Avatar";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import Avatar from "@/Components/User/Avatar";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { ErrorOrOffline } from "@/Element/ErrorOrOffline";
|
||||
import { ErrorOrOffline } from "@/Components/ErrorOrOffline";
|
||||
import { LNURL, fetchNip05Pubkey } from "@snort/shared";
|
||||
import messages from "@/Element/messages";
|
||||
import { MaxAboutLength, MaxUsernameLength } from "@/Const";
|
||||
import messages from "@/Components/messages";
|
||||
import { MaxAboutLength, MaxUsernameLength } from "@/Utils/Const";
|
||||
|
||||
export interface ProfileSettingsProps {
|
||||
avatar?: boolean;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { LeaderBadge } from "@/Element/CommunityLeaders/LeaderBadge";
|
||||
import Copy from "@/Element/Copy";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { LeaderBadge } from "@/Components/CommunityLeaders/LeaderBadge";
|
||||
import Copy from "@/Components/Copy/Copy";
|
||||
import SnortApi, { RefCodeResponse } from "@/External/SnortApi";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { useEffect, useState } from "react";
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import useRelayState from "@/Feed/RelayState";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { parseId, unwrap } from "@/SnortUtils";
|
||||
import { removeRelay } from "@/Login";
|
||||
import { parseId, unwrap } from "@/Utils";
|
||||
import { removeRelay } from "@/Utils/Login";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
import messages from "./messages";
|
||||
|
@ -3,15 +3,15 @@ import { FormattedMessage } from "react-intl";
|
||||
import { unixNowMs, unwrap } from "@snort/shared";
|
||||
import { EventPublisher, FullRelaySettings, RelaySettings, SystemInterface } from "@snort/system";
|
||||
|
||||
import Relay from "@/Element/Relay/Relay";
|
||||
import Relay from "@/Components/Relay/Relay";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { setRelays } from "@/Login";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { setRelays } from "@/Utils/Login";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import SnortApi, { RelayDistance } from "@/External/SnortApi";
|
||||
import { getCountry, getRelayName, sanitizeRelayUrl } from "@/SnortUtils";
|
||||
import { formatShort } from "@/Number";
|
||||
import { Blasters } from "@/Const";
|
||||
import { getCountry, getRelayName, sanitizeRelayUrl } from "@/Utils";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { Blasters } from "@/Utils/Const";
|
||||
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import LndLogo from "@/lnd-logo.png";
|
||||
import LndLogo from "@/img/lnd-logo.png";
|
||||
import { ReactNode } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import BlueWallet from "@/Icons/BlueWallet";
|
||||
import NostrIcon from "@/Icons/Nostrich";
|
||||
import CashuIcon from "@/Icons/Cashu";
|
||||
import AlbyIcon from "@/Icons/Alby";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import BlueWallet from "@/Components/Icons/BlueWallet";
|
||||
import NostrIcon from "@/Components/Icons/Nostrich";
|
||||
import CashuIcon from "@/Components/Icons/Cashu";
|
||||
import AlbyIcon from "@/Components/Icons/Alby";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import { getAlbyOAuth } from "./wallet/Alby";
|
||||
|
||||
const WalletRow = (props: {
|
||||
|
@ -2,10 +2,10 @@ import { useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { LNURL } from "@snort/shared";
|
||||
|
||||
import { ApiHost } from "@/Const";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { ApiHost } from "@/Utils/Const";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import SnortServiceProvider, { ForwardType, ManageHandle } from "@/Nip05/SnortServiceProvider";
|
||||
import SnortServiceProvider, { ForwardType, ManageHandle } from "@/Utils/Nip05/SnortServiceProvider";
|
||||
|
||||
export default function LNForwardAddress({ handle }: { handle: ManageHandle }) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
@ -2,10 +2,10 @@ import { useEffect, useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
|
||||
import { ApiHost } from "@/Const";
|
||||
import { ApiHost } from "@/Utils/Const";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import SnortServiceProvider, { ManageHandle } from "@/Nip05/SnortServiceProvider";
|
||||
import { ErrorOrOffline } from "@/Element/ErrorOrOffline";
|
||||
import SnortServiceProvider, { ManageHandle } from "@/Utils/Nip05/SnortServiceProvider";
|
||||
import { ErrorOrOffline } from "@/Components/ErrorOrOffline";
|
||||
|
||||
export default function ListHandles() {
|
||||
const navigate = useNavigate();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ManageHandle } from "@/Nip05/SnortServiceProvider";
|
||||
import { ManageHandle } from "@/Utils/Nip05/SnortServiceProvider";
|
||||
import { Navigate, useLocation } from "react-router-dom";
|
||||
import LNForwardAddress from "./LNAddress";
|
||||
import TransferHandle from "./TransferHandle";
|
||||
|
@ -2,11 +2,11 @@ import { useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import { ApiHost } from "@/Const";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { ApiHost } from "@/Utils/Const";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { ServiceError } from "@/Nip05/ServiceProvider";
|
||||
import SnortServiceProvider, { ManageHandle } from "@/Nip05/SnortServiceProvider";
|
||||
import { ServiceError } from "@/Utils/Nip05/ServiceProvider";
|
||||
import SnortServiceProvider, { ManageHandle } from "@/Utils/Nip05/SnortServiceProvider";
|
||||
|
||||
export default function TransferHandle({ handle }: { handle: ManageHandle }) {
|
||||
const { publisher } = useEventPublisher();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { CollapsedSection } from "@/Element/Collapsed";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import { CollapsedSection } from "@/Components/Collapsed";
|
||||
import ProfilePreview from "@/Components/User/ProfilePreview";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { getRelayName } from "@/SnortUtils";
|
||||
import { getRelayName } from "@/Utils";
|
||||
import { dedupe } from "@snort/shared";
|
||||
import { pickTopRelays } from "@snort/system";
|
||||
import { SnortContext } from "@snort/system-react";
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { Day } from "@/Const";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { Day } from "@/Utils/Const";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { dedupe, unixNow } from "@snort/shared";
|
||||
import { RequestBuilder } from "@snort/system";
|
||||
import { useMemo, useState } from "react";
|
||||
import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
import { FollowsRelayHealth } from "./follows-relay-health";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import ProfileImage from "@/Components/User/ProfileImage";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { setFollows } from "@/Login";
|
||||
import { setFollows } from "@/Utils/Login";
|
||||
|
||||
const enum PruneStage {
|
||||
FetchLastPostTimestamp,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import PageSpinner from "@/Components/PageSpinner";
|
||||
import { WalletConfig, WalletKind, Wallets } from "@/Wallet";
|
||||
import AlbyWallet from "@/Wallet/AlbyWallet";
|
||||
import { sha256 } from "@noble/hashes/sha256";
|
||||
|
@ -2,8 +2,8 @@ import { useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { v4 as uuid } from "uuid";
|
||||
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { unwrap } from "@/Utils";
|
||||
import { WalletConfig, WalletKind, Wallets } from "@/Wallet";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
|
@ -3,9 +3,9 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { v4 as uuid } from "uuid";
|
||||
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { LNWallet, WalletInfo, WalletKind, Wallets } from "@/Wallet";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import { unwrap } from "@/Utils";
|
||||
|
||||
const ConnectLNC = () => {
|
||||
const { formatMessage } = useIntl();
|
||||
|
@ -2,8 +2,8 @@ import { useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { v4 as uuid } from "uuid";
|
||||
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { unwrap } from "@/Utils";
|
||||
import LNDHubWallet from "@/Wallet/LNDHub";
|
||||
import { WalletConfig, WalletKind, Wallets } from "@/Wallet";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
@ -2,8 +2,8 @@ import { useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { v4 as uuid } from "uuid";
|
||||
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import { unwrap } from "@/Utils";
|
||||
import { WalletConfig, WalletKind, Wallets } from "@/Wallet";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { NostrConnectWallet } from "@/Wallet/NostrWalletConnect";
|
||||
|
@ -2,12 +2,12 @@ import { useEffect, useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import PageSpinner from "@/Components/PageSpinner";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import SnortApi, { Subscription, SubscriptionError } from "@/External/SnortApi";
|
||||
import { mapSubscriptionErrorCode } from ".";
|
||||
import SubscriptionCard from "./SubscriptionCard";
|
||||
import { ErrorOrOffline } from "@/Element/ErrorOrOffline";
|
||||
import { ErrorOrOffline } from "@/Components/ErrorOrOffline";
|
||||
|
||||
export default function ManageSubscriptionPage() {
|
||||
const { publisher } = useEventPublisher();
|
||||
|
@ -2,13 +2,13 @@ import { useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { unixNow, unwrap } from "@snort/shared";
|
||||
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import SnortApi, { Subscription, SubscriptionError } from "@/External/SnortApi";
|
||||
import { mapPlanName, mapSubscriptionErrorCode } from ".";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { mostRecentSubscription } from "@/Subscription";
|
||||
import { mostRecentSubscription } from "@/Utils/Subscription";
|
||||
|
||||
export function RenewSub({ sub: s }: { sub?: Subscription }) {
|
||||
const { subscriptions } = useLogin(s => ({ subscriptions: s.subscriptions }));
|
||||
|
@ -2,10 +2,10 @@ import { FormattedMessage, FormattedDate, FormattedNumber } from "react-intl";
|
||||
|
||||
import { Subscription } from "@/External/SnortApi";
|
||||
import { mapPlanName } from ".";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Nip5Service from "@/Element/Nip5Service";
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import Nip5Service from "@/Components/Nip5Service";
|
||||
import { SnortNostrAddressService } from "@/Pages/NostrAddressPage";
|
||||
import Nip05 from "@/Element/User/Nip05";
|
||||
import Nip05 from "@/Components/User/Nip05";
|
||||
import { RenewSub } from "./RenewSub";
|
||||
|
||||
export default function SubscriptionCard({ sub }: { sub: Subscription }) {
|
||||
|
@ -4,15 +4,15 @@ import { useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { RouteObject } from "react-router-dom";
|
||||
|
||||
import { formatShort } from "@/Number";
|
||||
import { LockedFeatures, Plans, SubscriptionType } from "@/Subscription";
|
||||
import { formatShort } from "@/Utils/Number";
|
||||
import { LockedFeatures, Plans, SubscriptionType } from "@/Utils/Subscription";
|
||||
import ManageSubscriptionPage from "@/Pages/subscribe/ManageSubscription";
|
||||
import AsyncButton from "@/Element/Button/AsyncButton";
|
||||
import AsyncButton from "@/Components/Button/AsyncButton";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import SnortApi, { SubscriptionError, SubscriptionErrorCode } from "@/External/SnortApi";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import SendSats from "@/Components/SendSats/SendSats";
|
||||
import classNames from "classnames";
|
||||
import { getRefCode } from "@/SnortUtils";
|
||||
import { getRefCode } from "@/Utils";
|
||||
|
||||
export function mapPlanName(id: number) {
|
||||
switch (id) {
|
||||
|
Reference in New Issue
Block a user