chore: apply custom css to mobile (#2533)

This commit is contained in:
Eric Zhu 2025-01-14 22:06:32 +08:00 committed by GitHub
parent 5f44d245fd
commit 8ab6835141
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import { MemoedDangerousHTMLStyle } from "@follow/components/common/MemoedDangerousHTMLStyle.js"
import { ScrollElementContext } from "@follow/components/ui/scroll-area/ctx.js"
import { useTitle } from "@follow/hooks"
import type { FeedModel, InboxModel, SupportedLanguages } from "@follow/models/types"
@ -101,6 +102,7 @@ export const EntryContent: Component<{
usePreventOverscrollBounce()
const [scrollElement, setScrollElement] = useState<HTMLElement | null>(null)
const customCSS = useUISettingKey("customCSS")
const showAITranslation = useShowAITranslation()
const translationLanguage = useGeneralSettingSelector(
(s) => s.translationLanguage,
@ -192,6 +194,9 @@ export const EntryContent: Component<{
<AISummary entryId={entry.entries.id} />
<ErrorBoundary fallback={RenderError}>
<ShadowDOM injectHostStyles={!isInbox}>
{!!customCSS && (
<MemoedDangerousHTMLStyle>{customCSS}</MemoedDangerousHTMLStyle>
)}
<EntryContentHTMLRenderer
view={view}
feedId={feed?.id}

View File

@ -304,6 +304,7 @@
"rsshub.table.official": "官方",
"rsshub.table.owner": "所有者",
"rsshub.table.price": "月度价格",
"rsshub.table.private": "私有",
"rsshub.table.unlimited": "无限制",
"rsshub.table.use": "使用",
"rsshub.table.userCount": "用户数量",