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:
MyPrototypeWhat 2025-06-09 15:27:48 +08:00
parent c6d5faff73
commit 278397f7c8
3 changed files with 9 additions and 4 deletions

View File

@ -43,7 +43,7 @@ export default function DiscoverPage() {
const vercelTabsData = adaptCategoriesForVercelTabs(categories)
return (
<div>
<div className="h-full w-full">
<div className="flex h-full w-full flex-col overflow-hidden">
<Navbar className="h-auto flex-shrink-0">
<NavbarCenter>{t('discover.title')}</NavbarCenter>

View File

@ -1515,13 +1515,18 @@ const migrateConfig = {
},
'112': (state: RootState) => {
try {
const visibleIcons = state.settings.sidebarIcons.visible
if (visibleIcons.includes('discover')) {
return state
}
const filteredIcons = visibleIcons.filter((icon) => icon !== 'agents' && icon !== 'minapp')
return {
...state,
settings: {
...state.settings,
sidebarIcons: {
...state.settings.sidebarIcons,
visible: [...state.settings.sidebarIcons.visible, 'discover']
visible: [...filteredIcons, 'discover']
}
}
}

View File

@ -24,7 +24,7 @@ export type SidebarIcon =
| 'minapp'
| 'knowledge'
| 'files'
| 'store'
| 'discover'
export const DEFAULT_SIDEBAR_ICONS: SidebarIcon[] = [
'assistants',
@ -34,7 +34,7 @@ export const DEFAULT_SIDEBAR_ICONS: SidebarIcon[] = [
'minapp',
'knowledge',
'files',
'store'
'discover'
]
export interface NutstoreSyncRuntime extends WebDAVSyncState {}