chore: upgrade pkgs
This commit is contained in:
parent
6e24e0ee85
commit
424af5015a
12
package.json
12
package.json
@ -7,12 +7,12 @@
|
|||||||
"@noble/curves": "^1.4.0",
|
"@noble/curves": "^1.4.0",
|
||||||
"@noble/hashes": "^1.4.0",
|
"@noble/hashes": "^1.4.0",
|
||||||
"@scure/base": "^1.1.6",
|
"@scure/base": "^1.1.6",
|
||||||
"@snort/shared": "^1.0.16",
|
"@snort/shared": "^1.0.17",
|
||||||
"@snort/system": "^1.4.2",
|
"@snort/system": "^1.5.0",
|
||||||
"@snort/system-react": "^1.4.2",
|
"@snort/system-react": "^1.5.0",
|
||||||
"@snort/system-wasm": "^1.0.4",
|
"@snort/system-wasm": "^1.0.5",
|
||||||
"@snort/wallet": "^0.1.7",
|
"@snort/wallet": "^0.1.8",
|
||||||
"@snort/worker-relay": "^1.1.0",
|
"@snort/worker-relay": "^1.3.0",
|
||||||
"@szhsin/react-menu": "^4.1.0",
|
"@szhsin/react-menu": "^4.1.0",
|
||||||
"@types/webscopeio__react-textarea-autocomplete": "^4.7.5",
|
"@types/webscopeio__react-textarea-autocomplete": "^4.7.5",
|
||||||
"@webscopeio/react-textarea-autocomplete": "^4.9.2",
|
"@webscopeio/react-textarea-autocomplete": "^4.9.2",
|
||||||
|
@ -172,7 +172,8 @@ export function StreamEditor({ ev, onFinish, options }: StreamEditorProps) {
|
|||||||
rows={5}
|
rows={5}
|
||||||
placeholder={formatMessage({ defaultMessage: "A description of the stream" })}
|
placeholder={formatMessage({ defaultMessage: "A description of the stream" })}
|
||||||
value={summary}
|
value={summary}
|
||||||
onChange={e => setSummary(e.target.value)} />
|
onChange={e => setSummary(e.target.value)}
|
||||||
|
/>
|
||||||
</StreamInput>
|
</StreamInput>
|
||||||
)}
|
)}
|
||||||
{(options?.canSetImage ?? true) && (
|
{(options?.canSetImage ?? true) && (
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
import { StreamState } from "@/const";
|
import { StreamState } from "@/const";
|
||||||
import { useLogin } from "@/hooks/login";
|
import { useLogin } from "@/hooks/login";
|
||||||
import { formatSats } from "@/number";
|
import { formatSats } from "@/number";
|
||||||
import { getHost, extractStreamInfo, findTag, eventLink } from "@/utils";
|
import { getHost, extractStreamInfo, findTag } from "@/utils";
|
||||||
import { NostrLink, TaggedNostrEvent } from "@snort/system";
|
import { NostrLink, TaggedNostrEvent } from "@snort/system";
|
||||||
import { SnortContext, useUserProfile } from "@snort/system-react";
|
import { SnortContext, useUserProfile } from "@snort/system-react";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { Layer2Button, WarningButton } from "../buttons";
|
import { Layer2Button, WarningButton } from "../buttons";
|
||||||
import { ClipButton } from "./clip-button";
|
|
||||||
import { FollowButton } from "../follow-button";
|
import { FollowButton } from "../follow-button";
|
||||||
import GameInfoCard from "../game-info";
|
import GameInfoCard from "../game-info";
|
||||||
import { NewStreamDialog } from "../new-stream";
|
import { NewStreamDialog } from "../new-stream";
|
||||||
@ -65,7 +64,6 @@ export function StreamInfo({ ev, goal }: { ev?: TaggedNostrEvent; goal?: TaggedN
|
|||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
{ev && (
|
{ev && (
|
||||||
<>
|
<>
|
||||||
<ClipButton ev={ev} />
|
|
||||||
<ShareMenu ev={ev} />
|
<ShareMenu ev={ev} />
|
||||||
{service && <NotificationsButton host={host} service={service} />}
|
{service && <NotificationsButton host={host} service={service} />}
|
||||||
{zapTarget && (
|
{zapTarget && (
|
||||||
|
@ -5,34 +5,44 @@ import { Text } from "../text";
|
|||||||
export function StreamSummary({ text }: { text: string }) {
|
export function StreamSummary({ text }: { text: string }) {
|
||||||
const [expand, setExpand] = useState(false);
|
const [expand, setExpand] = useState(false);
|
||||||
|
|
||||||
const cutOff = Math.min(100, [...text].reduce((acc, v, i) => {
|
const cutOff = Math.min(
|
||||||
if (v === '\n' && acc[0] < 3) {
|
100,
|
||||||
acc[0] += 1;
|
[...text].reduce(
|
||||||
acc[1] = i;
|
(acc, v, i) => {
|
||||||
}
|
if (v === "\n" && acc[0] < 3) {
|
||||||
return acc;
|
acc[0] += 1;
|
||||||
}, [0, 0])[1]);
|
acc[1] = i;
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
},
|
||||||
|
[0, 0],
|
||||||
|
)[1],
|
||||||
|
);
|
||||||
const shouldExpand = text.length > cutOff;
|
const shouldExpand = text.length > cutOff;
|
||||||
return (
|
return (
|
||||||
<div className="whitespace-pre text-pretty">
|
<div className="whitespace-pre text-pretty">
|
||||||
{shouldExpand && !expand ? text.slice(0, cutOff) : <Text content={text} tags={[]} />}
|
{shouldExpand && !expand ? text.slice(0, cutOff) : <Text content={text} tags={[]} />}
|
||||||
{shouldExpand && <>
|
{shouldExpand && (
|
||||||
<span
|
<>
|
||||||
className="text-primary text-bold cursor-pointer"
|
<span
|
||||||
onClick={() => {
|
className="text-primary text-bold cursor-pointer"
|
||||||
setExpand(x => !x);
|
onClick={() => {
|
||||||
}}>
|
setExpand(x => !x);
|
||||||
|
}}>
|
||||||
{!expand && <FormattedMessage defaultMessage="...more" />}
|
|
||||||
</span>
|
{!expand && <FormattedMessage defaultMessage="...more" />}
|
||||||
{expand && <div className="text-primary text-bold cursor-pointer"
|
</span>
|
||||||
onClick={() => {
|
{expand && (
|
||||||
setExpand(x => !x);
|
<div
|
||||||
}}>
|
className="text-primary text-bold cursor-pointer"
|
||||||
<FormattedMessage defaultMessage="Hide" />
|
onClick={() => {
|
||||||
</div>}
|
setExpand(x => !x);
|
||||||
</>
|
}}>
|
||||||
}
|
<FormattedMessage defaultMessage="Hide" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,11 @@ export function useBadges(
|
|||||||
leaveOpen = true,
|
leaveOpen = true,
|
||||||
): { badges: Badge[]; awards: TaggedNostrEvent[] } {
|
): { badges: Badge[]; awards: TaggedNostrEvent[] } {
|
||||||
const rb = useMemo(() => {
|
const rb = useMemo(() => {
|
||||||
if (!pubkey) return null;
|
const rb = new RequestBuilder(`badges:${pubkey}`);
|
||||||
const rb = new RequestBuilder(`badges:${pubkey.slice(0, 12)}`);
|
|
||||||
rb.withOptions({ leaveOpen });
|
rb.withOptions({ leaveOpen });
|
||||||
rb.withFilter().authors([pubkey]).kinds([EventKind.Badge, EventKind.BadgeAward]);
|
if (pubkey) {
|
||||||
|
rb.withFilter().authors([pubkey]).kinds([EventKind.Badge, EventKind.BadgeAward]);
|
||||||
|
}
|
||||||
return rb;
|
return rb;
|
||||||
}, [pubkey, since]);
|
}, [pubkey, since]);
|
||||||
|
|
||||||
@ -35,9 +36,10 @@ export function useBadges(
|
|||||||
}, [badgeEvents]);
|
}, [badgeEvents]);
|
||||||
|
|
||||||
const acceptedSub = useMemo(() => {
|
const acceptedSub = useMemo(() => {
|
||||||
if (rawBadges.length === 0) return null;
|
const rb = new RequestBuilder(`accepted-badges:${pubkey}`);
|
||||||
const rb = new RequestBuilder(`accepted-badges:${pubkey.slice(0, 12)}`);
|
if (rawBadges.length > 0) {
|
||||||
rb.withFilter().kinds([EventKind.ProfileBadges]).tag("d", ["profile_badges"]).tag("a", rawBadges.map(toAddress));
|
rb.withFilter().kinds([EventKind.ProfileBadges]).tag("d", ["profile_badges"]).tag("a", rawBadges.map(toAddress));
|
||||||
|
}
|
||||||
return rb;
|
return rb;
|
||||||
}, [rawBadges]);
|
}, [rawBadges]);
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ export function useUserCards(pubkey: string, userCards: Array<string[]>, leaveOp
|
|||||||
}, [userCards]);
|
}, [userCards]);
|
||||||
|
|
||||||
const subRelated = useMemo(() => {
|
const subRelated = useMemo(() => {
|
||||||
if (!pubkey) return null;
|
|
||||||
const splitted = related.map(t => t[1].split(":"));
|
const splitted = related.map(t => t[1].split(":"));
|
||||||
const authors = splitted
|
const authors = splitted
|
||||||
.map(s => s.at(1))
|
.map(s => s.at(1))
|
||||||
@ -28,7 +27,10 @@ export function useUserCards(pubkey: string, userCards: Array<string[]>, leaveOp
|
|||||||
.map(s => s as string);
|
.map(s => s as string);
|
||||||
|
|
||||||
const rb = new RequestBuilder(`cards:${pubkey}`);
|
const rb = new RequestBuilder(`cards:${pubkey}`);
|
||||||
rb.withOptions({ leaveOpen }).withFilter().kinds([CARD]).authors(authors).tag("d", identifiers);
|
|
||||||
|
if (pubkey) {
|
||||||
|
rb.withOptions({ leaveOpen }).withFilter().kinds([CARD]).authors(authors).tag("d", identifiers);
|
||||||
|
}
|
||||||
|
|
||||||
return rb;
|
return rb;
|
||||||
}, [pubkey, related]);
|
}, [pubkey, related]);
|
||||||
@ -51,14 +53,16 @@ export function useUserCards(pubkey: string, userCards: Array<string[]>, leaveOp
|
|||||||
|
|
||||||
export function useCards(pubkey?: string, leaveOpen = false): TaggedNostrEvent[] {
|
export function useCards(pubkey?: string, leaveOpen = false): TaggedNostrEvent[] {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!pubkey) return null;
|
const b = new RequestBuilder(`user-cards:${pubkey}`);
|
||||||
const b = new RequestBuilder(`user-cards:${pubkey?.slice(0, 12)}`);
|
|
||||||
b.withOptions({
|
if (pubkey) {
|
||||||
leaveOpen,
|
b.withOptions({
|
||||||
})
|
leaveOpen,
|
||||||
.withFilter()
|
})
|
||||||
.authors([pubkey])
|
.withFilter()
|
||||||
.kinds([USER_CARDS]);
|
.authors([pubkey])
|
||||||
|
.kinds([USER_CARDS]);
|
||||||
|
}
|
||||||
return b;
|
return b;
|
||||||
}, [pubkey, leaveOpen]);
|
}, [pubkey, leaveOpen]);
|
||||||
|
|
||||||
@ -73,7 +77,6 @@ export function useCards(pubkey?: string, leaveOpen = false): TaggedNostrEvent[]
|
|||||||
}, [userCards]);
|
}, [userCards]);
|
||||||
|
|
||||||
const subRelated = useMemo(() => {
|
const subRelated = useMemo(() => {
|
||||||
if (!pubkey) return null;
|
|
||||||
const splitted = related.map(t => t[1].split(":"));
|
const splitted = related.map(t => t[1].split(":"));
|
||||||
const authors = splitted
|
const authors = splitted
|
||||||
.map(s => s.at(1))
|
.map(s => s.at(1))
|
||||||
@ -85,7 +88,10 @@ export function useCards(pubkey?: string, leaveOpen = false): TaggedNostrEvent[]
|
|||||||
.map(s => s as string);
|
.map(s => s as string);
|
||||||
|
|
||||||
const rb = new RequestBuilder(`cards:${pubkey}`);
|
const rb = new RequestBuilder(`cards:${pubkey}`);
|
||||||
rb.withOptions({ leaveOpen }).withFilter().kinds([CARD]).authors(authors).tag("d", identifiers);
|
|
||||||
|
if (pubkey) {
|
||||||
|
rb.withOptions({ leaveOpen }).withFilter().kinds([CARD]).authors(authors).tag("d", identifiers);
|
||||||
|
}
|
||||||
|
|
||||||
return rb;
|
return rb;
|
||||||
}, [pubkey, related]);
|
}, [pubkey, related]);
|
||||||
|
@ -12,8 +12,8 @@ export function useCategoryZaps(gameId: string) {
|
|||||||
const rb = new RequestBuilder(`cat-zaps:zaps:${gameId}`);
|
const rb = new RequestBuilder(`cat-zaps:zaps:${gameId}`);
|
||||||
if (links.length > 0) {
|
if (links.length > 0) {
|
||||||
rb.withFilter().kinds([EventKind.ZapReceipt]).replyToLink(links);
|
rb.withFilter().kinds([EventKind.ZapReceipt]).replyToLink(links);
|
||||||
return rb;
|
|
||||||
}
|
}
|
||||||
|
return rb;
|
||||||
}, [links]);
|
}, [links]);
|
||||||
const zapEvents = useRequestBuilder(rbZaps);
|
const zapEvents = useRequestBuilder(rbZaps);
|
||||||
|
|
||||||
|
@ -5,9 +5,11 @@ import { useMemo } from "react";
|
|||||||
|
|
||||||
export function useProfileClips(link?: NostrLink, limit?: number) {
|
export function useProfileClips(link?: NostrLink, limit?: number) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!link) return;
|
const rb = new RequestBuilder(`clips:${link?.id}`);
|
||||||
const rb = new RequestBuilder(`clips:${link.id.slice(0, 12)}`);
|
|
||||||
rb.withFilter().kinds([LIVE_STREAM_CLIP]).tag("p", [link.id]).limit(limit);
|
if (link) {
|
||||||
|
rb.withFilter().kinds([LIVE_STREAM_CLIP]).tag("p", [link.id]).limit(limit);
|
||||||
|
}
|
||||||
return rb;
|
return rb;
|
||||||
}, [link]);
|
}, [link]);
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ export function useUserEmojiPacks(pubkey?: string, userEmoji?: Tags) {
|
|||||||
}, [userEmoji]);
|
}, [userEmoji]);
|
||||||
|
|
||||||
const subRelated = useMemo(() => {
|
const subRelated = useMemo(() => {
|
||||||
if (!pubkey) return null;
|
|
||||||
const splitted = related.map(t => t[1].split(":"));
|
const splitted = related.map(t => t[1].split(":"));
|
||||||
const authors = splitted
|
const authors = splitted
|
||||||
.map(s => s.at(1))
|
.map(s => s.at(1))
|
||||||
@ -47,9 +46,10 @@ export function useUserEmojiPacks(pubkey?: string, userEmoji?: Tags) {
|
|||||||
|
|
||||||
const rb = new RequestBuilder(`emoji-related:${pubkey}`);
|
const rb = new RequestBuilder(`emoji-related:${pubkey}`);
|
||||||
|
|
||||||
rb.withFilter().kinds([EventKind.EmojiSet]).authors(authors).tag("d", identifiers);
|
if (pubkey) {
|
||||||
|
rb.withFilter().kinds([EventKind.EmojiSet]).authors(authors).tag("d", identifiers);
|
||||||
rb.withFilter().kinds([EventKind.EmojiSet]).authors([pubkey]);
|
rb.withFilter().kinds([EventKind.EmojiSet]).authors([pubkey]);
|
||||||
|
}
|
||||||
|
|
||||||
return rb;
|
return rb;
|
||||||
}, [pubkey, related]);
|
}, [pubkey, related]);
|
||||||
@ -70,10 +70,11 @@ export function useUserEmojiPacks(pubkey?: string, userEmoji?: Tags) {
|
|||||||
|
|
||||||
export default function useEmoji(pubkey?: string) {
|
export default function useEmoji(pubkey?: string) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!pubkey) return null;
|
|
||||||
const rb = new RequestBuilder(`emoji:${pubkey}`);
|
const rb = new RequestBuilder(`emoji:${pubkey}`);
|
||||||
rb.withFilter().authors([pubkey]).kinds([EventKind.EmojisList]);
|
|
||||||
|
|
||||||
|
if (pubkey) {
|
||||||
|
rb.withFilter().authors([pubkey]).kinds([EventKind.EmojisList]);
|
||||||
|
}
|
||||||
return rb;
|
return rb;
|
||||||
}, [pubkey]);
|
}, [pubkey]);
|
||||||
|
|
||||||
|
@ -5,9 +5,10 @@ import { GOAL } from "@/const";
|
|||||||
|
|
||||||
export function useZapGoal(id?: string) {
|
export function useZapGoal(id?: string) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!id) return null;
|
const b = new RequestBuilder(`goal:${id}`);
|
||||||
const b = new RequestBuilder(`goal:${id.slice(0, 12)}`);
|
if (id) {
|
||||||
b.withFilter().kinds([GOAL]).ids([id]);
|
b.withFilter().kinds([GOAL]).ids([id]);
|
||||||
|
}
|
||||||
return b;
|
return b;
|
||||||
}, [id]);
|
}, [id]);
|
||||||
|
|
||||||
@ -17,10 +18,12 @@ export function useZapGoal(id?: string) {
|
|||||||
|
|
||||||
export function useGoals(pubkey?: string, leaveOpen?: boolean, limit?: number) {
|
export function useGoals(pubkey?: string, leaveOpen?: boolean, limit?: number) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!pubkey) return null;
|
const b = new RequestBuilder(`goals:${pubkey}`);
|
||||||
const b = new RequestBuilder(`goals:${pubkey.slice(0, 12)}`);
|
|
||||||
b.withOptions({ leaveOpen });
|
b.withOptions({ leaveOpen });
|
||||||
b.withFilter().kinds([GOAL]).authors([pubkey]).limit(limit);
|
|
||||||
|
if (pubkey) {
|
||||||
|
b.withFilter().kinds([GOAL]).authors([pubkey]).limit(limit);
|
||||||
|
}
|
||||||
return b;
|
return b;
|
||||||
}, [pubkey, leaveOpen, limit]);
|
}, [pubkey, leaveOpen, limit]);
|
||||||
|
|
||||||
|
@ -5,10 +5,12 @@ import { useRequestBuilder } from "@snort/system-react";
|
|||||||
|
|
||||||
export function useMutedPubkeys(host?: string, leaveOpen = false) {
|
export function useMutedPubkeys(host?: string, leaveOpen = false) {
|
||||||
const mutedSub = useMemo(() => {
|
const mutedSub = useMemo(() => {
|
||||||
if (!host) return null;
|
|
||||||
const rb = new RequestBuilder(`muted:${host}`);
|
const rb = new RequestBuilder(`muted:${host}`);
|
||||||
rb.withOptions({ leaveOpen });
|
rb.withOptions({ leaveOpen });
|
||||||
rb.withFilter().kinds([EventKind.MuteList]).authors([host]);
|
|
||||||
|
if (host) {
|
||||||
|
rb.withFilter().kinds([EventKind.MuteList]).authors([host]);
|
||||||
|
}
|
||||||
return rb;
|
return rb;
|
||||||
}, [host]);
|
}, [host]);
|
||||||
|
|
||||||
|
@ -6,17 +6,18 @@ import { useZaps } from "./zaps";
|
|||||||
|
|
||||||
export function useProfile(link?: NostrLink, leaveOpen = false) {
|
export function useProfile(link?: NostrLink, leaveOpen = false) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!link) return;
|
const b = new RequestBuilder(`profile:${link?.id}`);
|
||||||
const b = new RequestBuilder(`profile:${link.id.slice(0, 12)}`);
|
|
||||||
b.withOptions({
|
|
||||||
leaveOpen,
|
|
||||||
})
|
|
||||||
.withFilter()
|
|
||||||
.kinds([LIVE_STREAM])
|
|
||||||
.authors([link.id]);
|
|
||||||
|
|
||||||
b.withFilter().kinds([LIVE_STREAM]).tag("p", [link.id]);
|
if (link) {
|
||||||
|
b.withOptions({
|
||||||
|
leaveOpen,
|
||||||
|
})
|
||||||
|
.withFilter()
|
||||||
|
.kinds([LIVE_STREAM])
|
||||||
|
.authors([link.id]);
|
||||||
|
|
||||||
|
b.withFilter().kinds([LIVE_STREAM]).tag("p", [link.id]);
|
||||||
|
}
|
||||||
return b;
|
return b;
|
||||||
}, [link, leaveOpen]);
|
}, [link, leaveOpen]);
|
||||||
|
|
||||||
|
@ -7,13 +7,15 @@ type StatusTag = "general" | "music";
|
|||||||
|
|
||||||
export function useStatus(tag: StatusTag, author?: string, leaveOpen = true) {
|
export function useStatus(tag: StatusTag, author?: string, leaveOpen = true) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!author) return null;
|
const b = new RequestBuilder(`status:${tag}:${author}`);
|
||||||
const b = new RequestBuilder(`status:${tag}:${author.slice(0, 8)}`);
|
|
||||||
b.withOptions({ leaveOpen });
|
b.withOptions({ leaveOpen });
|
||||||
b.withFilter()
|
|
||||||
.kinds([30315 as EventKind])
|
if (author) {
|
||||||
.tag("d", [tag])
|
b.withFilter()
|
||||||
.authors([author]);
|
.kinds([30315 as EventKind])
|
||||||
|
.tag("d", [tag])
|
||||||
|
.authors([author]);
|
||||||
|
}
|
||||||
return b;
|
return b;
|
||||||
}, [author]);
|
}, [author]);
|
||||||
|
|
||||||
|
@ -4,13 +4,12 @@ import { useRequestBuilder } from "@snort/system-react";
|
|||||||
|
|
||||||
export function useZaps(link?: NostrLink, leaveOpen = false) {
|
export function useZaps(link?: NostrLink, leaveOpen = false) {
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
|
const b = new RequestBuilder(`zaps:${link?.id}`);
|
||||||
if (link) {
|
if (link) {
|
||||||
const b = new RequestBuilder(`zaps:${link.id}`);
|
|
||||||
b.withOptions({ leaveOpen });
|
b.withOptions({ leaveOpen });
|
||||||
b.withFilter().kinds([EventKind.ZapReceipt]).replyToLink([link]);
|
b.withFilter().kinds([EventKind.ZapReceipt]).replyToLink([link]);
|
||||||
return b;
|
|
||||||
}
|
}
|
||||||
return null;
|
return b;
|
||||||
}, [link, leaveOpen]);
|
}, [link, leaveOpen]);
|
||||||
|
|
||||||
const zaps = useRequestBuilder(sub);
|
const zaps = useRequestBuilder(sub);
|
||||||
|
@ -25,7 +25,6 @@ const DashboardPage = lazy(() => import("./pages/dashboard"));
|
|||||||
import { syncClock } from "./time-sync";
|
import { syncClock } from "./time-sync";
|
||||||
import SettingsPage from "./pages/settings";
|
import SettingsPage from "./pages/settings";
|
||||||
import AccountSettingsTab from "./pages/settings/account";
|
import AccountSettingsTab from "./pages/settings/account";
|
||||||
import { StreamSettingsTab } from "./pages/settings/stream";
|
|
||||||
import SearchPage from "./pages/search";
|
import SearchPage from "./pages/search";
|
||||||
import ProfileSettings from "./pages/settings/profile";
|
import ProfileSettings from "./pages/settings/profile";
|
||||||
import CategoryPage from "./pages/category";
|
import CategoryPage from "./pages/category";
|
||||||
@ -50,7 +49,6 @@ const workerRelay = new WorkerRelayInterface(
|
|||||||
);
|
);
|
||||||
const System = new NostrSystem({
|
const System = new NostrSystem({
|
||||||
optimizer: hasWasm ? WasmOptimizer : undefined,
|
optimizer: hasWasm ? WasmOptimizer : undefined,
|
||||||
automaticOutboxModel: false,
|
|
||||||
cachingRelay: workerRelay,
|
cachingRelay: workerRelay,
|
||||||
});
|
});
|
||||||
System.on("event", (_, ev) => {
|
System.on("event", (_, ev) => {
|
||||||
@ -74,7 +72,6 @@ async function doInit() {
|
|||||||
databasePath: "relay.db",
|
databasePath: "relay.db",
|
||||||
insertBatchSize: 100,
|
insertBatchSize: 100,
|
||||||
});
|
});
|
||||||
await workerRelay.debug("*");
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
@ -200,6 +200,9 @@
|
|||||||
"ALdW69": {
|
"ALdW69": {
|
||||||
"defaultMessage": "Note by {name}"
|
"defaultMessage": "Note by {name}"
|
||||||
},
|
},
|
||||||
|
"ASKb16": {
|
||||||
|
"defaultMessage": "A description of the stream"
|
||||||
|
},
|
||||||
"AYIR/J": {
|
"AYIR/J": {
|
||||||
"defaultMessage": "Remove Image"
|
"defaultMessage": "Remove Image"
|
||||||
},
|
},
|
||||||
@ -823,9 +826,6 @@
|
|||||||
"msjwph": {
|
"msjwph": {
|
||||||
"defaultMessage": "Keyframe Interval"
|
"defaultMessage": "Keyframe Interval"
|
||||||
},
|
},
|
||||||
"mtNGwh": {
|
|
||||||
"defaultMessage": "A short description of the content"
|
|
||||||
},
|
|
||||||
"n19IQE": {
|
"n19IQE": {
|
||||||
"defaultMessage": "Recommended size: 1920x1080 (16:9)"
|
"defaultMessage": "Recommended size: 1920x1080 (16:9)"
|
||||||
},
|
},
|
||||||
|
@ -148,6 +148,7 @@ export function DashboardForLink({ link }: { link: NostrLink }) {
|
|||||||
<DashboardRaidButton link={streamLink} />
|
<DashboardRaidButton link={streamLink} />
|
||||||
<NewStreamDialog ev={streamEvent} text={<FormattedMessage defaultMessage="Edit Stream Info" />} />
|
<NewStreamDialog ev={streamEvent} text={<FormattedMessage defaultMessage="Edit Stream Info" />} />
|
||||||
<DashboardSettingsButton ev={streamEvent} />
|
<DashboardSettingsButton ev={streamEvent} />
|
||||||
|
<BalanceHistoryModal provider={provider} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -16,12 +16,10 @@ export default function SearchPage() {
|
|||||||
const [search, setSearch] = useState(term ?? "");
|
const [search, setSearch] = useState(term ?? "");
|
||||||
|
|
||||||
const sub = useMemo(() => {
|
const sub = useMemo(() => {
|
||||||
if (!term) return;
|
|
||||||
const rb = new RequestBuilder(`search:${term}`);
|
const rb = new RequestBuilder(`search:${term}`);
|
||||||
rb.withOptions({
|
if (term) {
|
||||||
skipDiff: true,
|
rb.withFilter().relay(SearchRelays).kinds([EventKind.LiveEvent, VIDEO_KIND]).search(term).limit(50);
|
||||||
});
|
}
|
||||||
rb.withFilter().relay(SearchRelays).kinds([EventKind.LiveEvent, VIDEO_KIND]).search(term).limit(50);
|
|
||||||
return rb;
|
return rb;
|
||||||
}, [term]);
|
}, [term]);
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
"A1zT+z": "Search results: {term}",
|
"A1zT+z": "Search results: {term}",
|
||||||
"A7K3S+": "Account Setup",
|
"A7K3S+": "Account Setup",
|
||||||
"ALdW69": "Note by {name}",
|
"ALdW69": "Note by {name}",
|
||||||
|
"ASKb16": "A description of the stream",
|
||||||
"AYIR/J": "Remove Image",
|
"AYIR/J": "Remove Image",
|
||||||
"Atr2p4": "NSFW Content",
|
"Atr2p4": "NSFW Content",
|
||||||
"AukrPM": "No viewer data available",
|
"AukrPM": "No viewer data available",
|
||||||
@ -271,7 +272,6 @@
|
|||||||
"mnJYBQ": "Voice",
|
"mnJYBQ": "Voice",
|
||||||
"mrwfXX": "Shares",
|
"mrwfXX": "Shares",
|
||||||
"msjwph": "Keyframe Interval",
|
"msjwph": "Keyframe Interval",
|
||||||
"mtNGwh": "A short description of the content",
|
|
||||||
"n19IQE": "Recommended size: 1920x1080 (16:9)",
|
"n19IQE": "Recommended size: 1920x1080 (16:9)",
|
||||||
"n8k1SG": "{n}MiB",
|
"n8k1SG": "{n}MiB",
|
||||||
"nBCvvJ": "Topup",
|
"nBCvvJ": "Topup",
|
||||||
|
109
yarn.lock
109
yarn.lock
@ -2232,6 +2232,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@noble/ciphers@npm:^0.6.0":
|
||||||
|
version: 0.6.0
|
||||||
|
resolution: "@noble/ciphers@npm:0.6.0"
|
||||||
|
checksum: 10c0/840900243306dbf4caad942d518dc215bbe83e4daf6385d9294e76ea39b0834ba21591271cf2dd5cc5e64f96f98cdb967065b75e804b0b338b10ed50415ea64e
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0":
|
"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0":
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
resolution: "@noble/curves@npm:1.1.0"
|
resolution: "@noble/curves@npm:1.1.0"
|
||||||
@ -2630,9 +2637,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@snort/shared@npm:^1.0.16":
|
"@snort/shared@npm:^1.0.17":
|
||||||
version: 1.0.16
|
version: 1.0.17
|
||||||
resolution: "@snort/shared@npm:1.0.16"
|
resolution: "@snort/shared@npm:1.0.17"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@noble/curves": "npm:^1.4.0"
|
"@noble/curves": "npm:^1.4.0"
|
||||||
"@noble/hashes": "npm:^1.4.0"
|
"@noble/hashes": "npm:^1.4.0"
|
||||||
@ -2640,37 +2647,38 @@ __metadata:
|
|||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
eventemitter3: "npm:^5.0.1"
|
eventemitter3: "npm:^5.0.1"
|
||||||
light-bolt11-decoder: "npm:^3.0.0"
|
light-bolt11-decoder: "npm:^3.0.0"
|
||||||
checksum: 10c0/024d890ffce73095f886baef40e160657bc12062c20b21a73421b776655c4f46eb241b606b5ea2813b1083001f87e4d01d641af7423050b770443011be9e6611
|
checksum: 10c0/446fc9e2e599898377d8811f544d5343210a44fdf9a4bfd5d9c280218781ac256278238a7ae9b0ac23739a2c1461be362996ecc429aa59ff0fcc72e00d11131d
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@snort/system-react@npm:^1.4.2":
|
"@snort/system-react@npm:^1.5.0":
|
||||||
version: 1.4.2
|
version: 1.5.0
|
||||||
resolution: "@snort/system-react@npm:1.4.2"
|
resolution: "@snort/system-react@npm:1.5.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@snort/shared": "npm:^1.0.16"
|
"@snort/shared": "npm:^1.0.17"
|
||||||
"@snort/system": "npm:^1.4.2"
|
"@snort/system": "npm:^1.5.0"
|
||||||
react: "npm:^18.2.0"
|
react: "npm:^18.2.0"
|
||||||
checksum: 10c0/e39e88cae30ec1d2ced09da8e3434269ea990e4de74a70d5f8c468a8cd4ed73462f38d702f61c148a2ca44420f05d66368e2a5b9dc5f7f88abaf309cb2da0c71
|
checksum: 10c0/3846058d9186531b13e803c34b3716221cf3c7af4c1efc9f3d82ce869ae26639a85361d024496987c3a1d4d1f32dfd38549a257c7076ea308a2f3b8b37d48da2
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@snort/system-wasm@npm:^1.0.4":
|
"@snort/system-wasm@npm:^1.0.5":
|
||||||
version: 1.0.4
|
version: 1.0.5
|
||||||
resolution: "@snort/system-wasm@npm:1.0.4"
|
resolution: "@snort/system-wasm@npm:1.0.5"
|
||||||
checksum: 10c0/d6721c68f8c4123c1ad7a7ea4a842010388a388ec48db39cb6583c2e869e0596db8f022680066875c89daa57f297e801731a4bc262434407e93e14bb73e378bf
|
checksum: 10c0/c043264ed4d198a77cb01a6036b73e949b092be536f028071cda5f08fca0eb6cb511148c864f436c4953ee15609f71e544c9b97cd1e7da63cbec1e9c4550cd29
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@snort/system@npm:^1.4.1":
|
"@snort/system@npm:^1.5.0":
|
||||||
version: 1.4.1
|
version: 1.5.0
|
||||||
resolution: "@snort/system@npm:1.4.1"
|
resolution: "@snort/system@npm:1.5.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
"@noble/ciphers": "npm:^0.6.0"
|
||||||
"@noble/curves": "npm:^1.4.0"
|
"@noble/curves": "npm:^1.4.0"
|
||||||
"@noble/hashes": "npm:^1.4.0"
|
"@noble/hashes": "npm:^1.4.0"
|
||||||
"@nostr-dev-kit/ndk": "npm:^2.8.2"
|
"@nostr-dev-kit/ndk": "npm:^2.8.2"
|
||||||
"@scure/base": "npm:^1.1.6"
|
"@scure/base": "npm:^1.1.6"
|
||||||
"@snort/shared": "npm:^1.0.16"
|
"@snort/shared": "npm:^1.0.17"
|
||||||
"@stablelib/xchacha20": "npm:^1.0.1"
|
"@stablelib/xchacha20": "npm:^1.0.1"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
eventemitter3: "npm:^5.0.1"
|
eventemitter3: "npm:^5.0.1"
|
||||||
@ -2679,63 +2687,42 @@ __metadata:
|
|||||||
lru-cache: "npm:^10.2.0"
|
lru-cache: "npm:^10.2.0"
|
||||||
uuid: "npm:^9.0.0"
|
uuid: "npm:^9.0.0"
|
||||||
ws: "npm:^8.14.0"
|
ws: "npm:^8.14.0"
|
||||||
checksum: 10c0/458aab52c3e2a42c4b8bcf003846e647c60e4308b87139a9cea11ee8c777a1320dde60f21722e7720737a229a2a19a11b3e3c5ab04d9e764e44fa41f310c81fd
|
checksum: 10c0/bd6528b36e6ca9e387bd97c085e4c074896932b7672aabbd7019d5f8b88dd18c78c5335fdde5d95f97beab40da9742343c353e693edf1a36d62fbd6ccacf7671
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@snort/system@npm:^1.4.2":
|
"@snort/wallet@npm:^0.1.8":
|
||||||
version: 1.4.2
|
version: 0.1.8
|
||||||
resolution: "@snort/system@npm:1.4.2"
|
resolution: "@snort/wallet@npm:0.1.8"
|
||||||
dependencies:
|
|
||||||
"@noble/curves": "npm:^1.4.0"
|
|
||||||
"@noble/hashes": "npm:^1.4.0"
|
|
||||||
"@nostr-dev-kit/ndk": "npm:^2.8.2"
|
|
||||||
"@scure/base": "npm:^1.1.6"
|
|
||||||
"@snort/shared": "npm:^1.0.16"
|
|
||||||
"@stablelib/xchacha20": "npm:^1.0.1"
|
|
||||||
debug: "npm:^4.3.4"
|
|
||||||
eventemitter3: "npm:^5.0.1"
|
|
||||||
isomorphic-ws: "npm:^5.0.0"
|
|
||||||
lokijs: "npm:^1.5.12"
|
|
||||||
lru-cache: "npm:^10.2.0"
|
|
||||||
uuid: "npm:^9.0.0"
|
|
||||||
ws: "npm:^8.14.0"
|
|
||||||
checksum: 10c0/7da08a01fd0f1029117a3a74abba4fbbb8ddf9310cb7eb1b0fec832d481bb149134b2c3cd167df9dc375fb3dfa076721e2362c76f889b03dff11adf8fbd7bd20
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"@snort/wallet@npm:^0.1.7":
|
|
||||||
version: 0.1.7
|
|
||||||
resolution: "@snort/wallet@npm:0.1.7"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cashu/cashu-ts": "npm:^1.0.0-rc.3"
|
"@cashu/cashu-ts": "npm:^1.0.0-rc.3"
|
||||||
"@lightninglabs/lnc-web": "npm:^0.3.1-alpha"
|
"@lightninglabs/lnc-web": "npm:^0.3.1-alpha"
|
||||||
"@scure/base": "npm:^1.1.6"
|
"@scure/base": "npm:^1.1.6"
|
||||||
"@snort/shared": "npm:^1.0.16"
|
"@snort/shared": "npm:^1.0.17"
|
||||||
"@snort/system": "npm:^1.4.1"
|
"@snort/system": "npm:^1.5.0"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
eventemitter3: "npm:^5.0.1"
|
eventemitter3: "npm:^5.0.1"
|
||||||
checksum: 10c0/5063b1f17337d498d0e466b8e3ec083d2e313df383d882b7900e04187126f07710566c74fdddcf90455f32f2d832cfbfa0a1a3f9c33cd09b7fb9913826b15cda
|
checksum: 10c0/e655d406f548d78c56d8443edece5b9b79031664911fa23601fb286b7dfceb30b6d52c93456843cef89f3a1bd2898848b5c18ede1a1ee7a67289ba84b85322db
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@snort/worker-relay@npm:^1.1.0":
|
"@snort/worker-relay@npm:^1.3.0":
|
||||||
version: 1.1.0
|
version: 1.3.0
|
||||||
resolution: "@snort/worker-relay@npm:1.1.0"
|
resolution: "@snort/worker-relay@npm:1.3.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@sqlite.org/sqlite-wasm": "npm:^3.45.3-build3"
|
"@sqlite.org/sqlite-wasm": "npm:^3.46.1-build3"
|
||||||
eventemitter3: "npm:^5.0.1"
|
eventemitter3: "npm:^5.0.1"
|
||||||
uuid: "npm:^9.0.1"
|
uuid: "npm:^9.0.1"
|
||||||
checksum: 10c0/db301eb3f3d2cedd629e6fb469849ece0aa9029e1a8074802b2cc5346cc4cac2c12758257b3430eb9b030e94c86d49b1a484b84c95ad8291e173ae6d4a518295
|
checksum: 10c0/1a0eb175f50787bbcaa585641bf710347b59f3d3426cbf0f83182a5574bf7a63beb3e5d66bb41506e2d50c3ee904d55670c85c7f1542018936dd5a4ce06726e8
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@sqlite.org/sqlite-wasm@npm:^3.45.3-build3":
|
"@sqlite.org/sqlite-wasm@npm:^3.46.1-build3":
|
||||||
version: 3.45.3-build3
|
version: 3.46.1-build3
|
||||||
resolution: "@sqlite.org/sqlite-wasm@npm:3.45.3-build3"
|
resolution: "@sqlite.org/sqlite-wasm@npm:3.46.1-build3"
|
||||||
bin:
|
bin:
|
||||||
sqlite-wasm: bin/index.js
|
sqlite-wasm: bin/index.js
|
||||||
checksum: 10c0/363f777b8ed71369d6cdc5363e17c31aff6427827863af278049756ac1b81f94d145c4afd79c9e8ec03765c7aba10b5af83a1aa892c0b312cea9a2fc819d9d38
|
checksum: 10c0/bb8da7ed5c716470c8c3c82ec348914baf8f8ce763881311acfbb40e93f5548afee07d7e312a6d3988fee9aa5d001c14a5e064aabf81803e16482c270cbfd542
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -7616,12 +7603,12 @@ __metadata:
|
|||||||
"@noble/curves": "npm:^1.4.0"
|
"@noble/curves": "npm:^1.4.0"
|
||||||
"@noble/hashes": "npm:^1.4.0"
|
"@noble/hashes": "npm:^1.4.0"
|
||||||
"@scure/base": "npm:^1.1.6"
|
"@scure/base": "npm:^1.1.6"
|
||||||
"@snort/shared": "npm:^1.0.16"
|
"@snort/shared": "npm:^1.0.17"
|
||||||
"@snort/system": "npm:^1.4.2"
|
"@snort/system": "npm:^1.5.0"
|
||||||
"@snort/system-react": "npm:^1.4.2"
|
"@snort/system-react": "npm:^1.5.0"
|
||||||
"@snort/system-wasm": "npm:^1.0.4"
|
"@snort/system-wasm": "npm:^1.0.5"
|
||||||
"@snort/wallet": "npm:^0.1.7"
|
"@snort/wallet": "npm:^0.1.8"
|
||||||
"@snort/worker-relay": "npm:^1.1.0"
|
"@snort/worker-relay": "npm:^1.3.0"
|
||||||
"@szhsin/react-menu": "npm:^4.1.0"
|
"@szhsin/react-menu": "npm:^4.1.0"
|
||||||
"@testing-library/dom": "npm:^9.3.1"
|
"@testing-library/dom": "npm:^9.3.1"
|
||||||
"@types/node": "npm:^20.12.12"
|
"@types/node": "npm:^20.12.12"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user