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 }, "wss://nostr.wine": { read: true, write: true },
}; };
export const DefaultProviderUrl = "https://api.zap.stream/api/nostr/"; export const DefaultProviderUrl = "https://api.zap.stream/api/nostr";
//export const DefaultProviderUrl = "http://localhost:5295/api/nostr/"; //export const DefaultProviderUrl = "http://localhost:5295/api/nostr";

View File

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

View File

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

View File

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

View File

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