diff --git a/src/renderer/src/assets/fonts/icon-fonts/iconfont.css b/src/renderer/src/assets/fonts/icon-fonts/iconfont.css index f9b26b3283..6319f34107 100644 --- a/src/renderer/src/assets/fonts/icon-fonts/iconfont.css +++ b/src/renderer/src/assets/fonts/icon-fonts/iconfont.css @@ -1,6 +1,6 @@ @font-face { font-family: 'iconfont'; /* Project id 4563475 */ - src: url('iconfont.woff2?t=1724204739157') format('woff2'); + src: url('iconfont.woff2?t=1725424338696') format('woff2'); } .iconfont { @@ -11,6 +11,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-inbox:before { + content: '\e869'; +} + .icon-business-smart-assistant:before { content: '\e601'; } diff --git a/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 b/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 index 8f1731e632..ca971eb62f 100644 Binary files a/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 and b/src/renderer/src/assets/fonts/icon-fonts/iconfont.woff2 differ diff --git a/src/renderer/src/i18n/index.ts b/src/renderer/src/i18n/index.ts index ed1d1b7dd0..ba5e207f93 100644 --- a/src/renderer/src/i18n/index.ts +++ b/src/renderer/src/i18n/index.ts @@ -68,6 +68,7 @@ const resources = { 'topics.edit.placeholder': 'Enter new name', 'topics.delete.all.title': 'Delete all topics', 'topics.delete.all.content': 'Are you sure you want to delete all topics?', + 'topics.list': 'Topic List', 'input.new_topic': 'New Topic', 'input.clear': 'Clear', 'input.expand': 'Expand', @@ -312,6 +313,7 @@ const resources = { 'topics.edit.placeholder': '输入新名称', 'topics.delete.all.title': '删除所有话题', 'topics.delete.all.content': '确定要删除所有话题吗?', + 'topics.list': '话题列表', 'input.new_topic': '新话题', 'input.clear': '清除', 'input.expand': '展开', diff --git a/src/renderer/src/pages/home/Assistants.tsx b/src/renderer/src/pages/home/Assistants.tsx index 6798c72803..d791033861 100644 --- a/src/renderer/src/pages/home/Assistants.tsx +++ b/src/renderer/src/pages/home/Assistants.tsx @@ -121,7 +121,7 @@ const Assistants: FC = ({ onClick={() => onSwitchAssistant(assistant)} className={assistant.id === activeAssistant?.id ? 'active' : ''}> {assistant.name || t('chat.default.name')} - + setShowTopics(true)}> @@ -180,9 +180,6 @@ const AssistantItem = styled.div` opacity: 1; color: var(--color-text-2); } - .name { - font-weight: 500; - } } ` @@ -192,6 +189,7 @@ const AssistantName = styled.div` -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; + font-size: 13px; ` const ArrowRightButton = styled.div` diff --git a/src/renderer/src/pages/home/HomePage.tsx b/src/renderer/src/pages/home/HomePage.tsx index c392aacba3..abde425c53 100644 --- a/src/renderer/src/pages/home/HomePage.tsx +++ b/src/renderer/src/pages/home/HomePage.tsx @@ -1,4 +1,4 @@ -import { ArrowLeftOutlined } from '@ant-design/icons' +import { ArrowLeftOutlined, UnorderedListOutlined } from '@ant-design/icons' import { Navbar, NavbarCenter, NavbarLeft } from '@renderer/components/app/Navbar' import { HStack } from '@renderer/components/Layout' import { isMac, isWindows } from '@renderer/config/constant' @@ -64,17 +64,17 @@ const HomePage: FC = () => { {showAssistants && ( - setShowTopics(false)}> - {showTopics && } - {showTopics ? t('common.back') : t('common.chat')} - + setShowTopics(!showTopics)} className="back-button"> + {showTopics ? : } + {showTopics ? t('common.assistant') : t('chat.topics.title')} + )} + style={{ justifyContent: 'space-between', paddingLeft: isMac ? 16 : 8, paddingRight: isWindows ? 135 : 12 }}> {activeAssistant?.name || t('chat.default.name')} @@ -118,45 +118,20 @@ const ContentContainer = styled.div` background-color: var(--color-background); ` -const NavigtaionBack = styled.div` - display: flex; - flex-direction: row; - align-items: center; - justify-content: flex-start; - gap: 10px; - margin-left: ${isMac ? '10px' : 0}; - -webkit-app-region: none; - transition: all 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; - padding: 3px 8px; - border-radius: 6px; - &.back { - cursor: pointer; - &:hover { - background-color: var(--color-background-mute); - color: var(--color-text-1); - } - } -` - -const NavigationBackTitle = styled.div` - font-size: 14px; - font-weight: 800; - font-family: Ubuntu; -` - const AssistantName = styled.span` margin-left: 5px; margin-right: 10px; font-family: Ubuntu; - font-weight: 800; + font-size: 13px; + font-weight: 500; ` export const NewButton = styled.div` -webkit-app-region: none; border-radius: 4px; - width: 30px; + padding: 0 5px; height: 30px; + gap: 5px; display: flex; flex-direction: row; justify-content: center; @@ -173,6 +148,19 @@ export const NewButton = styled.div` .icon-hidesidebarhoriz { font-size: 17px; } + &.back-button { + margin-left: ${isMac ? '8px' : 0}; + .anticon { + font-size: 16px; + } + .anticon-arrow-left { + font-size: 14px; + } + &:hover { + background-color: var(--color-background-mute); + color: var(--color-icon-white); + } + } &:hover { background-color: var(--color-background-mute); cursor: pointer; @@ -180,6 +168,11 @@ export const NewButton = styled.div` } ` +const BackText = styled.span` + font-size: 12px; + font-weight: 400; +` + const ThemeSwitch = styled(Switch)` -webkit-app-region: none; margin-right: 10px; diff --git a/src/renderer/src/pages/home/Topics.tsx b/src/renderer/src/pages/home/Topics.tsx index b48b850e48..217ba219e4 100644 --- a/src/renderer/src/pages/home/Topics.tsx +++ b/src/renderer/src/pages/home/Topics.tsx @@ -109,7 +109,7 @@ const Topics: FC = ({ assistant: _assistant, activeTopic, setActiveTopic )} - {assistant.topics.length > 20 && ( + {assistant.topics.length > 10 && (