diff --git a/client/public/intro_vid.mp4 b/client/public/intro_vid.mp4 new file mode 100644 index 0000000..3b6ed1f Binary files /dev/null and b/client/public/intro_vid.mp4 differ diff --git a/client/src/components/Home.tsx b/client/src/components/Home.tsx index 54f238f..83c25ba 100644 --- a/client/src/components/Home.tsx +++ b/client/src/components/Home.tsx @@ -5,10 +5,12 @@ import { getPow } from '../utils/mine'; import { Event } from 'nostr-tools'; import { subGlobalFeed } from '../utils/subscriptions'; import { uniqBy } from '../utils/utils'; +import PWAInstallPopup from './Modals/PWACheckModal'; const Home = () => { const [events, setEvents] = useState([]); const [filterDifficulty, setFilterDifficulty] = useState(localStorage.getItem('filterDifficulty') || '20'); + const [inBrowser, setInBrowser] = useState(false) const onEvent = (event: Event) => { setEvents((prevEvents) => [...prevEvents, event]); @@ -23,6 +25,13 @@ const Home = () => { const { difficulty, filterDifficulty } = customEvent.detail; setFilterDifficulty(filterDifficulty); }; + + // if ((window.navigator as any).standalone || window.matchMedia('(display-mode: standalone)').matches) { + // console.log('App is running in standalone mode.'); + // } else { + // console.log('App is running in a browser.'); + // setInBrowser(true) + // } window.addEventListener('difficultyChanged', handleDifficultyChange); @@ -56,6 +65,7 @@ const Home = () => { return (
+ {/* {inBrowser && setInBrowser(false)} />} */}
{filteredAndSortedEvents.map((event, index) => ( diff --git a/client/src/components/Modals/PWACheckModal.tsx b/client/src/components/Modals/PWACheckModal.tsx new file mode 100644 index 0000000..4a70cb3 --- /dev/null +++ b/client/src/components/Modals/PWACheckModal.tsx @@ -0,0 +1,21 @@ +// PWAInstallPopup.tsx +import React, { useState, useEffect } from 'react'; + +interface PWAInstallPopupProps { + onClose: () => void; +} + +const PWAInstallPopup: React.FC = ({ onClose }) => { + + return ( +
+
+

Install Our PWA

+

Click "Install" to add this app to your home screen and enjoy a full-screen experience!

+ +
+
+ ); +}; + +export default PWAInstallPopup; diff --git a/client/src/components/Modals/TextModal.tsx b/client/src/components/Modals/TextModal.tsx index 52444fe..ae378d4 100644 --- a/client/src/components/Modals/TextModal.tsx +++ b/client/src/components/Modals/TextModal.tsx @@ -17,11 +17,11 @@ const ContentPreview = ({ key, comment }: { key: string, comment: string }) => { }; useEffect(() => { - const findUrl = comment.match(/\bhttps?:\/\/\S+/gi); - if (findUrl && findUrl.length > 0) { - setUrl(findUrl[0]) - setFinalComment(finalComment.replace(findUrl[0], '').trim()) - } + // const findUrl = comment.match(/\bhttps?:\/\/\S+/gi); + // if (findUrl && findUrl.length > 0) { + // setUrl(findUrl[0]) + // setFinalComment(finalComment.replace(findUrl[0], '').trim()) + // } const match = comment.match(/\bnostr:([a-z0-9]+)/i); const nostrQuoteID = match && match[1]; diff --git a/client/src/components/Settings.tsx b/client/src/components/Settings.tsx index d43ba54..5690452 100644 --- a/client/src/components/Settings.tsx +++ b/client/src/components/Settings.tsx @@ -20,10 +20,6 @@ const Settings = () => { window.dispatchEvent(event); }; - // useEffect(() => { - // addRelay('wss://powrelay.xyz'); - // }, []); - return (

Settings