{error}
+ ) : topic.type === 'feed' ? ( +
{record.author.displayName} - + @{record.author.handle}
@@ -209,7 +209,7 @@ function Info({children}: {children: ComponentChildren}) { return ({children}
+{children}
+
{toNiceDomain(content.external.uri)}
{content.external.title}
-+
{content.external.description}
{title}
-{subtitle}
++ {subtitle} +
{description}
} + {description && ( ++ {description} +
+ )} ) } @@ -406,7 +412,7 @@ function StarterPackEmbed({ return ( + className="w-full rounded-lg overflow-hidden border dark:border-slate-600 flex flex-col items-stretch">{content.record.name}
-+
Starter pack by{' '} {content.creator.displayName || `@${content.creator.handle}`}
@@ -425,7 +431,7 @@ function StarterPackEmbed({{content.record.description}
)} {!!content.joinedAllTimeCount && content.joinedAllTimeCount > 50 && ( -+
{content.joinedAllTimeCount} users have joined!
)} diff --git a/bskyembed/src/components/post.tsx b/bskyembed/src/components/post.tsx index 4db5eeb45e..26945eb69d 100644 --- a/bskyembed/src/components/post.tsx +++ b/bskyembed/src/components/post.tsx @@ -38,7 +38,7 @@ export function Post({thread}: Props) {@{post.author.handle}
+
{prettyNumber(post.likeCount)}
+
{prettyNumber(post.repostCount)}
Reply
++ Reply +
+
{post.replyCount
? `Read ${prettyNumber(post.replyCount)} ${
post.replyCount > 1 ? 'replies' : 'reply'
diff --git a/bskyembed/src/index.css b/bskyembed/src/index.css
index 22b2b8be5c..289e34cf00 100644
--- a/bskyembed/src/index.css
+++ b/bskyembed/src/index.css
@@ -5,3 +5,7 @@
.break-word {
word-break: break-word;
}
+
+:root {
+ color-scheme: light dark;
+}
diff --git a/bskyembed/src/screens/landing.tsx b/bskyembed/src/screens/landing.tsx
index a9e08cd3f2..a3448e90ac 100644
--- a/bskyembed/src/screens/landing.tsx
+++ b/bskyembed/src/screens/landing.tsx
@@ -6,6 +6,7 @@ import {useEffect, useMemo, useRef, useState} from 'preact/hooks'
import arrowBottom from '../../assets/arrowBottom_stroke2_corner0_rounded.svg'
import logo from '../../assets/logo.svg'
+import {initColorMode} from '../color-mode'
import {Container} from '../components/container'
import {Link} from '../components/link'
import {Post} from '../components/post'
@@ -21,6 +22,8 @@ export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js`
const root = document.getElementById('app')
if (!root) throw new Error('No root element')
+initColorMode()
+
const agent = new BskyAgent({
service: 'https://public.api.bsky.app',
})
@@ -108,7 +111,7 @@ function LandingPage() {
}, [uri])
return (
- {error}
+ ) : topic.type === 'feed' ? (
+
+ }
+ initialNumToRender={initialNumToRender}
+ windowSize={11}
+ />
+ )}
+ >
+ )
+}
diff --git a/src/state/geolocation.tsx b/src/state/geolocation.tsx
index 4d45bb574b..0024cd41dd 100644
--- a/src/state/geolocation.tsx
+++ b/src/state/geolocation.tsx
@@ -3,7 +3,6 @@ import EventEmitter from 'eventemitter3'
import {networkRetry} from '#/lib/async/retry'
import {logger} from '#/logger'
-import {IS_DEV} from '#/env'
import {Device, device} from '#/storage'
const events = new EventEmitter()
@@ -65,7 +64,7 @@ export function beginResolveGeolocation() {
* In dev, IP server is unavailable, so we just set the default geolocation
* and fail closed.
*/
- if (IS_DEV) {
+ if (__DEV__) {
geolocationResolution = new Promise(y => y())
device.set(['geolocation'], DEFAULT_GEOLOCATION)
return
diff --git a/src/state/home-badge.tsx b/src/state/home-badge.tsx
new file mode 100644
index 0000000000..59a9276ce8
--- /dev/null
+++ b/src/state/home-badge.tsx
@@ -0,0 +1,24 @@
+import React from 'react'
+
+type StateContext = boolean
+type ApiContext = (hasNew: boolean) => void
+
+const stateContext = React.createContext