Dark: better beam

This commit is contained in:
Enrico Ros
2025-03-20 00:14:15 -07:00
parent d0b84e7ca3
commit b91fbeb978
2 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ export function BeamFusionGrid(props: {
<Box sx={{
...(props.isMobile ? fusionGridMobileSx : fusionGridDesktopSx),
...(isEmpty ? {
backgroundColor: 'neutral.solidBg',
backgroundColor: isDarkMode ? 'neutral.900' : 'neutral.solidBg',
} : {
backgroundColor: isDarkMode ? 'success.900' : '#F2FFFA', // f8fff8 was good, too close to the gree hue
pt: 'var(--Pad)',
@@ -121,7 +121,7 @@ export function BeamFusionGrid(props: {
<BeamCard
className={isEmpty ? beamCardClasses.smashTop : undefined}
sx={{
backgroundColor: props.canGather ? `${GATHER_COLOR}.softBg` : undefined,
backgroundColor: props.canGather ? `${GATHER_COLOR}.softBg` : isDarkMode ? 'neutral.700' : undefined,
// boxShadow: `0px 6px 16px -12px rgb(var(--joy-palette-${props.canGather ? GATHER_COLOR : 'neutral'}-darkChannel) / 40%)`,
mb: 'auto',
}}
@@ -1,7 +1,7 @@
import * as React from 'react';
import type { SxProps } from '@mui/joy/styles/types';
import { Box, Typography } from '@mui/joy';
import { Box, Typography, useTheme } from '@mui/joy';
import { ChatMessageMemo } from '../../../apps/chat/components/message/ChatMessage';
@@ -30,6 +30,12 @@ const userMessageWrapperINVSx: SxProps = {
pt: 0,
};
const userMessageWrapperDarkINVSx: SxProps = {
...userMessageWrapperSx,
backgroundColor: 'neutral.800',
pt: 0,
};
const userChatMessageSx: SxProps = {
border: 'none',
// border: '1px solid',
@@ -58,6 +64,7 @@ export function BeamScatterInput(props: {
// const [showHistoryMessage, setShowHistoryMessage] = React.useState(true);
// external state
const isDarkMode = useTheme().palette.mode === 'dark';
const scatterShowPrevMessages = useModuleBeamStore(state => state.scatterShowPrevMessages);
// derived state
@@ -87,7 +94,7 @@ export function BeamScatterInput(props: {
return null;
return (
<Box sx={BEAM_INVERT_BACKGROUND ? userMessageWrapperINVSx : userMessageWrapperSx}>
<Box sx={!BEAM_INVERT_BACKGROUND ? userMessageWrapperSx : isDarkMode ? userMessageWrapperDarkINVSx : userMessageWrapperINVSx}>
<ChatMessageMemo
message={lastHistoryMessage}
fitScreen={props.isMobile}