diff --git a/src/renderer/src/components/MinApp/MinappPopupContainer.tsx b/src/renderer/src/components/MinApp/MinappPopupContainer.tsx index c6bc2ae3..50a10e7f 100644 --- a/src/renderer/src/components/MinApp/MinappPopupContainer.tsx +++ b/src/renderer/src/components/MinApp/MinappPopupContainer.tsx @@ -12,6 +12,7 @@ import { DEFAULT_MIN_APPS } from '@renderer/config/minapps' import { useBridge } from '@renderer/hooks/useBridge' import { useMinappPopup } from '@renderer/hooks/useMinappPopup' import { useMinapps } from '@renderer/hooks/useMinapps' +import useNavBackgroundColor from '@renderer/hooks/useNavBackgroundColor' import { useRuntime } from '@renderer/hooks/useRuntime' import { MinAppType } from '@renderer/types' import { delay } from '@renderer/utils' @@ -38,6 +39,7 @@ const MinappPopupContainer: React.FC = () => { const { closeMinapp, hideMinappPopup } = useMinappPopup() const { pinned, updatePinnedMinapps } = useMinapps() const { t } = useTranslation() + const backgroundColor = useNavBackgroundColor() /** control the drawer open or close */ const [isPopupShow, setIsPopupShow] = useState(true) @@ -236,7 +238,7 @@ const MinappPopupContainer: React.FC = () => { } return ( - + diff --git a/src/renderer/src/hooks/useNavBackgroundColor.ts b/src/renderer/src/hooks/useNavBackgroundColor.ts index 03594499..6c2e94ea 100644 --- a/src/renderer/src/hooks/useNavBackgroundColor.ts +++ b/src/renderer/src/hooks/useNavBackgroundColor.ts @@ -1,20 +1,12 @@ import { isMac } from '@renderer/config/constant' -import { useTheme } from '@renderer/context/ThemeProvider' -import { useRuntime } from './useRuntime' import { useSettings } from './useSettings' function useNavBackgroundColor() { const { windowStyle } = useSettings() - const { theme } = useTheme() - const { minappShow } = useRuntime() const macTransparentWindow = isMac && windowStyle === 'transparent' - if (minappShow) { - return theme === 'dark' ? 'var(--navbar-background)' : 'var(--color-white)' - } - if (macTransparentWindow) { return 'transparent' }