refactor: update styling and layout in Message component and NotesSidebar

- Adjusted class names in Message component for better layout management.
- Modified margin in DropHintNode of NotesSidebar for improved spacing.
- Enhanced BackupService to remove 'notes_tree' from indexedDB during data restoration.
This commit is contained in:
kangfenmao 2025-10-08 21:42:36 +08:00
parent 65d066cbef
commit 37f7042f0f
4 changed files with 10 additions and 2 deletions

View File

@ -231,7 +231,7 @@ const MessageItem: FC<Props> = ({
<HorizontalScrollContainer
classNames={{
content: cn(
'items-center',
'flex-1 items-center justify-between',
isLastMessage && messageStyle === 'plain' ? 'flex-row-reverse' : 'flex-row'
)
}}>

View File

@ -386,6 +386,7 @@ const Container = styled.div`
border-radius: var(--list-item-border-radius);
border: 0.5px solid transparent;
width: calc(var(--assistants-width) - 20px);
cursor: pointer;
&:hover {
background-color: var(--color-list-item-hover);

View File

@ -1129,7 +1129,7 @@ const DragOverIndicator = styled.div`
`
const DropHintNode = styled.div`
margin: 8px;
margin: 6px 0;
margin-bottom: 20px;
${TreeNodeContainer} {

View File

@ -89,6 +89,7 @@ export async function restore() {
}
await handleData(data)
notificationService.send({
id: uuid(),
type: 'success',
@ -850,6 +851,12 @@ export async function handleData(data: Record<string, any>) {
if (data.version >= 2) {
localStorage.setItem('persist:cherry-studio', data.localStorage['persist:cherry-studio'])
// remove notes_tree from indexedDB
if (data.indexedDB['notes_tree']) {
delete data.indexedDB['notes_tree']
}
await restoreDatabase(data.indexedDB)
if (data.version === 3) {