fix: broken dashboard buttons

This commit is contained in:
kieran 2024-10-10 21:52:03 +01:00
parent 52fe83d815
commit 954665aee7
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941
5 changed files with 7 additions and 12 deletions

View File

@ -32,5 +32,5 @@ export const defaultRelays = {
"wss://nostr.wine": { read: true, write: true },
};
export const DefaultProviderUrl = "https://api.zap.stream/api/nostr/";
//export const DefaultProviderUrl = "http://localhost:5295/api/nostr/";
export const DefaultProviderUrl = "https://api.zap.stream/api/nostr";
//export const DefaultProviderUrl = "http://localhost:5295/api/nostr";

View File

@ -159,7 +159,7 @@ export default function NostrProviderDialog({
}
function streamEndpoints() {
if (!info) return;
if (!info?.endpoints) return;
return (
<>
{info.endpoints.length > 1 && (

View File

@ -3,7 +3,7 @@ import { ExternalStore } from "@snort/shared";
import { NostrStreamProvider } from "./zsz";
import { ManualProvider } from "./manual";
import { OwncastProvider } from "./owncast";
import { DefaultProviderUrl, StreamState } from "@/const";
import { DefaultProviderUrl } from "@/const";
export { NostrStreamProvider } from "./zsz";
@ -47,13 +47,10 @@ export enum StreamProviders {
export interface StreamProviderInfo {
name: string;
summary?: string;
version?: string;
state: StreamState;
viewers?: number;
publishedEvent?: NostrEvent;
streamInfo?: StreamProviderStreamInfo;
balance?: number;
endpoints: Array<StreamProviderEndpoint>;
endpoints?: Array<StreamProviderEndpoint>;
tosAccepted?: boolean;
tosLink?: string;
forwards?: Array<StreamProviderForward>;

View File

@ -13,7 +13,7 @@ export class ManualProvider implements StreamProvider {
info(): Promise<StreamProviderInfo> {
return Promise.resolve({
name: this.name,
} as StreamProviderInfo);
});
}
createConfig() {

View File

@ -31,8 +31,6 @@ export class NostrStreamProvider implements StreamProvider {
return {
type: StreamProviders.NostrType,
name: this.name,
state: StreamState.Planned,
viewers: 0,
balance: rsp.balance,
tosAccepted: rsp.tos?.accepted,
tosLink: rsp.tos?.link,
@ -47,7 +45,7 @@ export class NostrStreamProvider implements StreamProvider {
} as StreamProviderEndpoint;
}),
forwards: rsp.forwards,
} as StreamProviderInfo;
};
}
createConfig() {