wip vite
This commit is contained in:
parent
5942d92923
commit
52553adabf
@ -5,15 +5,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="description" content="Feature packed nostr client" />
|
||||
<meta
|
||||
name="keywords"
|
||||
content="nostr snort fast decentralized social media censorship resistant open source software" />
|
||||
<meta name="keywords" content="nostr snort fast decentralized social media censorship resistant open source software" />
|
||||
<link rel="preconnect" href="https://imgproxy.snort.social" />
|
||||
<link rel="apple-touch-icon" href="<%= htmlWebpackPlugin.options.templateParameters.appleTouchIconUrl %>" />
|
||||
<link rel="apple-touch-icon" href="" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<title><%= htmlWebpackPlugin.options.templateParameters.appTitle %></title>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
@ -48,8 +48,9 @@
|
||||
"workbox-strategies": "^6.4.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "webpack serve --node-env=development --mode=development",
|
||||
"build": "webpack --node-env=production --mode=production",
|
||||
"start": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"test": "jest --runInBand",
|
||||
"intl-extract": "formatjs extract 'src/**/*.ts*' --ignore='**/*.d.ts' --out-file src/lang.json --flatten true",
|
||||
"intl-compile": "formatjs compile src/lang.json --out-file src/translations/en.json",
|
||||
@ -83,6 +84,7 @@
|
||||
"@formatjs/cli": "^6.1.3",
|
||||
"@formatjs/ts-transformer": "^3.13.3",
|
||||
"@jest/globals": "^29.6.1",
|
||||
"@types/config": "^3.3.3",
|
||||
"@types/debug": "^4.1.8",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/node": "^20.4.1",
|
||||
@ -94,6 +96,7 @@
|
||||
"@types/webtorrent": "^0.109.3",
|
||||
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
||||
"@typescript-eslint/parser": "^6.1.0",
|
||||
"@vitejs/plugin-react": "^4.2.0",
|
||||
"@webbtc/webln-types": "^1.0.10",
|
||||
"@webpack-cli/generators": "^3.0.4",
|
||||
"@webscopeio/react-textarea-autocomplete": "^4.9.2",
|
||||
@ -121,6 +124,7 @@
|
||||
"ts-jest": "^29.1.1",
|
||||
"ts-loader": "^9.4.4",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^5.0.0",
|
||||
"webpack": "^5.88.2",
|
||||
"webpack-bundle-analyzer": "^4.8.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { NostrEvent } from "@snort/system";
|
||||
import { FeedCache } from "@snort/shared";
|
||||
import { db } from "Db";
|
||||
import { db } from "@/Db";
|
||||
|
||||
export class ChatCache extends FeedCache<NostrEvent> {
|
||||
constructor() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { FeedCache } from "@snort/shared";
|
||||
import { db, EventInteraction } from "Db";
|
||||
import { LoginStore } from "Login";
|
||||
import { sha256 } from "SnortUtils";
|
||||
import { db, EventInteraction } from "@/Db";
|
||||
import { LoginStore } from "@/Login";
|
||||
import { sha256 } from "@/SnortUtils";
|
||||
|
||||
export class EventInteractionCache extends FeedCache<EventInteraction> {
|
||||
constructor() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { db } from "Db";
|
||||
import { db } from "@/Db";
|
||||
import { unixNowMs } from "@snort/shared";
|
||||
import { EventKind, RequestBuilder, socialGraphInstance, TaggedNostrEvent } from "@snort/system";
|
||||
import { RefreshFeedCache } from "./RefreshFeedCache";
|
||||
import { LoginSession } from "Login";
|
||||
import { LoginSession } from "@/Login";
|
||||
|
||||
export class FollowListCache extends RefreshFeedCache<TaggedNostrEvent> {
|
||||
constructor() {
|
||||
|
@ -2,10 +2,10 @@ import debug from "debug";
|
||||
import { EventKind, RequestBuilder, SystemInterface, TaggedNostrEvent } from "@snort/system";
|
||||
import { unixNow, unixNowMs } from "@snort/shared";
|
||||
|
||||
import { db } from "Db";
|
||||
import { db } from "@/Db";
|
||||
import { RefreshFeedCache, TWithCreated } from "./RefreshFeedCache";
|
||||
import { LoginSession } from "Login";
|
||||
import { Day, Hour } from "Const";
|
||||
import { LoginSession } from "@/Login";
|
||||
import { Day, Hour } from "@/Const";
|
||||
|
||||
const WindowSize = Hour * 6;
|
||||
const MaxCacheWindow = Day * 7;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { EventKind, EventPublisher, RequestBuilder, TaggedNostrEvent } from "@snort/system";
|
||||
import { UnwrappedGift, db } from "Db";
|
||||
import { findTag, unwrap } from "SnortUtils";
|
||||
import { UnwrappedGift, db } from "@/Db";
|
||||
import { findTag, unwrap } from "@/SnortUtils";
|
||||
import { RefreshFeedCache } from "./RefreshFeedCache";
|
||||
import { LoginSession, LoginSessionType } from "Login";
|
||||
import { LoginSession, LoginSessionType } from "@/Login";
|
||||
|
||||
export class GiftWrapCache extends RefreshFeedCache<UnwrappedGift> {
|
||||
constructor() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { EventKind, NostrEvent, RequestBuilder, TaggedNostrEvent } from "@snort/system";
|
||||
import { RefreshFeedCache, TWithCreated } from "./RefreshFeedCache";
|
||||
import { LoginSession } from "Login";
|
||||
import { NostrEventForSession, db } from "Db";
|
||||
import { Day } from "Const";
|
||||
import { LoginSession } from "@/Login";
|
||||
import { NostrEventForSession, db } from "@/Db";
|
||||
import { Day } from "@/Const";
|
||||
import { unixNow } from "@snort/shared";
|
||||
|
||||
export class NotificationsCache extends RefreshFeedCache<NostrEventForSession> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Payment, db } from "Db";
|
||||
import { Payment, db } from "@/Db";
|
||||
import { FeedCache } from "@snort/shared";
|
||||
|
||||
export class Payments extends FeedCache<Payment> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FeedCache } from "@snort/shared";
|
||||
import { EventPublisher, RequestBuilder, TaggedNostrEvent } from "@snort/system";
|
||||
import { LoginSession } from "Login";
|
||||
import { LoginSession } from "@/Login";
|
||||
|
||||
export type TWithCreated<T> = (T | Readonly<T>) & { created_at: number };
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import "./AsyncButton.css";
|
||||
import React, { ForwardedRef } from "react";
|
||||
import Spinner from "../Icons/Spinner";
|
||||
import useLoading from "Hooks/useLoading";
|
||||
import useLoading from "@/Hooks/useLoading";
|
||||
import classNames from "classnames";
|
||||
|
||||
export interface AsyncButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Icon from "Icons/Icon";
|
||||
import useLoading from "Hooks/useLoading";
|
||||
import Spinner from "Icons/Spinner";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import useLoading from "@/Hooks/useLoading";
|
||||
import Spinner from "@/Icons/Spinner";
|
||||
|
||||
export type AsyncIconProps = React.HTMLProps<HTMLDivElement> & {
|
||||
iconName: string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import "./BackButton.css";
|
||||
import { useIntl } from "react-intl";
|
||||
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { MetadataCache } from "@snort/system";
|
||||
|
||||
import { ChatParticipant } from "chat";
|
||||
import { ChatParticipant } from "@/chat";
|
||||
import NoteToSelf from "../User/NoteToSelf";
|
||||
import ProfileImage from "../User/ProfileImage";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
export function ChatParticipantProfile({ participant }: { participant: ChatParticipant }) {
|
||||
const { publicKey } = useLogin(s => ({ publicKey: s.publicKey }));
|
||||
|
@ -3,11 +3,11 @@ import { useEffect, useState } from "react";
|
||||
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 useLogin from "Hooks/useLogin";
|
||||
import { Chat, ChatMessage, ChatType, setLastReadIn } from "chat";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import NoteTime from "@/Element/Event/NoteTime";
|
||||
import Text from "@/Element/Text";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { Chat, ChatMessage, ChatType, setLastReadIn } from "@/chat";
|
||||
import ProfileImage from "../User/ProfileImage";
|
||||
|
||||
import messages from "../messages";
|
||||
|
@ -1,11 +1,11 @@
|
||||
import "./DmWindow.css";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import DM from "Element/Chat/DM";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import WriteMessage from "Element/Chat/WriteMessage";
|
||||
import { Chat, createEmptyChatObject, useChatSystem } from "chat";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import DM from "@/Element/Chat/DM";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import WriteMessage from "@/Element/Chat/WriteMessage";
|
||||
import { Chat, createEmptyChatObject, useChatSystem } from "@/chat";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { ChatParticipantProfile } from "./ChatParticipant";
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { useState } from "react";
|
||||
import { NostrEvent, NostrLink, NostrPrefix } from "@snort/system";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import useFileUpload from "Upload";
|
||||
import { openFile } from "SnortUtils";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import useFileUpload from "@/Upload";
|
||||
import { openFile } from "@/SnortUtils";
|
||||
import Textarea from "../Textarea";
|
||||
import { Chat } from "chat";
|
||||
import { AsyncIcon } from "Element/AsyncIcon";
|
||||
import { Chat } from "@/chat";
|
||||
import { AsyncIcon } from "@/Element/AsyncIcon";
|
||||
|
||||
export default function WriteMessage({ chat }: { chat: Chat }) {
|
||||
const [msg, setMsg] = useState("");
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { useState, ReactNode } from "react";
|
||||
import classNames from "classnames";
|
||||
|
||||
import Icon from "Icons/Icon";
|
||||
import ShowMore from "Element/Event/ShowMore";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import ShowMore from "@/Element/Event/ShowMore";
|
||||
|
||||
interface CollapsedProps {
|
||||
text?: string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import "./Copy.css";
|
||||
import classNames from "classnames";
|
||||
import Icon from "Icons/Icon";
|
||||
import { useCopy } from "useCopy";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { useCopy } from "@/useCopy";
|
||||
|
||||
export interface CopyProps {
|
||||
text: string;
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { NostrLink } from "@snort/system";
|
||||
import { useReactions } from "@snort/system-react";
|
||||
|
||||
import { useArticles } from "Feed/ArticlesFeed";
|
||||
import { orderDescending } from "SnortUtils";
|
||||
import { useArticles } from "@/Feed/ArticlesFeed";
|
||||
import { orderDescending } from "@/SnortUtils";
|
||||
import Note from "../Event/Note";
|
||||
import { useContext } from "react";
|
||||
import { DeckContext } from "Pages/DeckLayout";
|
||||
import { DeckContext } from "@/Pages/DeckLayout";
|
||||
|
||||
export default function Articles() {
|
||||
const data = useArticles();
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import Avatar from "Element/User/Avatar";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import Avatar from "@/Element/User/Avatar";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import "./Nav.css";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { Link } from "react-router-dom";
|
||||
import { NoteCreatorButton } from "Element/Event/NoteCreatorButton";
|
||||
import { ProfileLink } from "Element/User/ProfileLink";
|
||||
import { NoteCreatorButton } from "@/Element/Event/NoteCreatorButton";
|
||||
import { ProfileLink } from "@/Element/User/ProfileLink";
|
||||
|
||||
export function DeckNav() {
|
||||
const { publicKey } = useLogin();
|
||||
|
@ -3,8 +3,8 @@ import { useEffect, useState } from "react";
|
||||
import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import Icon from "Icons/Icon";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
interface Token {
|
||||
token: Array<{
|
||||
|
@ -5,9 +5,9 @@ import { useMemo } from "react";
|
||||
import { decodeInvoice } from "@snort/shared";
|
||||
import classNames from "classnames";
|
||||
|
||||
import SendSats from "Element/SendSats";
|
||||
import Icon from "Icons/Icon";
|
||||
import { useWallet } from "Wallet";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { useWallet } from "@/Wallet";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import "./LinkPreview.css";
|
||||
import { CSSProperties, useEffect, useState } from "react";
|
||||
|
||||
import Spinner from "Icons/Spinner";
|
||||
import SnortApi, { LinkPreviewData } from "External/SnortApi";
|
||||
import useImgProxy from "Hooks/useImgProxy";
|
||||
import { MediaElement } from "Element/Embed/MediaElement";
|
||||
import Spinner from "@/Icons/Spinner";
|
||||
import SnortApi, { LinkPreviewData } from "@/External/SnortApi";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import { MediaElement } from "@/Element/Embed/MediaElement";
|
||||
|
||||
async function fetchUrlPreviewInfo(url: string) {
|
||||
const api = new SnortApi();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { Magnet } from "SnortUtils";
|
||||
import { Magnet } from "@/SnortUtils";
|
||||
|
||||
interface MagnetLinkProps {
|
||||
magnet: Magnet;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ProxyImg } from "Element/ProxyImg";
|
||||
import useImgProxy from "Hooks/useImgProxy";
|
||||
import { ProxyImg } from "@/Element/ProxyImg";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import React from "react";
|
||||
|
||||
interface MediaElementProps {
|
||||
|
@ -2,9 +2,9 @@ import { NostrLink, NostrPrefix } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useHover } from "@uidotdev/usehooks";
|
||||
|
||||
import DisplayName from "Element/User/DisplayName";
|
||||
import { ProfileCard } from "Element/User/ProfileCard";
|
||||
import { ProfileLink } from "Element/User/ProfileLink";
|
||||
import DisplayName from "@/Element/User/DisplayName";
|
||||
import { ProfileCard } from "@/Element/User/ProfileCard";
|
||||
import { ProfileLink } from "@/Element/User/ProfileLink";
|
||||
|
||||
export default function Mention({ link }: { link: NostrLink }) {
|
||||
const [ref, hovering] = useHover<HTMLAnchorElement>();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { MixCloudRegex } from "Const";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { MixCloudRegex } from "@/Const";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
const MixCloudEmbed = ({ link }: { link: string }) => {
|
||||
const feedPath = (MixCloudRegex.test(link) && RegExp.$1) + "%2F" + (MixCloudRegex.test(link) && RegExp.$2);
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { NostrPrefix, tryParseNostrLink } from "@snort/system";
|
||||
|
||||
import Mention from "Element/Embed/Mention";
|
||||
import NoteQuote from "Element/Event/NoteQuote";
|
||||
import Mention from "@/Element/Embed/Mention";
|
||||
import NoteQuote from "@/Element/Event/NoteQuote";
|
||||
|
||||
export default function NostrLink({ link, depth }: { link: string; depth?: number }) {
|
||||
const nav = tryParseNostrLink(link);
|
||||
|
@ -2,15 +2,15 @@ import { NostrEvent } from "@snort/system";
|
||||
import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
import { LNURL } from "@snort/shared";
|
||||
|
||||
import { dedupe, findTag, hexToBech32, getDisplayName } from "SnortUtils";
|
||||
import FollowListBase from "Element/User/FollowListBase";
|
||||
import AsyncButton from "Element/AsyncButton";
|
||||
import { useWallet } from "Wallet";
|
||||
import { Toastore } from "Toaster";
|
||||
import { UserCache } from "Cache";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { WalletInvoiceState } from "Wallet";
|
||||
import { dedupe, findTag, hexToBech32, getDisplayName } from "@/SnortUtils";
|
||||
import FollowListBase from "@/Element/User/FollowListBase";
|
||||
import AsyncButton from "@/Element/AsyncButton";
|
||||
import { useWallet } from "@/Wallet";
|
||||
import { Toastore } from "@/Toaster";
|
||||
import { UserCache } from "@/Cache";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { WalletInvoiceState } from "@/Wallet";
|
||||
|
||||
export default function PubkeyList({ ev, className }: { ev: NostrEvent; className?: string }) {
|
||||
const wallet = useWallet();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { TidalRegex } from "Const";
|
||||
import { TidalRegex } from "@/Const";
|
||||
|
||||
// Re-use dom parser across instances of TidalEmbed
|
||||
const domParser = new DOMParser();
|
||||
|
@ -2,8 +2,8 @@ import "./ZapstrEmbed.css";
|
||||
import { Link } from "react-router-dom";
|
||||
import { NostrEvent, NostrLink } from "@snort/system";
|
||||
|
||||
import { ProxyImg } from "Element/ProxyImg";
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import { ProxyImg } from "@/Element/ProxyImg";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
export default function ZapstrEmbed({ ev }: { ev: NostrEvent }) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Progress from "Element/Progress";
|
||||
import { UploadProgress } from "Upload";
|
||||
import Progress from "@/Element/Progress";
|
||||
import { UploadProgress } from "@/Upload";
|
||||
|
||||
export default function FileUploadProgress({ progress }: { progress: Array<UploadProgress> }) {
|
||||
return (
|
||||
|
@ -4,11 +4,11 @@ import { FormattedMessage, FormattedNumber } from "react-intl";
|
||||
import { NostrLink, TaggedNostrEvent } from "@snort/system";
|
||||
import { useEventReactions } from "@snort/system-react";
|
||||
|
||||
import { findTag } from "SnortUtils";
|
||||
import Text from "Element/Text";
|
||||
import { findTag } from "@/SnortUtils";
|
||||
import Text from "@/Element/Text";
|
||||
import { Markdown } from "./Markdown";
|
||||
import useImgProxy from "Hooks/useImgProxy";
|
||||
import ProfilePreview from "Element/User/ProfilePreview";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import NoteFooter from "./NoteFooter";
|
||||
import NoteTime from "./NoteTime";
|
||||
|
||||
|
@ -6,8 +6,8 @@ import { marked, Token } from "marked";
|
||||
import { Link } from "react-router-dom";
|
||||
import markedFootnote, { Footnotes, Footnote, FootnoteRef } from "marked-footnote";
|
||||
|
||||
import { ProxyImg } from "Element/ProxyImg";
|
||||
import NostrLink from "Element/Embed/NostrLink";
|
||||
import { ProxyImg } from "@/Element/ProxyImg";
|
||||
import NostrLink from "@/Element/Embed/NostrLink";
|
||||
|
||||
interface MarkdownProps {
|
||||
content: string;
|
||||
|
@ -2,10 +2,10 @@ import { FormattedMessage } from "react-intl";
|
||||
import { NostrEvent, NostrLink } from "@snort/system";
|
||||
import { useEventFeed } from "@snort/system-react";
|
||||
|
||||
import { findTag } from "SnortUtils";
|
||||
import PageSpinner from "Element/PageSpinner";
|
||||
import Reveal from "Element/Event/Reveal";
|
||||
import { MediaElement } from "Element/Embed/MediaElement";
|
||||
import { findTag } from "@/SnortUtils";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import Reveal from "@/Element/Event/Reveal";
|
||||
import { MediaElement } from "@/Element/Embed/MediaElement";
|
||||
|
||||
export default function NostrFileHeader({ link }: { link: NostrLink }) {
|
||||
const ev = useEventFeed(link);
|
||||
|
@ -1,13 +1,13 @@
|
||||
import "./Note.css";
|
||||
import { ReactNode } from "react";
|
||||
import { EventKind, NostrEvent, TaggedNostrEvent } from "@snort/system";
|
||||
import { NostrFileElement } from "Element/Event/NostrFileHeader";
|
||||
import ZapstrEmbed from "Element/Embed/ZapstrEmbed";
|
||||
import PubkeyList from "Element/Embed/PubkeyList";
|
||||
import { LiveEvent } from "Element/LiveEvent";
|
||||
import { ZapGoal } from "Element/Event/ZapGoal";
|
||||
import NoteReaction from "Element/Event/NoteReaction";
|
||||
import ProfilePreview from "Element/User/ProfilePreview";
|
||||
import { NostrFileElement } from "@/Element/Event/NostrFileHeader";
|
||||
import ZapstrEmbed from "@/Element/Embed/ZapstrEmbed";
|
||||
import PubkeyList from "@/Element/Embed/PubkeyList";
|
||||
import { LiveEvent } from "@/Element/LiveEvent";
|
||||
import { ZapGoal } from "@/Element/Event/ZapGoal";
|
||||
import NoteReaction from "@/Element/Event/NoteReaction";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import { NoteInner } from "./NoteInner";
|
||||
import { LongFormText } from "./LongFormText";
|
||||
|
||||
|
@ -3,13 +3,13 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { removeUndefined, unwrap } from "@snort/shared";
|
||||
import { NostrEvent, OkResponse } from "@snort/system";
|
||||
|
||||
import AsyncButton from "Element/AsyncButton";
|
||||
import Icon from "Icons/Icon";
|
||||
import { getRelayName, sanitizeRelayUrl } from "SnortUtils";
|
||||
import { removeRelay } from "Login";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { saveRelays } from "Pages/settings/Relays";
|
||||
import AsyncButton from "@/Element/AsyncButton";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { getRelayName, sanitizeRelayUrl } from "@/SnortUtils";
|
||||
import { removeRelay } from "@/Login";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { saveRelays } from "@/Pages/settings/Relays";
|
||||
|
||||
export function NoteBroadcaster({
|
||||
evs,
|
||||
|
@ -3,15 +3,15 @@ import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { HexKey, NostrLink, NostrPrefix, TaggedNostrEvent } from "@snort/system";
|
||||
import { Menu, MenuItem } from "@szhsin/react-menu";
|
||||
|
||||
import Icon from "Icons/Icon";
|
||||
import { setPinned, setBookmarked } from "Login";
|
||||
import messages from "Element/messages";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { setPinned, setBookmarked } from "@/Login";
|
||||
import messages from "@/Element/messages";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { ReBroadcaster } from "../ReBroadcaster";
|
||||
import SnortApi from "External/SnortApi";
|
||||
import { SubscriptionType, getCurrentSubscription } from "Subscription";
|
||||
import SnortApi from "@/External/SnortApi";
|
||||
import { SubscriptionType, getCurrentSubscription } from "@/Subscription";
|
||||
|
||||
export interface NoteTranslation {
|
||||
text: string;
|
||||
|
@ -4,28 +4,28 @@ import { EventKind, NostrPrefix, TaggedNostrEvent, EventBuilder, tryParseNostrLi
|
||||
import classNames from "classnames";
|
||||
import { TagsInput } from "react-tag-input-component";
|
||||
|
||||
import Icon from "Icons/Icon";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { appendDedupe, openFile } from "SnortUtils";
|
||||
import Textarea from "Element/Textarea";
|
||||
import Modal from "Element/Modal";
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import useFileUpload from "Upload";
|
||||
import Note from "Element/Event/Note";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { appendDedupe, openFile } from "@/SnortUtils";
|
||||
import Textarea from "@/Element/Textarea";
|
||||
import Modal from "@/Element/Modal";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import useFileUpload from "@/Upload";
|
||||
import Note from "@/Element/Event/Note";
|
||||
|
||||
import { ClipboardEventHandler, DragEvent, useEffect, useState } from "react";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { GetPowWorker } from "index";
|
||||
import AsyncButton from "Element/AsyncButton";
|
||||
import { AsyncIcon } from "Element/AsyncIcon";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { GetPowWorker } from "@/index";
|
||||
import AsyncButton from "@/Element/AsyncButton";
|
||||
import { AsyncIcon } from "@/Element/AsyncIcon";
|
||||
import { fetchNip05Pubkey } from "@snort/shared";
|
||||
import { ZapTarget } from "Zapper";
|
||||
import { useNoteCreator } from "State/NoteCreator";
|
||||
import { ZapTarget } from "@/Zapper";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import { NoteBroadcaster } from "./NoteBroadcaster";
|
||||
import FileUploadProgress from "./FileUpload";
|
||||
import { ToggleSwitch } from "Icons/Toggle";
|
||||
import NostrBandApi from "External/NostrBand";
|
||||
import { useLocale } from "IntlProvider";
|
||||
import { ToggleSwitch } from "@/Icons/Toggle";
|
||||
import NostrBandApi from "@/External/NostrBand";
|
||||
import { useLocale } from "@/IntlProvider";
|
||||
|
||||
export function NoteCreator() {
|
||||
const { formatMessage } = useIntl();
|
||||
|
@ -3,11 +3,11 @@ import { useRef, useMemo } from "react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import classNames from "classnames";
|
||||
|
||||
import { isFormElement } from "SnortUtils";
|
||||
import useKeyboardShortcut from "Hooks/useKeyboardShortcut";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import Icon from "Icons/Icon";
|
||||
import { useNoteCreator } from "State/NoteCreator";
|
||||
import { isFormElement } from "@/SnortUtils";
|
||||
import useKeyboardShortcut from "@/Hooks/useKeyboardShortcut";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import { NoteCreator } from "./NoteCreator";
|
||||
|
||||
export const NoteCreatorButton = ({ className }: { className?: string }) => {
|
||||
|
@ -7,20 +7,20 @@ import { useUserProfile } from "@snort/system-react";
|
||||
import { Menu, MenuItem } from "@szhsin/react-menu";
|
||||
import classNames from "classnames";
|
||||
|
||||
import { formatShort } from "Number";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { delay, findTag, getDisplayName } from "SnortUtils";
|
||||
import SendSats from "Element/SendSats";
|
||||
import { ZapsSummary } from "Element/Event/Zap";
|
||||
import { AsyncIcon, AsyncIconProps } from "Element/AsyncIcon";
|
||||
import { formatShort } from "@/Number";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { delay, findTag, getDisplayName } from "@/SnortUtils";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import { ZapsSummary } from "@/Element/Event/Zap";
|
||||
import { AsyncIcon, AsyncIconProps } from "@/Element/AsyncIcon";
|
||||
|
||||
import { useWallet } from "Wallet";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { useInteractionCache } from "Hooks/useInteractionCache";
|
||||
import { ZapPoolController } from "ZapPoolController";
|
||||
import { Zapper, ZapTarget } from "Zapper";
|
||||
import { useNoteCreator } from "State/NoteCreator";
|
||||
import Icon from "Icons/Icon";
|
||||
import { useWallet } from "@/Wallet";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { useInteractionCache } from "@/Hooks/useInteractionCache";
|
||||
import { ZapPoolController } from "@/ZapPoolController";
|
||||
import { Zapper, ZapTarget } from "@/Zapper";
|
||||
import { useNoteCreator } from "@/State/NoteCreator";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
@ -308,14 +308,15 @@ export default function NoteFooter(props: NoteFooterProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const AsyncFooterIcon = forwardRef((props: AsyncIconProps & { value: number }) => {
|
||||
const AsyncFooterIcon = forwardRef((props: AsyncIconProps & { value: number }, ref) => {
|
||||
const mergedProps = {
|
||||
...props,
|
||||
iconSize: 18,
|
||||
className: classNames("transition duration-200 ease-in-out reaction-pill", props.className),
|
||||
};
|
||||
|
||||
return (
|
||||
<AsyncIcon {...mergedProps}>
|
||||
<AsyncIcon ref={ref} {...mergedProps}>
|
||||
{props.value > 0 && <div className="reaction-pill-number">{formatShort(props.value)}</div>}
|
||||
</AsyncIcon>
|
||||
);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import "./Note.css";
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
|
||||
interface NoteGhostProps {
|
||||
className?: string;
|
||||
|
@ -6,26 +6,26 @@ import classNames from "classnames";
|
||||
import { EventExt, EventKind, HexKey, NostrLink, NostrPrefix, TaggedNostrEvent } from "@snort/system";
|
||||
import { useEventReactions } from "@snort/system-react";
|
||||
|
||||
import { findTag, hexToBech32 } from "SnortUtils";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { findTag, hexToBech32 } from "@/SnortUtils";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { NoteContextMenu, NoteTranslation } from "./NoteContextMenu";
|
||||
import { UserCache } from "Cache";
|
||||
import { UserCache } from "@/Cache";
|
||||
import messages from "../messages";
|
||||
import { setBookmarked, setPinned } from "Login";
|
||||
import { setBookmarked, setPinned } from "@/Login";
|
||||
import Text from "../Text";
|
||||
import Reveal from "./Reveal";
|
||||
import Poll from "./Poll";
|
||||
import ProfileImage from "../User/ProfileImage";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import NoteTime from "./NoteTime";
|
||||
import NoteFooter from "./NoteFooter";
|
||||
import Reactions from "./Reactions";
|
||||
import HiddenNote from "./HiddenNote";
|
||||
import { NoteProps } from "./Note";
|
||||
import { chainKey } from "Hooks/useThreadContext";
|
||||
import { ProfileLink } from "Element/User/ProfileLink";
|
||||
import { chainKey } from "@/Hooks/useThreadContext";
|
||||
import { ProfileLink } from "@/Element/User/ProfileLink";
|
||||
|
||||
export function NoteInner(props: NoteProps) {
|
||||
const { data: ev, related, highlight, options: opt, ignoreModeration = false, className } = props;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { NostrLink } from "@snort/system";
|
||||
import { useEventFeed } from "@snort/system-react";
|
||||
|
||||
import Note from "Element/Event/Note";
|
||||
import PageSpinner from "Element/PageSpinner";
|
||||
import Note from "@/Element/Event/Note";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
|
||||
export default function NoteQuote({ link, depth }: { link: NostrLink; depth?: number }) {
|
||||
const ev = useEventFeed(link);
|
||||
|
@ -3,11 +3,11 @@ import { Link } from "react-router-dom";
|
||||
import { useMemo } from "react";
|
||||
import { EventKind, NostrEvent, TaggedNostrEvent, NostrPrefix, EventExt } from "@snort/system";
|
||||
|
||||
import Note from "Element/Event/Note";
|
||||
import { eventLink, hexToBech32, getDisplayName } from "SnortUtils";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import Note from "@/Element/Event/Note";
|
||||
import { eventLink, hexToBech32, getDisplayName } from "@/SnortUtils";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
|
||||
|
@ -4,13 +4,13 @@ import { useState } from "react";
|
||||
import { FormattedMessage, FormattedNumber, useIntl } from "react-intl";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { useWallet } from "Wallet";
|
||||
import { unwrap } from "SnortUtils";
|
||||
import { formatShort } from "Number";
|
||||
import Spinner from "Icons/Spinner";
|
||||
import SendSats from "Element/SendSats";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { useWallet } from "@/Wallet";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import { formatShort } from "@/Number";
|
||||
import Spinner from "@/Icons/Spinner";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
interface PollProps {
|
||||
ev: TaggedNostrEvent;
|
||||
|
@ -4,12 +4,12 @@ import { useState, useMemo, useEffect } from "react";
|
||||
import { useIntl, FormattedMessage } from "react-intl";
|
||||
import { TaggedNostrEvent, ParsedZap } from "@snort/system";
|
||||
|
||||
import { formatShort } from "Number";
|
||||
import Icon from "Icons/Icon";
|
||||
import { Tab } from "Element/Tabs";
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import Tabs from "Element/Tabs";
|
||||
import Modal from "Element/Modal";
|
||||
import { formatShort } from "@/Number";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { Tab } from "@/Element/Tabs";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import Tabs from "@/Element/Tabs";
|
||||
import Modal from "@/Element/Modal";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { WarningNotice } from "Element/WarningNotice";
|
||||
import { WarningNotice } from "@/Element/WarningNotice";
|
||||
import { useState } from "react";
|
||||
|
||||
interface RevealProps {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { FileExtensionRegex } from "Const";
|
||||
import Reveal from "Element/Event/Reveal";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { MediaElement } from "Element/Embed/MediaElement";
|
||||
import { FileExtensionRegex } from "@/Const";
|
||||
import Reveal from "@/Element/Event/Reveal";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { MediaElement } from "@/Element/Embed/MediaElement";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
interface RevealMediaProps {
|
||||
|
@ -5,12 +5,12 @@ import { useNavigate, useParams } from "react-router-dom";
|
||||
import { TaggedNostrEvent, u256, NostrPrefix, EventExt, parseNostrLink, NostrLink } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
|
||||
import { getAllLinkReactions, getLinkReactions } from "SnortUtils";
|
||||
import BackButton from "Element/BackButton";
|
||||
import Note from "Element/Event/Note";
|
||||
import NoteGhost from "Element/Event/NoteGhost";
|
||||
import Collapsed from "Element/Collapsed";
|
||||
import { ThreadContext, ThreadContextWrapper, chainKey } from "Hooks/useThreadContext";
|
||||
import { getAllLinkReactions, getLinkReactions } from "@/SnortUtils";
|
||||
import BackButton from "@/Element/BackButton";
|
||||
import Note from "@/Element/Event/Note";
|
||||
import NoteGhost from "@/Element/Event/NoteGhost";
|
||||
import Collapsed from "@/Element/Collapsed";
|
||||
import { ThreadContext, ThreadContextWrapper, chainKey } from "@/Hooks/useThreadContext";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -3,11 +3,11 @@ import { useMemo } from "react";
|
||||
import { ParsedZap } from "@snort/system";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { unwrap } from "SnortUtils";
|
||||
import { formatShort } from "Number";
|
||||
import Text from "Element/Text";
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import { formatShort } from "@/Number";
|
||||
import Text from "@/Element/Text";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -3,9 +3,9 @@ import { useState } from "react";
|
||||
import { HexKey } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import SendSats from "Element/SendSats";
|
||||
import Icon from "Icons/Icon";
|
||||
import { ZapTarget } from "Zapper";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { ZapTarget } from "@/Zapper";
|
||||
|
||||
const ZapButton = ({
|
||||
pubkey,
|
||||
|
@ -1,13 +1,13 @@
|
||||
import "./ZapGoal.css";
|
||||
import { useState } from "react";
|
||||
import { NostrEvent, NostrLink } from "@snort/system";
|
||||
import useZapsFeed from "Feed/ZapsFeed";
|
||||
import { formatShort } from "Number";
|
||||
import { findTag } from "SnortUtils";
|
||||
import Icon from "Icons/Icon";
|
||||
import useZapsFeed from "@/Feed/ZapsFeed";
|
||||
import { formatShort } from "@/Number";
|
||||
import { findTag } from "@/SnortUtils";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import SendSats from "../SendSats";
|
||||
import { Zapper } from "Zapper";
|
||||
import Progress from "Element/Progress";
|
||||
import { Zapper } from "@/Zapper";
|
||||
import Progress from "@/Element/Progress";
|
||||
import { FormattedNumber } from "react-intl";
|
||||
|
||||
export function ZapGoal({ ev }: { ev: NostrEvent }) {
|
||||
|
@ -3,10 +3,10 @@ import { FormattedMessage } from "react-intl";
|
||||
import { useCallback, useMemo } from "react";
|
||||
import { TaggedNostrEvent, EventKind } from "@snort/system";
|
||||
|
||||
import { dedupeByPubkey, findTag } from "SnortUtils";
|
||||
import useTimelineFeed, { TimelineFeed, TimelineSubject } from "Feed/TimelineFeed";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import { LiveStreams } from "Element/LiveStreams";
|
||||
import { dedupeByPubkey, findTag } from "@/SnortUtils";
|
||||
import useTimelineFeed, { TimelineFeed, TimelineSubject } from "@/Feed/TimelineFeed";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import { LiveStreams } from "@/Element/LiveStreams";
|
||||
import { TimelineRenderer } from "./TimelineFragment";
|
||||
import { unixNow } from "@snort/shared";
|
||||
|
||||
|
@ -5,14 +5,14 @@ import { EventKind, NostrEvent, NostrLink, TaggedNostrEvent } from "@snort/syste
|
||||
import { unixNow } from "@snort/shared";
|
||||
import { SnortContext, useReactions } from "@snort/system-react";
|
||||
|
||||
import { dedupeByPubkey, findTag, orderDescending } from "SnortUtils";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import { FollowsFeed } from "Cache";
|
||||
import { LiveStreams } from "Element/LiveStreams";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { dedupeByPubkey, findTag, orderDescending } from "@/SnortUtils";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
import { FollowsFeed } from "@/Cache";
|
||||
import { LiveStreams } from "@/Element/LiveStreams";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { TimelineRenderer } from "./TimelineFragment";
|
||||
import useHashtagsFeed from "Feed/HashtagsFeed";
|
||||
import { ShowMoreInView } from "Element/Event/ShowMore";
|
||||
import useHashtagsFeed from "@/Feed/HashtagsFeed";
|
||||
import { ShowMoreInView } from "@/Element/Event/ShowMore";
|
||||
|
||||
export interface TimelineFollowsProps {
|
||||
postsOnly: boolean;
|
||||
|
@ -3,10 +3,10 @@ import { FormattedMessage } from "react-intl";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
import { TaggedNostrEvent } from "@snort/system";
|
||||
|
||||
import Note from "Element/Event/Note";
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import Icon from "Icons/Icon";
|
||||
import { findTag } from "SnortUtils";
|
||||
import Note from "@/Element/Event/Note";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { findTag } from "@/SnortUtils";
|
||||
|
||||
export interface TimelineFragment {
|
||||
events: Array<TaggedNostrEvent>;
|
||||
|
@ -11,18 +11,18 @@ import {
|
||||
AppleMusicRegex,
|
||||
NostrNestsRegex,
|
||||
WavlakeRegex,
|
||||
} from "Const";
|
||||
import { magnetURIDecode } from "SnortUtils";
|
||||
import SoundCloudEmbed from "Element/Embed/SoundCloudEmded";
|
||||
import MixCloudEmbed from "Element/Embed/MixCloudEmbed";
|
||||
import SpotifyEmbed from "Element/Embed/SpotifyEmbed";
|
||||
import TidalEmbed from "Element/Embed/TidalEmbed";
|
||||
import TwitchEmbed from "Element/Embed/TwitchEmbed";
|
||||
import AppleMusicEmbed from "Element/Embed/AppleMusicEmbed";
|
||||
import WavlakeEmbed from "Element/Embed/WavlakeEmbed";
|
||||
import LinkPreview from "Element/Embed/LinkPreview";
|
||||
import NostrLink from "Element/Embed/NostrLink";
|
||||
import MagnetLink from "Element/Embed/MagnetLink";
|
||||
} from "@/Const";
|
||||
import { magnetURIDecode } from "@/SnortUtils";
|
||||
import SoundCloudEmbed from "@/Element/Embed/SoundCloudEmded";
|
||||
import MixCloudEmbed from "@/Element/Embed/MixCloudEmbed";
|
||||
import SpotifyEmbed from "@/Element/Embed/SpotifyEmbed";
|
||||
import TidalEmbed from "@/Element/Embed/TidalEmbed";
|
||||
import TwitchEmbed from "@/Element/Embed/TwitchEmbed";
|
||||
import AppleMusicEmbed from "@/Element/Embed/AppleMusicEmbed";
|
||||
import WavlakeEmbed from "@/Element/Embed/WavlakeEmbed";
|
||||
import LinkPreview from "@/Element/Embed/LinkPreview";
|
||||
import NostrLink from "@/Element/Embed/NostrLink";
|
||||
import MagnetLink from "@/Element/Embed/MagnetLink";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
interface HypeTextProps {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import classNames from "classnames";
|
||||
import Icon, { IconProps } from "Icons/Icon";
|
||||
import Icon, { IconProps } from "@/Icons/Icon";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
interface IconButtonProps {
|
||||
|
@ -2,9 +2,9 @@ import { mapEventToProfile } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
|
||||
import AccountName from "./AccountName";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { UserCache } from "Cache";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { UserCache } from "@/Cache";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
export default function ActiveAccount({ name = "", setAsPrimary = () => {} }) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { Component, FormEvent } from "react";
|
||||
import { LoginStore } from "Login";
|
||||
import { LoginStore } from "@/Login";
|
||||
|
||||
import AccountName from "./AccountName";
|
||||
import ActiveAccount from "./ActiveAccount";
|
||||
import ReservedAccount from "./ReservedAccount";
|
||||
import { ProfileLoader } from "index";
|
||||
import { ProfileLoader } from "@/index";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { injectIntl } from "react-intl";
|
||||
import messages from "Element/messages";
|
||||
import messages from "@/Element/messages";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
@ -2,9 +2,9 @@ import { NostrEvent, NostrLink } from "@snort/system";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import { findTag } from "SnortUtils";
|
||||
import { findTag } from "@/SnortUtils";
|
||||
import ProfileImage from "./User/ProfileImage";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
export function LiveEvent({ ev }: { ev: NostrEvent }) {
|
||||
const title = findTag(ev, "title");
|
||||
|
@ -1,10 +1,10 @@
|
||||
import "./LiveStreams.css";
|
||||
import { NostrEvent, NostrLink } from "@snort/system";
|
||||
import { findTag } from "SnortUtils";
|
||||
import { findTag } from "@/SnortUtils";
|
||||
import { CSSProperties, useMemo } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import useImgProxy from "Hooks/useImgProxy";
|
||||
import Icon from "Icons/Icon";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
export function LiveStreams({ evs }: { evs: Array<NostrEvent> }) {
|
||||
const streams = useMemo(() => {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import { logout } from "Login";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { logout } from "@/Login";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import messages from "./messages";
|
||||
|
||||
export default function LogoutButton() {
|
||||
|
@ -3,8 +3,8 @@ import { useIntl, FormattedMessage } from "react-intl";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { UserMetadata, mapEventToProfile } from "@snort/system";
|
||||
|
||||
import { unwrap } from "SnortUtils";
|
||||
import { formatShort } from "Number";
|
||||
import { unwrap } from "@/SnortUtils";
|
||||
import { formatShort } from "@/Number";
|
||||
import {
|
||||
ServiceProvider,
|
||||
ServiceConfig,
|
||||
@ -13,16 +13,16 @@ import {
|
||||
ServiceErrorCode,
|
||||
HandleRegisterResponse,
|
||||
CheckRegisterResponse,
|
||||
} from "Nip05/ServiceProvider";
|
||||
import AsyncButton from "Element/AsyncButton";
|
||||
import SendSats from "Element/SendSats";
|
||||
import Copy from "Element/Copy";
|
||||
} from "@/Nip05/ServiceProvider";
|
||||
import AsyncButton from "@/Element/AsyncButton";
|
||||
import SendSats from "@/Element/SendSats";
|
||||
import Copy from "@/Element/Copy";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { debounce } from "SnortUtils";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import SnortServiceProvider from "Nip05/SnortServiceProvider";
|
||||
import { UserCache } from "Cache";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { debounce } from "@/SnortUtils";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import SnortServiceProvider from "@/Nip05/SnortServiceProvider";
|
||||
import { UserCache } from "@/Cache";
|
||||
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import AsyncButton from "./AsyncButton";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import classNames from "classnames";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Spinner from "Icons/Spinner";
|
||||
import Spinner from "@/Icons/Spinner";
|
||||
|
||||
export default function PageSpinner() {
|
||||
return (
|
||||
|
@ -1,15 +1,15 @@
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import "./PinPrompt.css";
|
||||
import { ReactNode, useRef, useState } from "react";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { unwrap } from "@snort/shared";
|
||||
import { EventPublisher, InvalidPinError, PinEncrypted } from "@snort/system";
|
||||
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { LoginStore, createPublisher, sessionNeedsPin } from "Login";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { LoginStore, createPublisher, sessionNeedsPin } from "@/Login";
|
||||
import Modal from "./Modal";
|
||||
import AsyncButton from "./AsyncButton";
|
||||
import { GetPowWorker } from "index";
|
||||
import { GetPowWorker } from "@/index";
|
||||
|
||||
export function PinPrompt({
|
||||
onResult,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import useImgProxy from "Hooks/useImgProxy";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import React, { useState } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { getUrlHostname } from "SnortUtils";
|
||||
import { getUrlHostname } from "@/SnortUtils";
|
||||
|
||||
interface ProxyImgProps extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
|
||||
size?: number;
|
||||
|
@ -3,9 +3,9 @@ import { FormattedMessage } from "react-intl";
|
||||
import { TaggedNostrEvent } from "@snort/system";
|
||||
import { SnortContext } from "@snort/system-react";
|
||||
|
||||
import Modal from "Element/Modal";
|
||||
import Modal from "@/Element/Modal";
|
||||
import messages from "./messages";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import AsyncButton from "./AsyncButton";
|
||||
|
||||
export function ReBroadcaster({ onClose, ev }: { onClose: () => void; ev: TaggedNostrEvent }) {
|
||||
|
@ -5,13 +5,13 @@ import { RelaySettings } from "@snort/system";
|
||||
import { unixNowMs } from "@snort/shared";
|
||||
import classNames from "classnames";
|
||||
|
||||
import useRelayState from "Feed/RelayState";
|
||||
import useRelayState from "@/Feed/RelayState";
|
||||
import { SnortContext } from "@snort/system-react";
|
||||
import { getRelayName, unwrap } from "SnortUtils";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { removeRelay, setRelays } from "Login";
|
||||
import { getRelayName, unwrap } from "@/SnortUtils";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { removeRelay, setRelays } from "@/Login";
|
||||
import { RelayFavicon } from "./RelaysMetadata";
|
||||
import { AsyncIcon } from "Element/AsyncIcon";
|
||||
import { AsyncIcon } from "@/Element/AsyncIcon";
|
||||
|
||||
export interface RelayProps {
|
||||
addr: string;
|
||||
|
@ -1,9 +1,9 @@
|
||||
import "./RelaysMetadata.css";
|
||||
import Nostrich from "nostrich.webp";
|
||||
import Nostrich from "@/nostrich.webp";
|
||||
import { useState } from "react";
|
||||
|
||||
import { FullRelaySettings } from "@snort/system";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
export const RelayFavicon = ({ url }: { url: string }) => {
|
||||
const cleanUrl = url
|
||||
|
@ -4,8 +4,8 @@ import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { Menu, MenuItem } from "@szhsin/react-menu";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import Icon from "Icons/Icon";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
export type RootTab =
|
||||
| "following"
|
||||
@ -157,6 +157,7 @@ export function RootTabs({ base }: { base?: string }) {
|
||||
.filter(a => a.show)
|
||||
.map(a => (
|
||||
<MenuItem
|
||||
key={a.tab}
|
||||
onClick={() => {
|
||||
navigate(a.path);
|
||||
}}>
|
||||
|
@ -5,18 +5,18 @@ import { useIntl, FormattedMessage } from "react-intl";
|
||||
import { HexKey } from "@snort/system";
|
||||
import { LNURLSuccessAction } from "@snort/shared";
|
||||
|
||||
import { formatShort } from "Number";
|
||||
import Icon from "Icons/Icon";
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import Modal from "Element/Modal";
|
||||
import QrCode from "Element/QrCode";
|
||||
import Copy from "Element/Copy";
|
||||
import { debounce } from "SnortUtils";
|
||||
import { LNWallet, useWallet } from "Wallet";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import AsyncButton from "Element/AsyncButton";
|
||||
import { ZapTarget, ZapTargetResult, Zapper } from "Zapper";
|
||||
import { formatShort } from "@/Number";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import Modal from "@/Element/Modal";
|
||||
import QrCode from "@/Element/QrCode";
|
||||
import Copy from "@/Element/Copy";
|
||||
import { debounce } from "@/SnortUtils";
|
||||
import { LNWallet, useWallet } from "@/Wallet";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import AsyncButton from "@/Element/AsyncButton";
|
||||
import { ZapTarget, ZapTargetResult, Zapper } from "@/Zapper";
|
||||
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import "./SpotlightMedia.css";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import Modal from "Element/Modal";
|
||||
import Icon from "Icons/Icon";
|
||||
import { ProxyImg } from "Element/ProxyImg";
|
||||
import Modal from "@/Element/Modal";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { ProxyImg } from "@/Element/ProxyImg";
|
||||
|
||||
interface SpotlightMediaProps {
|
||||
images: Array<string>;
|
||||
|
@ -2,12 +2,12 @@ import { useEffect, useState } from "react";
|
||||
import { HexKey, NostrPrefix } from "@snort/system";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import FollowListBase from "Element/User/FollowListBase";
|
||||
import PageSpinner from "Element/PageSpinner";
|
||||
import NostrBandApi from "External/NostrBand";
|
||||
import SemisolDevApi from "External/SemisolDev";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { hexToBech32 } from "SnortUtils";
|
||||
import FollowListBase from "@/Element/User/FollowListBase";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import NostrBandApi from "@/External/NostrBand";
|
||||
import SemisolDevApi from "@/External/SemisolDev";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { hexToBech32 } from "@/SnortUtils";
|
||||
import { ErrorOrOffline } from "./ErrorOrOffline";
|
||||
|
||||
enum Provider {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ReactNode } from "react";
|
||||
import "./Tabs.css";
|
||||
import useHorizontalScroll from "Hooks/useHorizontalScroll";
|
||||
import useHorizontalScroll from "@/Hooks/useHorizontalScroll";
|
||||
|
||||
export interface Tab {
|
||||
text: ReactNode;
|
||||
|
@ -3,15 +3,15 @@ import { ReactNode, useState } from "react";
|
||||
import { HexKey, ParsedFragment } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
|
||||
import Invoice from "Element/Embed/Invoice";
|
||||
import Hashtag from "Element/Embed/Hashtag";
|
||||
import HyperText from "Element/HyperText";
|
||||
import CashuNuts from "Element/Embed/CashuNuts";
|
||||
import Invoice from "@/Element/Embed/Invoice";
|
||||
import Hashtag from "@/Element/Embed/Hashtag";
|
||||
import HyperText from "@/Element/HyperText";
|
||||
import CashuNuts from "@/Element/Embed/CashuNuts";
|
||||
import RevealMedia from "./Event/RevealMedia";
|
||||
import { ProxyImg } from "./ProxyImg";
|
||||
import { SpotlightMediaModal } from "./SpotlightMedia";
|
||||
import HighlightedText from "./HighlightedText";
|
||||
import { useTextTransformer } from "Hooks/useTextTransformCache";
|
||||
import { useTextTransformer } from "@/Hooks/useTextTransformCache";
|
||||
|
||||
export interface TextProps {
|
||||
id: string;
|
||||
|
@ -6,11 +6,11 @@ import ReactTextareaAutocomplete from "@webscopeio/react-textarea-autocomplete";
|
||||
import TextareaAutosize from "react-textarea-autosize";
|
||||
import { NostrPrefix, MetadataCache } from "@snort/system";
|
||||
|
||||
import Avatar from "Element/User/Avatar";
|
||||
import Nip05 from "Element/User/Nip05";
|
||||
import { hexToBech32 } from "SnortUtils";
|
||||
import { UserCache } from "Cache";
|
||||
import searchEmoji from "emoji-search";
|
||||
import Avatar from "@/Element/User/Avatar";
|
||||
import Nip05 from "@/Element/User/Nip05";
|
||||
import { hexToBech32 } from "@/SnortUtils";
|
||||
import { UserCache } from "@/Cache";
|
||||
import searchEmoji from "@/emoji-search";
|
||||
|
||||
import messages from "./messages";
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { ReactNode, useEffect, useState } from "react";
|
||||
|
||||
import PageSpinner from "Element/PageSpinner";
|
||||
import NostrBandApi from "External/NostrBand";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import NostrBandApi from "@/External/NostrBand";
|
||||
import { ErrorOrOffline } from "./ErrorOrOffline";
|
||||
import { HashTagHeader } from "Pages/HashTagsPage";
|
||||
import { useLocale } from "IntlProvider";
|
||||
import { HashTagHeader } from "@/Pages/HashTagsPage";
|
||||
import { useLocale } from "@/IntlProvider";
|
||||
|
||||
export default function TrendingHashtags({ title }: { title?: ReactNode }) {
|
||||
const [hashtags, setHashtags] = useState<Array<{ hashtag: string; posts: number }>>();
|
||||
|
@ -2,12 +2,12 @@ import { useEffect, useState } from "react";
|
||||
import { NostrEvent, NostrLink, TaggedNostrEvent } from "@snort/system";
|
||||
import { useReactions } from "@snort/system-react";
|
||||
|
||||
import PageSpinner from "Element/PageSpinner";
|
||||
import Note from "Element/Event/Note";
|
||||
import NostrBandApi from "External/NostrBand";
|
||||
import { ErrorOrOffline } from "Element/ErrorOrOffline";
|
||||
import { useLocale } from "IntlProvider";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import Note from "@/Element/Event/Note";
|
||||
import NostrBandApi from "@/External/NostrBand";
|
||||
import { ErrorOrOffline } from "@/Element/ErrorOrOffline";
|
||||
import { useLocale } from "@/IntlProvider";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
|
||||
export default function TrendingNotes() {
|
||||
const [posts, setPosts] = useState<Array<NostrEvent>>();
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { ReactNode, useEffect, useState } from "react";
|
||||
import { HexKey } from "@snort/system";
|
||||
|
||||
import FollowListBase from "Element/User/FollowListBase";
|
||||
import PageSpinner from "Element/PageSpinner";
|
||||
import NostrBandApi from "External/NostrBand";
|
||||
import FollowListBase from "@/Element/User/FollowListBase";
|
||||
import PageSpinner from "@/Element/PageSpinner";
|
||||
import NostrBandApi from "@/External/NostrBand";
|
||||
import { ErrorOrOffline } from "./ErrorOrOffline";
|
||||
|
||||
export default function TrendingUsers({ title }: { title?: ReactNode }) {
|
||||
|
@ -4,8 +4,8 @@ import { CSSProperties, ReactNode, useEffect, useState } from "react";
|
||||
import type { UserMetadata } from "@snort/system";
|
||||
import classNames from "classnames";
|
||||
|
||||
import useImgProxy from "Hooks/useImgProxy";
|
||||
import { defaultAvatar, getDisplayName } from "SnortUtils";
|
||||
import useImgProxy from "@/Hooks/useImgProxy";
|
||||
import { defaultAvatar, getDisplayName } from "@/SnortUtils";
|
||||
|
||||
interface AvatarProps {
|
||||
pubkey: string;
|
||||
|
@ -1,9 +1,9 @@
|
||||
import "./AvatarEditor.css";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import { useState } from "react";
|
||||
import useFileUpload from "Upload";
|
||||
import { openFile, unwrap } from "SnortUtils";
|
||||
import Spinner from "Icons/Spinner";
|
||||
import useFileUpload from "@/Upload";
|
||||
import { openFile, unwrap } from "@/SnortUtils";
|
||||
import Spinner from "@/Icons/Spinner";
|
||||
|
||||
interface AvatarEditorProps {
|
||||
picture?: string;
|
||||
|
@ -5,11 +5,11 @@ import { FormattedMessage } from "react-intl";
|
||||
|
||||
import { TaggedNostrEvent } from "@snort/system";
|
||||
|
||||
import { ProxyImg } from "Element/ProxyImg";
|
||||
import Icon from "Icons/Icon";
|
||||
import Modal from "Element/Modal";
|
||||
import Username from "Element/User/Username";
|
||||
import { findTag } from "SnortUtils";
|
||||
import { ProxyImg } from "@/Element/ProxyImg";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import Modal from "@/Element/Modal";
|
||||
import Username from "@/Element/User/Username";
|
||||
import { findTag } from "@/SnortUtils";
|
||||
|
||||
export default function BadgeList({ badges }: { badges: TaggedNostrEvent[] }) {
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { HexKey } from "@snort/system";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import BlockButton from "Element/User/BlockButton";
|
||||
import ProfilePreview from "Element/User/ProfilePreview";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import BlockButton from "@/Element/User/BlockButton";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
|
||||
export default function BlockList() {
|
||||
const { blocked } = useModeration();
|
||||
|
@ -2,9 +2,9 @@ import { useState, useMemo, ChangeEvent } from "react";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { HexKey, TaggedNostrEvent } from "@snort/system";
|
||||
|
||||
import Note from "Element/Event/Note";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { UserCache } from "Cache";
|
||||
import Note from "@/Element/Event/Note";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import { UserCache } from "@/Cache";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -2,7 +2,7 @@ import "./DisplayName.css";
|
||||
|
||||
import { useMemo } from "react";
|
||||
import { HexKey, UserMetadata } from "@snort/system";
|
||||
import { getDisplayNameOrPlaceHolder } from "SnortUtils";
|
||||
import { getDisplayNameOrPlaceHolder } from "@/SnortUtils";
|
||||
|
||||
interface DisplayNameProps {
|
||||
pubkey: HexKey;
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { HexKey } from "@snort/system";
|
||||
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import { parseId } from "SnortUtils";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import AsyncButton from "Element/AsyncButton";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import { parseId } from "@/SnortUtils";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import AsyncButton from "@/Element/AsyncButton";
|
||||
|
||||
import messages from "../messages";
|
||||
import { FollowsFeed } from "Cache";
|
||||
import { FollowsFeed } from "@/Cache";
|
||||
|
||||
export interface FollowButtonProps {
|
||||
pubkey: HexKey;
|
||||
|
@ -3,14 +3,14 @@ import { FormattedMessage } from "react-intl";
|
||||
import { HexKey } from "@snort/system";
|
||||
import { dedupe } from "@snort/shared";
|
||||
|
||||
import useEventPublisher from "Hooks/useEventPublisher";
|
||||
import ProfilePreview from "Element/User/ProfilePreview";
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import useEventPublisher from "@/Hooks/useEventPublisher";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
|
||||
import messages from "../messages";
|
||||
import { FollowsFeed } from "Cache";
|
||||
import { FollowsFeed } from "@/Cache";
|
||||
import AsyncButton from "../AsyncButton";
|
||||
import { setFollows } from "Login";
|
||||
import { setFollows } from "@/Login";
|
||||
|
||||
export interface FollowListBaseProps {
|
||||
pubkeys: HexKey[];
|
||||
|
@ -1,8 +1,8 @@
|
||||
import "./Following.css";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import Icon from "Icons/Icon";
|
||||
import useLogin from "@/Hooks/useLogin";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
export function FollowingMark({ pubkey }: { pubkey: string }) {
|
||||
const { follows } = useLogin(s => ({ follows: s.follows }));
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { HexKey } from "@snort/system";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import { HexKey } from "@snort/system";
|
||||
import MuteButton from "Element/User/MuteButton";
|
||||
import ProfilePreview from "Element/User/ProfilePreview";
|
||||
import useModeration from "Hooks/useModeration";
|
||||
import MuteButton from "@/Element/User/MuteButton";
|
||||
import ProfilePreview from "@/Element/User/ProfilePreview";
|
||||
import useModeration from "@/Hooks/useModeration";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import "./NoteToSelf.css";
|
||||
import classNames from "classnames";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
import messages from "../messages";
|
||||
|
||||
|
@ -6,7 +6,7 @@ import { UserMetadata } from "@snort/system";
|
||||
import FollowButton from "./FollowButton";
|
||||
import ProfileImage from "./ProfileImage";
|
||||
import { UserWebsiteLink } from "./UserWebsiteLink";
|
||||
import Text from "Element/Text";
|
||||
import Text from "@/Element/Text";
|
||||
import { useEffect, useState } from "react";
|
||||
import useLogin from "../../Hooks/useLogin";
|
||||
|
||||
|
@ -6,9 +6,9 @@ import { useUserProfile } from "@snort/system-react";
|
||||
import { useHover } from "@uidotdev/usehooks";
|
||||
import classNames from "classnames";
|
||||
|
||||
import Avatar from "Element/User/Avatar";
|
||||
import Nip05 from "Element/User/Nip05";
|
||||
import Icon from "Icons/Icon";
|
||||
import Avatar from "@/Element/User/Avatar";
|
||||
import Nip05 from "@/Element/User/Nip05";
|
||||
import Icon from "@/Icons/Icon";
|
||||
import DisplayName from "./DisplayName";
|
||||
import { ProfileLink } from "./ProfileLink";
|
||||
import { ProfileCard } from "./ProfileCard";
|
||||
|
@ -2,7 +2,7 @@ import { ReactNode, useContext } from "react";
|
||||
import { Link, LinkProps } from "react-router-dom";
|
||||
import { UserMetadata, NostrLink, NostrPrefix, MetadataCache } from "@snort/system";
|
||||
import { SnortContext } from "@snort/system-react";
|
||||
import { randomSample } from "SnortUtils";
|
||||
import { randomSample } from "@/SnortUtils";
|
||||
|
||||
export function ProfileLink({
|
||||
pubkey,
|
||||
|
@ -4,8 +4,8 @@ import { HexKey, UserMetadata } from "@snort/system";
|
||||
import { useUserProfile } from "@snort/system-react";
|
||||
import { useInView } from "react-intersection-observer";
|
||||
|
||||
import ProfileImage from "Element/User/ProfileImage";
|
||||
import FollowButton from "Element/User/FollowButton";
|
||||
import ProfileImage from "@/Element/User/ProfileImage";
|
||||
import FollowButton from "@/Element/User/FollowButton";
|
||||
|
||||
export interface ProfilePreviewProps {
|
||||
pubkey: HexKey;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import "./UserWebsiteLink.css";
|
||||
import { MetadataCache, UserMetadata } from "@snort/system";
|
||||
import Icon from "Icons/Icon";
|
||||
import Icon from "@/Icons/Icon";
|
||||
|
||||
export function UserWebsiteLink({ user }: { user?: MetadataCache | UserMetadata }) {
|
||||
const website_url =
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user