mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-29 14:31:35 +08:00
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:
parent
65d066cbef
commit
37f7042f0f
@ -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'
|
||||
)
|
||||
}}>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -1129,7 +1129,7 @@ const DragOverIndicator = styled.div`
|
||||
`
|
||||
|
||||
const DropHintNode = styled.div`
|
||||
margin: 8px;
|
||||
margin: 6px 0;
|
||||
margin-bottom: 20px;
|
||||
|
||||
${TreeNodeContainer} {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user