From 6982eb4fb4d44105dc8b44e898d452d4e5d32c82 Mon Sep 17 00:00:00 2001 From: xan.lol Date: Wed, 21 Jan 2026 05:51:23 +0000 Subject: [PATCH] fix: add back the code that makes theming good 😭 where did it go? we will never know 🤷 this makes the background and mentions fixed ✅ yay! omg git is so wacky sometimes (or maybe major VS Code merging conflicts skill issue, unsure) --- src/view/shell/index.web.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file(s) changed, 34 insertion(s)(+), 0 deletion(s)(-) diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -37,6 +37,7 @@ import {Composer} from './Composer.web' import {DrawerContent} from './Drawer' function ShellInner() { + const t = useTheme() const navigator = useNavigation() const closeAllActiveElements = useCloseAllActiveElements() const {state: policyUpdateState} = usePolicyUpdateContext() @@ -44,6 +45,39 @@ const welcomeModalControl = useWelcomeModal() useComposerKeyboardShortcut() useIntentHandler() + + useLayoutEffect(() => { + const rootElement = document.documentElement + rootElement.className = `html` + rootElement.style.setProperty( + 'background', + `${t.atoms.bg.backgroundColor}`, + 'important', + ) + }, [t.atoms.bg.backgroundColor, t.name]) + + useLayoutEffect(() => { + const color = t.palette.primary_500 + + const styleId = 'prosemirror-mention-color' + let style = document.getElementById(styleId) as HTMLStyleElement | null + + if (!style) { + style = document.createElement('style') + style.id = styleId + document.head.appendChild(style) + } + + style.innerHTML = ` + .ProseMirror .mention { + color: ${color} !important; + } + .ProseMirror a, + .ProseMirror .autolink { + color: ${color} !important; + } + ` + }, [t.palette.primary_500]) useEffect(() => { const unsubscribe = navigator.addListener('state', () => { -- tangled.sh