chore: formatting

This commit is contained in:
2025-05-02 10:23:21 +01:00
parent 6bd92279dc
commit 37e1a066d1
7 changed files with 25 additions and 33 deletions

View File

@ -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<string> | undefined = loadWhitelist();
export const WHITELIST: Array<string> | undefined = loadWhitelist();

View File

@ -83,8 +83,10 @@ export function NostrEvent({ ev }: { ev: TaggedNostrEvent }) {
export function EventEmbed({ link, ...props }: EventProps & HTMLProps<HTMLDivElement>) {
const event = useEventFeed(link);
if (event) {
return <div className="md:w-[700px] mx-auto w-full">
<NostrEvent ev={event} {...props} />
</div>;
return (
<div className="md:w-[700px] mx-auto w-full">
<NostrEvent ev={event} {...props} />
</div>
);
}
}

View File

@ -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 (

View File

@ -40,7 +40,7 @@ export default function LiveVideoPlayer({ title, stream, status, poster, link, .
<Nip94Player link={link} />
</Suspense>
);
} else if (stream && stream.toLowerCase().endsWith('.m3u8')) {
} else if (stream && stream.toLowerCase().endsWith(".m3u8")) {
// hls video
/* @ts-ignore Web Componenet */
return <hls-video {...props} slot="media" src={stream} playsInline={true} autoPlay={true} />;

View File

@ -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) {

View File

@ -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"
},

View File

@ -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",