chore: formatting

This commit is contained in:
2023-12-04 13:18:35 +00:00
parent 22297aecaa
commit 5780bc38c0
5 changed files with 30 additions and 12 deletions

View File

@ -54,15 +54,25 @@ function NewStream({ ev, onFinish }: Omit<StreamEditorProps, "onFinish"> & { onF
); );
} }
case StreamProviders.NostrType: { case StreamProviders.NostrType: {
return <> return (
<button className="btn btn-secondary" onClick={() => { <>
navigate("/settings"); <button
onFinish?.(); className="btn btn-secondary"
}}> onClick={() => {
<FormattedMessage defaultMessage="Get stream key" id="KdYELp" /> navigate("/settings");
</button> onFinish?.();
<NostrProviderDialog provider={currentProvider} onFinish={onFinish} ev={ev} showEndpoints={false} showEditor={true} /> }}>
</>; <FormattedMessage defaultMessage="Get stream key" id="KdYELp" />
</button>
<NostrProviderDialog
provider={currentProvider}
onFinish={onFinish}
ev={ev}
showEndpoints={false}
showEditor={true}
/>
</>
);
} }
case StreamProviders.Owncast: { case StreamProviders.Owncast: {
return; return;

View File

@ -14,7 +14,7 @@ export function NostrProviderDialog({
showEndpoints, showEndpoints,
showEditor, showEditor,
...others ...others
}: { provider: StreamProvider; showEndpoints: boolean, showEditor: boolean } & StreamEditorProps) { }: { provider: StreamProvider; showEndpoints: boolean; showEditor: 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>();

View File

@ -179,6 +179,9 @@
"K7AkdL": { "K7AkdL": {
"defaultMessage": "Show" "defaultMessage": "Show"
}, },
"KdYELp": {
"defaultMessage": "Get stream key"
},
"KkIL3s": { "KkIL3s": {
"defaultMessage": "No, I am under 18" "defaultMessage": "No, I am under 18"
}, },

View File

@ -11,7 +11,7 @@ import { useStreamProvider } from "@/hooks/stream-provider";
const enum Tab { const enum Tab {
Account, Account,
Notifications Notifications,
} }
export function SettingsPage() { export function SettingsPage() {
@ -57,7 +57,11 @@ export function SettingsPage() {
<h1> <h1>
<FormattedMessage defaultMessage="Stream Key" id="LknBsU" /> <FormattedMessage defaultMessage="Stream Key" id="LknBsU" />
</h1> </h1>
<NostrProviderDialog provider={unwrap(providers.find(a => a.name === "zap.stream"))} showEndpoints={true} showEditor={false} /> <NostrProviderDialog
provider={unwrap(providers.find(a => a.name === "zap.stream"))}
showEndpoints={true}
showEditor={false}
/>
</> </>
); );
} }

View File

@ -59,6 +59,7 @@
"K3r6DQ": "Delete", "K3r6DQ": "Delete",
"K3uH1C": "offline", "K3uH1C": "offline",
"K7AkdL": "Show", "K7AkdL": "Show",
"KdYELp": "Get stream key",
"KkIL3s": "No, I am under 18", "KkIL3s": "No, I am under 18",
"LknBsU": "Stream Key", "LknBsU": "Stream Key",
"My6HwN": "Ok, it's safe", "My6HwN": "Ok, it's safe",