Service worker precache

Yarn upgrades / cleanup
This commit is contained in:
2023-08-26 22:48:15 +01:00
parent 6fae5accde
commit 5cd1ad070a
26 changed files with 2885 additions and 4336 deletions

View File

@ -1,19 +0,0 @@
import Hls from "hls.js";
import { HTMLProps, useEffect, useRef } from "react";
export function LiveVideoPlayer(props: HTMLProps<HTMLVideoElement> & { stream: string }) {
const video = useRef<HTMLVideoElement>(null);
useEffect(() => {
if (props.stream && video.current && !video.current.src && Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(props.stream);
hls.attachMedia(video.current);
return () => hls.destroy();
}
}, [video, props]);
return (
<div>
<video ref={video} {...props} controls={true} />
</div>
);
}

View File

@ -1,5 +1,5 @@
import { FormattedMessage, useIntl } from "react-intl";
import { HexKey, Lists, NostrPrefix, TaggedRawEvent, encodeTLV } from "@snort/system";
import { HexKey, Lists, NostrPrefix, TaggedNostrEvent, encodeTLV } from "@snort/system";
import { Menu, MenuItem } from "@szhsin/react-menu";
import { useDispatch, useSelector } from "react-redux";
@ -26,7 +26,7 @@ export interface NoteTranslation {
}
interface NosteContextMenuProps {
ev: TaggedRawEvent;
ev: TaggedNostrEvent;
setShowReactions(b: boolean): void;
react(content: string): Promise<void>;
onTranslated?: (t: NoteTranslation) => void;

View File

@ -33,7 +33,7 @@ const UserItem = (metadata: MetadataCache) => {
return (
<div key={pubkey} className="user-item">
<div className="user-picture">
<Avatar user={metadata} />
<Avatar pubkey={pubkey} user={metadata} />
</div>
<div className="user-details">
<strong>{display_name || rest.name}</strong>