diff --git a/src/const.ts b/src/const.ts index baae714..91e17f1 100644 --- a/src/const.ts +++ b/src/const.ts @@ -42,7 +42,7 @@ function loadWhitelist() { const list = import.meta.env.VITE_SINGLE_PUBLISHER as string | undefined; if (list) { return list.split(",").map(a => { - if (a.startsWith('npub')) { + if (a.startsWith("npub")) { return parseNostrLink(a).id; } else { return a; @@ -53,4 +53,4 @@ function loadWhitelist() { return undefined; } -export const WHITELIST: Array | undefined = loadWhitelist(); \ No newline at end of file +export const WHITELIST: Array | undefined = loadWhitelist(); diff --git a/src/element/event-embed.tsx b/src/element/event-embed.tsx index 1e33098..0c5077a 100644 --- a/src/element/event-embed.tsx +++ b/src/element/event-embed.tsx @@ -83,8 +83,10 @@ export function NostrEvent({ ev }: { ev: TaggedNostrEvent }) { export function EventEmbed({ link, ...props }: EventProps & HTMLProps) { const event = useEventFeed(link); if (event) { - return
- -
; + return ( +
+ +
+ ); } } diff --git a/src/element/stream-editor/index.tsx b/src/element/stream-editor/index.tsx index 8a9e102..f453b46 100644 --- a/src/element/stream-editor/index.tsx +++ b/src/element/stream-editor/index.tsx @@ -145,7 +145,7 @@ export function StreamEditor({ ev, onFinish, options }: StreamEditorProps) { } } - const startsTimestamp = Number(start ?? (new Date().getTime() / 1000)); + const startsTimestamp = Number(start ?? new Date().getTime() / 1000); const startsDate = new Date(startsTimestamp * 1000); return ( diff --git a/src/element/stream/live-video-player.tsx b/src/element/stream/live-video-player.tsx index 72b3b67..c40db87 100644 --- a/src/element/stream/live-video-player.tsx +++ b/src/element/stream/live-video-player.tsx @@ -40,7 +40,7 @@ export default function LiveVideoPlayer({ title, stream, status, poster, link, . ); - } else if (stream && stream.toLowerCase().endsWith('.m3u8')) { + } else if (stream && stream.toLowerCase().endsWith(".m3u8")) { // hls video /* @ts-ignore Web Componenet */ return ; diff --git a/src/hooks/live-streams.ts b/src/hooks/live-streams.ts index 2bc90d7..ebe5c7c 100644 --- a/src/hooks/live-streams.ts +++ b/src/hooks/live-streams.ts @@ -12,21 +12,11 @@ export function useStreamsFeed(tag?: string) { }); if (WHITELIST) { if (tag) { - rb.withFilter() - .kinds(liveStreamKinds) - .tag("t", [tag]) - .authors(WHITELIST); - rb.withFilter() - .kinds(liveStreamKinds) - .tag("t", [tag]) - .tag("p", WHITELIST); + rb.withFilter().kinds(liveStreamKinds).tag("t", [tag]).authors(WHITELIST); + rb.withFilter().kinds(liveStreamKinds).tag("t", [tag]).tag("p", WHITELIST); } else { - rb.withFilter() - .kinds(liveStreamKinds) - .authors(WHITELIST); - rb.withFilter() - .kinds(liveStreamKinds) - .tag("p", WHITELIST); + rb.withFilter().kinds(liveStreamKinds).authors(WHITELIST); + rb.withFilter().kinds(liveStreamKinds).tag("p", WHITELIST); } } else { if (tag) { diff --git a/src/lang.json b/src/lang.json index c7a6972..c46f841 100644 --- a/src/lang.json +++ b/src/lang.json @@ -170,9 +170,6 @@ "8YT6ja": { "defaultMessage": "Insert text to speak" }, - "8aAwpp": { - "defaultMessage": "For manual hosting all you need is the HLS URL for the Stream URL field. You should be ale to find this in your hosting setup." - }, "8xVdjn": { "defaultMessage": "Video Codec" }, @@ -236,6 +233,9 @@ "C81/uG": { "defaultMessage": "Logout" }, + "CFReLV": { + "defaultMessage": "For manual hosting all you need is the HLS URL for the Stream URL field. You should be able to find this in your hosting setup." + }, "CTgA2G": { "defaultMessage": "Create a new account if you don't have one already." }, @@ -491,9 +491,6 @@ "QNvtaq": { "defaultMessage": "Share on X" }, - "QRHNuF": { - "defaultMessage": "What are we streaming today?" - }, "QRRCp0": { "defaultMessage": "Stream URL" }, @@ -582,6 +579,9 @@ "W7IRLs": { "defaultMessage": "Your title is too short" }, + "W8nHSd": { + "defaultMessage": "FAQ" + }, "W9355R": { "defaultMessage": "Unmute" }, @@ -733,6 +733,9 @@ "g5pX+a": { "defaultMessage": "About" }, + "gJFhNJ": { + "defaultMessage": "What are we streaming today?" + }, "gQxxlw": { "defaultMessage": "Goal Name" }, @@ -951,9 +954,6 @@ "uksRSi": { "defaultMessage": "Latest Videos" }, - "vP4dFa": { - "defaultMessage": "Visit {link} to get some sweet zap.stream merch!" - }, "vaZKTn": { "defaultMessage": "Add more content" }, diff --git a/src/translations/en.json b/src/translations/en.json index a1d45fa..f19cdd3 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -56,7 +56,6 @@ "7UOvbT": "Offline", "89UZph": "Configure your streaming software", "8YT6ja": "Insert text to speak", - "8aAwpp": "For manual hosting all you need is the HLS URL for the Stream URL field. You should be ale to find this in your hosting setup.", "8xVdjn": "Video Codec", "9WRlF4": "Send", "9ZoFpI": "Delete file", @@ -78,6 +77,7 @@ "Bep/gA": "Private key", "BzQPM+": "Destination", "C81/uG": "Logout", + "CFReLV": "For manual hosting all you need is the HLS URL for the Stream URL field. You should be able to find this in your hosting setup.", "CTgA2G": "Create a new account if you don't have one already.", "CsCUYo": "{n} sats", "CsS/fy": "{estimate} remaining ({balance} sats @ {rate} sats / {unit})", @@ -162,7 +162,6 @@ "Q3au2v": "About {estimate}", "Q8Qw5B": "Description", "QNvtaq": "Share on X", - "QRHNuF": "What are we streaming today?", "QRRCp0": "Stream URL", "QWlMq9": "Stream key", "QceMQZ": "Goal: {amount}", @@ -192,6 +191,7 @@ "VKb1MS": "Categories", "W7DNWx": "Stream Forwarding", "W7IRLs": "Your title is too short", + "W8nHSd": "FAQ", "W9355R": "Unmute", "WVJZ0U": "Value", "WcZM+B": "File List", @@ -241,6 +241,7 @@ "fBI91o": "Zap", "feZ/kG": "Login with Private Key (insecure)", "g5pX+a": "About", + "gJFhNJ": "What are we streaming today?", "gQxxlw": "Goal Name", "gt65Gg": "Stream goals encourage viewers to support streamers via donations.", "gzsn7k": "{n} messages", @@ -313,7 +314,6 @@ "uYw2LD": "Stream", "ug01Mk": "Time", "uksRSi": "Latest Videos", - "vP4dFa": "Visit {link} to get some sweet zap.stream merch!", "vaZKTn": "Add more content", "vrTOHJ": "{amount} sats", "w+2Vw7": "Shorts",