Upgrades:

- Profile Editor
- Categories
- FAQ
- Search
This commit is contained in:
2024-03-05 12:19:47 +00:00
parent 2e43b4ef8b
commit 5b718c5dcf
51 changed files with 1199 additions and 6591 deletions

View File

@ -24,13 +24,6 @@ export function findTag(e: NostrEvent | undefined, tag: string) {
return maybeTag && maybeTag[1];
}
export function splitByUrl(str: string) {
const urlRegex =
/((?:http|ftp|https|nostr|web\+nostr|magnet):\/?\/?(?:[\w+?.\w+])+(?:[a-zA-Z0-9~!@#$%^&*()_\-=+\\/?.:;',]*)?(?:[-A-Za-z0-9+&@#/%=~()_|]))/i;
return str.split(urlRegex);
}
export function eventLink(ev: NostrEvent | TaggedNostrEvent) {
return NostrLink.fromEvent(ev).encode();
}
@ -83,6 +76,11 @@ export function getPlaceholder(id: string) {
return `https://robohash.v0l.io/${id}.png`;
}
export function debounce(time: number, fn: () => void): () => void {
const t = setTimeout(fn, time);
return () => clearTimeout(t);
}
interface StreamInfo {
id?: string;
title?: string;