diff --git a/package.json b/package.json index 475b22bd29..cbfd0244c4 100644 --- a/package.json +++ b/package.json @@ -203,7 +203,7 @@ "lint-staged": "^15.5.0", "lodash": "^4.17.21", "lru-cache": "^11.1.0", - "lucide-react": "^0.487.0", + "lucide-react": "^0.525.0", "macos-release": "^3.4.0", "markdown-it": "^14.1.0", "mermaid": "^11.7.0", diff --git a/src/renderer/src/i18n/index.ts b/src/renderer/src/i18n/index.ts index d2a09b7e95..15306e9848 100644 --- a/src/renderer/src/i18n/index.ts +++ b/src/renderer/src/i18n/index.ts @@ -40,6 +40,7 @@ export const getLanguageCode = () => { i18n.use(initReactI18next).init({ resources, lng: getLanguage(), + fallbackLng: defaultLanguage, interpolation: { escapeValue: false }, diff --git a/src/renderer/src/pages/home/Tabs/TopicsTab.tsx b/src/renderer/src/pages/home/Tabs/TopicsTab.tsx index b8e523c6d8..c9ec6f5c41 100644 --- a/src/renderer/src/pages/home/Tabs/TopicsTab.tsx +++ b/src/renderer/src/pages/home/Tabs/TopicsTab.tsx @@ -442,7 +442,7 @@ const Topics: FC = ({ assistant: _assistant, activeTopic, setActiveTopic, className="topics-tab" list={sortedTopics} onUpdate={updateTopics} - style={{ padding: '13px 0 10px 10px' }} + style={{ height: '100%', padding: '13px 0 10px 10px', display: 'flex', flexDirection: 'column' }} itemContainerStyle={{ paddingBottom: '8px' }} header={ EventEmitter.emit(EVENT_NAMES.ADD_NEW_TOPIC)}> diff --git a/src/renderer/src/pages/home/Tabs/index.tsx b/src/renderer/src/pages/home/Tabs/index.tsx index 5a8c6b67d5..0225d9e08a 100644 --- a/src/renderer/src/pages/home/Tabs/index.tsx +++ b/src/renderer/src/pages/home/Tabs/index.tsx @@ -4,7 +4,7 @@ import { useNavbarPosition, useSettings } from '@renderer/hooks/useSettings' import { useShowTopics } from '@renderer/hooks/useStore' import { EVENT_NAMES, EventEmitter } from '@renderer/services/EventService' import { Assistant, Topic } from '@renderer/types' -import { uuid } from '@renderer/utils' +import { classNames, uuid } from '@renderer/utils' import { FC, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' @@ -99,7 +99,9 @@ const HomeTabs: FC = ({ }, [position, tab, topicPosition, forceToSeeAllTab]) return ( - + {position === 'left' && topicPosition === 'left' && ( setTab('assistants')}> @@ -153,11 +155,17 @@ const Container = styled.div` flex-direction: column; max-width: var(--assistants-width); min-width: var(--assistants-width); + &.right { + height: calc(100vh - var(--navbar-height)); + } [navbar-position='left'] & { background-color: var(--color-background); } [navbar-position='top'] & { - min-height: calc(100vh - var(--navbar-height) - var(--navbar-height) - 12px); + height: calc(100vh - var(--navbar-height) - 12px); + &.right { + height: calc(100vh - var(--navbar-height) - var(--navbar-height) - 12px); + } } overflow: hidden; .collapsed { diff --git a/src/renderer/src/pages/settings/AboutSettings.tsx b/src/renderer/src/pages/settings/AboutSettings.tsx index bf8ab71ce1..be61a9f8b4 100644 --- a/src/renderer/src/pages/settings/AboutSettings.tsx +++ b/src/renderer/src/pages/settings/AboutSettings.tsx @@ -6,6 +6,7 @@ import { useTheme } from '@renderer/context/ThemeProvider' import { useMinappPopup } from '@renderer/hooks/useMinappPopup' import { useRuntime } from '@renderer/hooks/useRuntime' import { useSettings } from '@renderer/hooks/useSettings' +import i18n from '@renderer/i18n' import { useAppDispatch } from '@renderer/store' import { setUpdateState } from '@renderer/store/runtime' import { ThemeMode } from '@renderer/types' @@ -14,6 +15,7 @@ import { UpgradeChannel } from '@shared/config/constant' import { Avatar, Button, Progress, Radio, Row, Switch, Tag, Tooltip } from 'antd' import { debounce } from 'lodash' import { Bug, FileCheck, Github, Globe, Mail, Rss } from 'lucide-react' +import { BadgeQuestionMark } from 'lucide-react' import { FC, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import Markdown from 'react-markdown' @@ -170,6 +172,13 @@ const AboutSettings: FC = () => { setAutoCheckUpdate(autoCheckUpdate) }, [autoCheckUpdate, setAutoCheckUpdate]) + const onOpenDocs = () => { + const isChinese = i18n.language.startsWith('zh') + window.api.openWebsite( + isChinese ? 'https://docs.cherry-ai.com/' : 'https://docs.cherry-ai.com/cherry-studio-wen-dang/en-us' + ) + } + return ( @@ -275,6 +284,14 @@ const AboutSettings: FC = () => { )} + + + + {t('docs.title')} + + + + diff --git a/yarn.lock b/yarn.lock index c507179c7b..ce3d6387b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7255,7 +7255,7 @@ __metadata: lint-staged: "npm:^15.5.0" lodash: "npm:^4.17.21" lru-cache: "npm:^11.1.0" - lucide-react: "npm:^0.487.0" + lucide-react: "npm:^0.525.0" macos-release: "npm:^3.4.0" markdown-it: "npm:^14.1.0" mermaid: "npm:^11.7.0" @@ -13975,12 +13975,12 @@ __metadata: languageName: node linkType: hard -"lucide-react@npm:^0.487.0": - version: 0.487.0 - resolution: "lucide-react@npm:0.487.0" +"lucide-react@npm:^0.525.0": + version: 0.525.0 + resolution: "lucide-react@npm:0.525.0" peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 - checksum: 10c0/7177778c584b8e9545957bef28e95841c4be1b3bf473f9e2e64454c3e183d7ed0bc977c9f7b5446088023c7000151b7a3b27398d4f70025bf343782192f653ca + checksum: 10c0/81c4438e2cf1c86ea2ebe0a97b378201512450894283cccce766a89bc6a4e47c8df1d9115d845d98f582bb0a10be31c454aa232520fea35018dac1cd8466ea9b languageName: node linkType: hard