mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-01 09:49:03 +08:00
feat: add 'code_tools' to sidebar icons and update related components
This commit is contained in:
parent
973ece9eb9
commit
cffaf99b17
@ -144,7 +144,8 @@ const sidebarIconKeyMap = {
|
||||
translate: 'translate.title',
|
||||
minapp: 'minapp.title',
|
||||
knowledge: 'knowledge.title',
|
||||
files: 'files.title'
|
||||
files: 'files.title',
|
||||
code_tools: 'code.title'
|
||||
} as const
|
||||
|
||||
export const getSidebarIconLabel = (key: string): string => {
|
||||
|
||||
@ -11,7 +11,7 @@ import { getSidebarIconLabel } from '@renderer/i18n/label'
|
||||
import { useAppDispatch } from '@renderer/store'
|
||||
import { setSidebarIcons } from '@renderer/store/settings'
|
||||
import { message } from 'antd'
|
||||
import { FileSearch, Folder, Languages, LayoutGrid, MessageSquareQuote, Palette, Sparkle } from 'lucide-react'
|
||||
import { Code, FileSearch, Folder, Languages, LayoutGrid, MessageSquareQuote, Palette, Sparkle } from 'lucide-react'
|
||||
import { FC, useCallback, useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import styled from 'styled-components'
|
||||
@ -116,7 +116,8 @@ const SidebarIconsManager: FC<SidebarIconsManagerProps> = ({
|
||||
translate: <Languages size={16} />,
|
||||
minapp: <LayoutGrid size={16} />,
|
||||
knowledge: <FileSearch size={16} />,
|
||||
files: <Folder size={15} />
|
||||
files: <Folder size={15} />,
|
||||
code_tools: <Code size={16} />
|
||||
}),
|
||||
[]
|
||||
)
|
||||
@ -206,15 +207,14 @@ const IconColumn = styled.div`
|
||||
`
|
||||
|
||||
const IconList = styled.div`
|
||||
height: 365px;
|
||||
min-height: 365px;
|
||||
height: 400px;
|
||||
min-height: 400px;
|
||||
padding: 10px;
|
||||
background: var(--color-background-soft);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--color-border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: hidden;
|
||||
`
|
||||
|
||||
const IconItem = styled.div`
|
||||
|
||||
@ -40,8 +40,9 @@ const PopupContainer: React.FC<Props> = ({ resolve }) => {
|
||||
afterClose={onClose}
|
||||
transitionName="animation-move-down"
|
||||
width="80vw"
|
||||
footer={null}
|
||||
centered>
|
||||
<SettingContainer theme={theme} style={{ padding: '10px 0' }}>
|
||||
<SettingContainer theme={theme} style={{ padding: '10px 0', background: 'transparent' }}>
|
||||
<TranslatePromptSettings />
|
||||
<SettingGroup theme={theme} style={{ flex: 1 }}>
|
||||
<CustomLanguageSettings />
|
||||
|
||||
@ -38,7 +38,8 @@ export const DEFAULT_SIDEBAR_ICONS: SidebarIcon[] = [
|
||||
'translate',
|
||||
'minapp',
|
||||
'knowledge',
|
||||
'files'
|
||||
'files',
|
||||
'code_tools'
|
||||
]
|
||||
|
||||
export interface NutstoreSyncRuntime extends RemoteSyncState {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user