mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 05:09:09 +08:00
fix(sidebar): replace 'agents' with 'store' in sidebar (#10989)
refactor(sidebar): replace 'agents' with 'store' in sidebar icons and labels Update sidebar icon mapping and translation keys to use 'store' instead of 'agents' for consistency with the application's terminology. The change includes both the label definitions and the icon component mapping.
This commit is contained in:
parent
250f59234b
commit
9776b4e46c
@ -165,9 +165,21 @@ export const getThemeModeLabel = (key: string): string => {
|
|||||||
return getLabel(themeModeKeyMap, key)
|
return getLabel(themeModeKeyMap, key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const sidebarIconKeyMap = {
|
||||||
|
// assistants: t('assistants.title'),
|
||||||
|
// store: t('assistants.presets.title'),
|
||||||
|
// paintings: t('paintings.title'),
|
||||||
|
// translate: t('translate.title'),
|
||||||
|
// minapp: t('minapp.title'),
|
||||||
|
// knowledge: t('knowledge.title'),
|
||||||
|
// files: t('files.title'),
|
||||||
|
// code_tools: t('code.title'),
|
||||||
|
// notes: t('notes.title')
|
||||||
|
// } as const
|
||||||
|
|
||||||
const sidebarIconKeyMap = {
|
const sidebarIconKeyMap = {
|
||||||
assistants: 'assistants.title',
|
assistants: 'assistants.title',
|
||||||
agents: 'agents.title',
|
store: 'assistants.presets.title',
|
||||||
paintings: 'paintings.title',
|
paintings: 'paintings.title',
|
||||||
translate: 'translate.title',
|
translate: 'translate.title',
|
||||||
minapp: 'minapp.title',
|
minapp: 'minapp.title',
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import {
|
|||||||
Palette,
|
Palette,
|
||||||
Sparkle
|
Sparkle
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import { FC, useCallback, useMemo } from 'react'
|
import { FC, ReactNode, useCallback, useMemo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
|
|
||||||
@ -118,9 +118,10 @@ const SidebarIconsManager: FC<SidebarIconsManagerProps> = ({
|
|||||||
|
|
||||||
// 使用useMemo缓存图标映射
|
// 使用useMemo缓存图标映射
|
||||||
const iconMap = useMemo(
|
const iconMap = useMemo(
|
||||||
() => ({
|
() =>
|
||||||
|
({
|
||||||
assistants: <MessageSquareQuote size={16} />,
|
assistants: <MessageSquareQuote size={16} />,
|
||||||
agents: <Sparkle size={16} />,
|
store: <Sparkle size={16} />,
|
||||||
paintings: <Palette size={16} />,
|
paintings: <Palette size={16} />,
|
||||||
translate: <Languages size={16} />,
|
translate: <Languages size={16} />,
|
||||||
minapp: <LayoutGrid size={16} />,
|
minapp: <LayoutGrid size={16} />,
|
||||||
@ -128,7 +129,7 @@ const SidebarIconsManager: FC<SidebarIconsManagerProps> = ({
|
|||||||
files: <Folder size={16} />,
|
files: <Folder size={16} />,
|
||||||
notes: <NotepadText size={16} />,
|
notes: <NotepadText size={16} />,
|
||||||
code_tools: <Code size={16} />
|
code_tools: <Code size={16} />
|
||||||
}),
|
}) satisfies Record<SidebarIcon, ReactNode>,
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user