mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-28 05:11:24 +08:00
refactor: update styles and improve navbar handling
- Removed unnecessary margin-bottom style from bubble markdown. - Adjusted margin in Prompt component for better layout. - Enhanced useAppInit hook to include navbar position logic for background styling. - Added alignment to ErrorBlock alert for improved visual consistency.
This commit is contained in:
parent
2e31a5bbcb
commit
7fec4c0dac
@ -169,10 +169,6 @@ ul {
|
||||
display: flow-root;
|
||||
}
|
||||
|
||||
.bubble:not(.multi-select-mode) .markdown *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.lucide:not(.lucide-custom) {
|
||||
color: var(--color-icon);
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ import { useEffect } from 'react'
|
||||
import { useDefaultModel } from './useAssistant'
|
||||
import useFullScreenNotice from './useFullScreenNotice'
|
||||
import { useRuntime } from './useRuntime'
|
||||
import { useSettings } from './useSettings'
|
||||
import { useNavbarPosition, useSettings } from './useSettings'
|
||||
import useUpdateHandler from './useUpdateHandler'
|
||||
|
||||
const logger = loggerService.withContext('useAppInit')
|
||||
@ -37,6 +37,7 @@ export function useAppInit() {
|
||||
customCss,
|
||||
enableDataCollection
|
||||
} = useSettings()
|
||||
const { isTopNavbar } = useNavbarPosition()
|
||||
const { minappShow } = useRuntime()
|
||||
const { setDefaultModel, setQuickModel, setTranslateModel } = useDefaultModel()
|
||||
const avatar = useLiveQuery(() => db.settings.get('image://avatar'))
|
||||
@ -102,14 +103,14 @@ export function useAppInit() {
|
||||
useEffect(() => {
|
||||
const transparentWindow = windowStyle === 'transparent' && isMac && !minappShow
|
||||
|
||||
if (minappShow) {
|
||||
if (minappShow && isTopNavbar) {
|
||||
window.root.style.background =
|
||||
windowStyle === 'transparent' && isMac ? 'var(--color-background)' : 'var(--navbar-background)'
|
||||
return
|
||||
}
|
||||
|
||||
window.root.style.background = transparentWindow ? 'var(--navbar-background-mac)' : 'var(--navbar-background)'
|
||||
}, [windowStyle, minappShow, theme])
|
||||
}, [windowStyle, minappShow, theme, isTopNavbar])
|
||||
|
||||
useEffect(() => {
|
||||
if (isLocalAi) {
|
||||
|
||||
@ -266,6 +266,7 @@ const Alert = styled(AntdAlert)`
|
||||
margin: 0.5rem 0 !important;
|
||||
padding: 10px;
|
||||
font-size: 12px;
|
||||
align-items: center;
|
||||
& .ant-alert-close-icon {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ const Container = styled.div<{ $isDark: boolean }>`
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
border: 0.5px solid var(--color-border);
|
||||
margin: 15px 24px;
|
||||
margin: 15px 20px;
|
||||
margin-bottom: 0;
|
||||
`
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user