forked from Kieran/zap.stream
chore: cleanup
This commit is contained in:
parent
711d9d12b2
commit
5197f433b2
@ -13,6 +13,6 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script src="src/index.tsx" type="module"></script>
|
<script type="module" src="/src/index.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -54,7 +54,7 @@ function NewStream({ ev, onFinish }: StreamEditorProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
case StreamProviders.NostrType: {
|
case StreamProviders.NostrType: {
|
||||||
return <NostrProviderDialog provider={currentProvider} onFinish={onFinish} ev={ev} />;
|
return <NostrProviderDialog provider={currentProvider} onFinish={onFinish} ev={ev} showEndpoints={false} />;
|
||||||
}
|
}
|
||||||
case StreamProviders.Owncast: {
|
case StreamProviders.Owncast: {
|
||||||
return;
|
return;
|
||||||
|
@ -9,7 +9,7 @@ import { StreamEditor, StreamEditorProps } from "./stream-editor";
|
|||||||
import Spinner from "./spinner";
|
import Spinner from "./spinner";
|
||||||
import AsyncButton from "./async-button";
|
import AsyncButton from "./async-button";
|
||||||
|
|
||||||
export function NostrProviderDialog({ provider, ...others }: { provider: StreamProvider } & StreamEditorProps) {
|
export function NostrProviderDialog({ provider, showEndpoints, ...others }: { provider: StreamProvider, showEndpoints: boolean } & StreamEditorProps) {
|
||||||
const system = useContext(SnortContext);
|
const system = useContext(SnortContext);
|
||||||
const [topup, setTopup] = useState(false);
|
const [topup, setTopup] = useState(false);
|
||||||
const [info, setInfo] = useState<StreamProviderInfo>();
|
const [info, setInfo] = useState<StreamProviderInfo>();
|
||||||
@ -117,8 +117,9 @@ export function NostrProviderDialog({ provider, ...others }: { provider: StreamP
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
function streamEndpoints() {
|
||||||
<>
|
if (!info) return;
|
||||||
|
return <>
|
||||||
{info.endpoints.length > 1 && (
|
{info.endpoints.length > 1 && (
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
@ -184,6 +185,11 @@ export function NostrProviderDialog({ provider, ...others }: { provider: StreamP
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{showEndpoints && streamEndpoints()}
|
||||||
{info.tosAccepted === false ? (
|
{info.tosAccepted === false ? (
|
||||||
tosInput()
|
tosInput()
|
||||||
) : (
|
) : (
|
||||||
|
@ -22,11 +22,10 @@ export const AllLocales = [
|
|||||||
"fr-FR",
|
"fr-FR",
|
||||||
"pt-BR",
|
"pt-BR",
|
||||||
"ru-RU",
|
"ru-RU",
|
||||||
] as const;
|
];
|
||||||
|
|
||||||
function importLang(src: any) {
|
function importLang(src: { default: Record<string, { defaultMessage: string }> }) {
|
||||||
const typed = src.default as Record<string, { defaultMessage: string }>;
|
const ent = Object.entries(src.default).map(([k, v]) => [k, v.defaultMessage]);
|
||||||
const ent = Object.entries(typed).map(([k, v]) => [k, v.defaultMessage]);
|
|
||||||
return Object.fromEntries(ent) as Record<string, string>;
|
return Object.fromEntries(ent) as Record<string, string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { bytesToHex } from "@noble/curves/abstract/utils";
|
|||||||
import { schnorr } from "@noble/curves/secp256k1";
|
import { schnorr } from "@noble/curves/secp256k1";
|
||||||
import { ExternalStore, unwrap } from "@snort/shared";
|
import { ExternalStore, unwrap } from "@snort/shared";
|
||||||
import { EventPublisher, Nip7Signer, PrivateKeySigner } from "@snort/system";
|
import { EventPublisher, Nip7Signer, PrivateKeySigner } from "@snort/system";
|
||||||
import type { EmojiPack, Tags } from "types";
|
import type { EmojiPack, Tags } from "@/types";
|
||||||
|
|
||||||
export enum LoginType {
|
export enum LoginType {
|
||||||
Nip7 = "nip7",
|
Nip7 = "nip7",
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"04lmFi": "Save Key",
|
"04lmFi": "Save Key",
|
||||||
"0GfNiL": "Stream Zap Goals",
|
"0GfNiL": "Stream Zap Goals",
|
||||||
"0VV/sK": "Goal",
|
"0VV/sK": "Goal",
|
||||||
|
"0hNxBy": "Starts",
|
||||||
"1EYCdR": "Tags",
|
"1EYCdR": "Tags",
|
||||||
"1qsXCO": "eg. name@wallet.com",
|
"1qsXCO": "eg. name@wallet.com",
|
||||||
"2/2yg+": "Add",
|
"2/2yg+": "Add",
|
||||||
@ -24,10 +25,10 @@
|
|||||||
"5kx+2v": "Server Url",
|
"5kx+2v": "Server Url",
|
||||||
"6Z2pvJ": "Stream Providers",
|
"6Z2pvJ": "Stream Providers",
|
||||||
"6pr6hJ": "Minimum amount for text to speech",
|
"6pr6hJ": "Minimum amount for text to speech",
|
||||||
|
"79lLl+": "Music",
|
||||||
"8YT6ja": "Insert text to speak",
|
"8YT6ja": "Insert text to speak",
|
||||||
"9WRlF4": "Send",
|
"9WRlF4": "Send",
|
||||||
"9a9+ww": "Title",
|
"9a9+ww": "Title",
|
||||||
"9anxhq": "Starts",
|
|
||||||
"AIHaPH": "{person} zapped {amount} sats",
|
"AIHaPH": "{person} zapped {amount} sats",
|
||||||
"Atr2p4": "NSFW Content",
|
"Atr2p4": "NSFW Content",
|
||||||
"AukrPM": "No viewer data available",
|
"AukrPM": "No viewer data available",
|
||||||
@ -35,6 +36,7 @@
|
|||||||
"BGxpTN": "Stream Chat",
|
"BGxpTN": "Stream Chat",
|
||||||
"Bep/gA": "Private key",
|
"Bep/gA": "Private key",
|
||||||
"C81/uG": "Logout",
|
"C81/uG": "Logout",
|
||||||
|
"CsCUYo": "{n} sats",
|
||||||
"D3idYv": "Settings",
|
"D3idYv": "Settings",
|
||||||
"DZKuuP": "Logged in as",
|
"DZKuuP": "Logged in as",
|
||||||
"Dn82AL": "Live",
|
"Dn82AL": "Live",
|
||||||
@ -42,6 +44,7 @@
|
|||||||
"FjDlus": "You can always replace it with your own address later.",
|
"FjDlus": "You can always replace it with your own address later.",
|
||||||
"Fodi9+": "Get paid by viewers",
|
"Fodi9+": "Get paid by viewers",
|
||||||
"G/yZLu": "Remove",
|
"G/yZLu": "Remove",
|
||||||
|
"GGaJMU": "Top Chatters",
|
||||||
"Gq6x9o": "Cover Image",
|
"Gq6x9o": "Cover Image",
|
||||||
"H/bNs9": "Save this and keep it safe! If you lose this key, you won't be able to access your account ever again. Yep, it's that serious!",
|
"H/bNs9": "Save this and keep it safe! If you lose this key, you won't be able to access your account ever again. Yep, it's that serious!",
|
||||||
"H5+NAX": "Balance",
|
"H5+NAX": "Balance",
|
||||||
@ -50,6 +53,7 @@
|
|||||||
"I1kjHI": "Supports {markdown}",
|
"I1kjHI": "Supports {markdown}",
|
||||||
"IJDKz3": "Zap amount in {currency}",
|
"IJDKz3": "Zap amount in {currency}",
|
||||||
"INlWvJ": "OR",
|
"INlWvJ": "OR",
|
||||||
|
"J/+m9y": "Stream Duration {duration} mins",
|
||||||
"JEsxDw": "Uploading...",
|
"JEsxDw": "Uploading...",
|
||||||
"Jq3FDz": "Content",
|
"Jq3FDz": "Content",
|
||||||
"K3r6DQ": "Delete",
|
"K3r6DQ": "Delete",
|
||||||
@ -79,6 +83,7 @@
|
|||||||
"VA/Z1S": "Hide",
|
"VA/Z1S": "Hide",
|
||||||
"W9355R": "Unmute",
|
"W9355R": "Unmute",
|
||||||
"X2PZ7D": "Create Goal",
|
"X2PZ7D": "Create Goal",
|
||||||
|
"XgWvGA": "Reactions",
|
||||||
"YPh5Nq": "@ {rate}",
|
"YPh5Nq": "@ {rate}",
|
||||||
"Z8ZOEY": "This method is insecure. We recommend using a {nostrlink}",
|
"Z8ZOEY": "This method is insecure. We recommend using a {nostrlink}",
|
||||||
"ZmqxZs": "You can change this later",
|
"ZmqxZs": "You can change this later",
|
||||||
@ -93,12 +98,15 @@
|
|||||||
"fBI91o": "Zap",
|
"fBI91o": "Zap",
|
||||||
"fc2iho": "Add File",
|
"fc2iho": "Add File",
|
||||||
"feZ/kG": "Login with Private Key (insecure)",
|
"feZ/kG": "Login with Private Key (insecure)",
|
||||||
|
"gzsn7k": "{n} messages",
|
||||||
"hGQqkW": "Schedule",
|
"hGQqkW": "Schedule",
|
||||||
|
"hMzcSq": "Messages",
|
||||||
"heyxZL": "Enable text to speech",
|
"heyxZL": "Enable text to speech",
|
||||||
"hpl4BP": "Chat Widget",
|
"hpl4BP": "Chat Widget",
|
||||||
"ieGrWo": "Follow",
|
"ieGrWo": "Follow",
|
||||||
"itPgxd": "Profile",
|
"itPgxd": "Profile",
|
||||||
"izWS4J": "Unfollow",
|
"izWS4J": "Unfollow",
|
||||||
|
"jgOqxt": "Widgets",
|
||||||
"jr4+vD": "Markdown",
|
"jr4+vD": "Markdown",
|
||||||
"jvo0vs": "Save",
|
"jvo0vs": "Save",
|
||||||
"k21gTS": "e.g. about me",
|
"k21gTS": "e.g. about me",
|
||||||
|
Loading…
Reference in New Issue
Block a user