diff options
author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-12-12 01:31:29 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-11 16:31:29 +0000 |
commit | de15f8e2d3264b9ffb18c3a089612ef604eb87b8 (patch) | |
tree | ae5419e798d55b978596ca7a396fdb395d2cf4fc /bskyembed/src/screens/post.tsx | |
parent | 48c5341644935b103fa81c91b23391f7b7c8a572 (diff) | |
download | voidsky-de15f8e2d3264b9ffb18c3a089612ef604eb87b8.tar.zst |
feat(embed): Add support for dark mode (#6912)
* feat(embed): Support dark mode (wip) * finishing up the implementation * fix tailwind color selector * tweak design * refactor: unify types * fix * fix english grammar * refactor: unify types * tweak design * remove the customization part
Diffstat (limited to 'bskyembed/src/screens/post.tsx')
-rw-r--r-- | bskyembed/src/screens/post.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bskyembed/src/screens/post.tsx b/bskyembed/src/screens/post.tsx index 6ccf10a79..1764442b7 100644 --- a/bskyembed/src/screens/post.tsx +++ b/bskyembed/src/screens/post.tsx @@ -4,6 +4,7 @@ import {AppBskyFeedDefs, AtpAgent} from '@atproto/api' import {h, render} from 'preact' 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 @@ if (!uri) { throw new Error('No uri in path') } +initColorMode() + agent .getPostThread({ uri, @@ -55,13 +58,13 @@ function PwiOptOut({thread}: {thread: AppBskyFeedDefs.ThreadViewPost}) { <img src={logo} className="h-6" /> </Link> <div className="w-full py-12 gap-4 flex flex-col items-center"> - <p className="max-w-80 text-center w-full text-textLight"> + <p className="max-w-80 text-center w-full text-textLight dark:text-textDimmed"> The author of this post has requested their posts not be displayed on external sites. </p> <Link href={href} - className="max-w-80 rounded-lg bg-brand text-white color-white text-center py-1 px-4 w-full mx-auto"> + className="max-w-80 rounded-lg bg-brand text-white text-center py-1 px-4 w-full mx-auto"> View on Bluesky </Link> </div> @@ -77,7 +80,7 @@ function ErrorMessage() { className="transition-transform hover:scale-110 absolute top-4 right-4"> <img src={logo} className="h-6" /> </Link> - <p className="my-16 text-center w-full text-textLight"> + <p className="my-16 text-center w-full text-textLight dark:text-textDimmed"> Post not found, it may have been deleted. </p> </Container> |