Composer: tint composer

This commit is contained in:
Enrico Ros
2025-05-13 12:29:57 -07:00
parent 02749c290c
commit a796a98cd4
2 changed files with 12 additions and 6 deletions
+4 -3
View File
@@ -34,7 +34,6 @@ import { gcChatImageAssets } from '~/common/stores/chat/chat.gc';
import { getChatLLMId } from '~/common/stores/llms/store-llms';
import { getConversation, getConversationSystemPurposeId, useConversation } from '~/common/stores/chat/store-chats';
import { optimaActions, optimaOpenModels, optimaOpenPreferences } from '~/common/layout/optima/useOptima';
import { themeBgAppChatComposer } from '~/common/app.theme';
import { useFolderStore } from '~/common/stores/folders/store-chat-folders';
import { useIsMobile, useIsTallScreen } from '~/common/components/useMatchMedia';
import { useLLM } from '~/common/stores/llms/llms.hooks';
@@ -99,7 +98,8 @@ const composerOpenSx: SxProps = {
// NOTE: disabled on 2025-03-05: conflicts with the GlobalDragOverlay's
// zIndex: 21, // just to allocate a surface, and potentially have a shadow
minWidth: { md: 480 }, // don't get compresses too much on desktop
backgroundColor: themeBgAppChatComposer,
// backgroundColor: themeBgAppChatComposer, // inlined in the Composer
transition: 'background-color 0.5s ease-out',
borderTop: `1px solid`,
borderTopColor: 'rgba(var(--joy-palette-neutral-mainChannel, 99 107 116) / 0.4)',
// hack: eats the bottom of the last message (as it has a 1px divider)
@@ -109,7 +109,8 @@ const composerOpenSx: SxProps = {
const composerOpenMobileSx: SxProps = {
zIndex: 21, // allocates the surface, possibly enables shadow if we like
backgroundColor: themeBgAppChatComposer,
// backgroundColor: themeBgAppChatComposer, // inlined in the Composer
transition: 'background-color 0.5s ease-out',
borderTop: `1px solid`,
borderTopColor: 'rgba(var(--joy-palette-neutral-mainChannel, 99 107 116) / 0.4)',
pt: 0.5, // have some breathing room
@@ -36,7 +36,7 @@ import { glueForMessageTokens, marshallWrapDocFragments } from '~/common/stores/
import { isValidConversation, useChatStore } from '~/common/stores/chat/store-chats';
import { getModelParameterValueOrThrow } from '~/common/stores/llms/llms.parameters';
import { launchAppCall, removeQueryParam, useRouterQuery } from '~/common/app.routes';
import { lineHeightTextareaMd } from '~/common/app.theme';
import { lineHeightTextareaMd, themeBgAppChatComposer } from '~/common/app.theme';
import { optimaOpenPreferences } from '~/common/layout/optima/useOptima';
import { platformAwareKeystrokes } from '~/common/components/KeyStroke';
import { supportsScreenCapture } from '~/common/util/screenCaptureUtils';
@@ -729,7 +729,12 @@ export function Composer(props: {
}), [dragContainerSx]);
return (
<Box aria-label='New Message' component='section' sx={props.sx}>
<Box
aria-label='New Message'
component='section'
bgcolor={showTint ? `var(--joy-palette-${showTint}-softBg)` : themeBgAppChatComposer}
sx={props.sx}
>
{!isMobile && labsShowShortcutBar && <StatusBarMemo toggleMinimized={handleToggleMinimized} isMinimized={isMinimized} />}
@@ -874,7 +879,7 @@ export function Composer(props: {
}}
sx={{
height: '100%',
backgroundColor: 'background.level1',
backgroundColor: showTint ? undefined : 'background.level1',
'&:focus-within': { backgroundColor: 'background.popup', '.within-composer-focus': { backgroundColor: 'background.popup' } },
lineHeight: lineHeightTextareaMd,
}} />