mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 06:49:02 +08:00
fix: update sidebar icons and enhance DiscoverPage layout
- Updated DiscoverPage to include full height and width styling for better layout. - Modified sidebar icon visibility logic in migration to ensure 'discover' is added correctly while filtering out specific icons. - Changed default sidebar icons to replace 'store' with 'discover' for consistency.
This commit is contained in:
parent
c6d5faff73
commit
278397f7c8
@ -43,7 +43,7 @@ export default function DiscoverPage() {
|
|||||||
const vercelTabsData = adaptCategoriesForVercelTabs(categories)
|
const vercelTabsData = adaptCategoriesForVercelTabs(categories)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="h-full w-full">
|
||||||
<div className="flex h-full w-full flex-col overflow-hidden">
|
<div className="flex h-full w-full flex-col overflow-hidden">
|
||||||
<Navbar className="h-auto flex-shrink-0">
|
<Navbar className="h-auto flex-shrink-0">
|
||||||
<NavbarCenter>{t('discover.title')}</NavbarCenter>
|
<NavbarCenter>{t('discover.title')}</NavbarCenter>
|
||||||
|
|||||||
@ -1515,13 +1515,18 @@ const migrateConfig = {
|
|||||||
},
|
},
|
||||||
'112': (state: RootState) => {
|
'112': (state: RootState) => {
|
||||||
try {
|
try {
|
||||||
|
const visibleIcons = state.settings.sidebarIcons.visible
|
||||||
|
if (visibleIcons.includes('discover')) {
|
||||||
|
return state
|
||||||
|
}
|
||||||
|
const filteredIcons = visibleIcons.filter((icon) => icon !== 'agents' && icon !== 'minapp')
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
settings: {
|
settings: {
|
||||||
...state.settings,
|
...state.settings,
|
||||||
sidebarIcons: {
|
sidebarIcons: {
|
||||||
...state.settings.sidebarIcons,
|
...state.settings.sidebarIcons,
|
||||||
visible: [...state.settings.sidebarIcons.visible, 'discover']
|
visible: [...filteredIcons, 'discover']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ export type SidebarIcon =
|
|||||||
| 'minapp'
|
| 'minapp'
|
||||||
| 'knowledge'
|
| 'knowledge'
|
||||||
| 'files'
|
| 'files'
|
||||||
| 'store'
|
| 'discover'
|
||||||
|
|
||||||
export const DEFAULT_SIDEBAR_ICONS: SidebarIcon[] = [
|
export const DEFAULT_SIDEBAR_ICONS: SidebarIcon[] = [
|
||||||
'assistants',
|
'assistants',
|
||||||
@ -34,7 +34,7 @@ export const DEFAULT_SIDEBAR_ICONS: SidebarIcon[] = [
|
|||||||
'minapp',
|
'minapp',
|
||||||
'knowledge',
|
'knowledge',
|
||||||
'files',
|
'files',
|
||||||
'store'
|
'discover'
|
||||||
]
|
]
|
||||||
|
|
||||||
export interface NutstoreSyncRuntime extends WebDAVSyncState {}
|
export interface NutstoreSyncRuntime extends WebDAVSyncState {}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user