feat: add navbar poptip
This commit is contained in:
parent
fa32cd13cf
commit
e656db779e
@ -481,6 +481,11 @@
|
|||||||
"websearch": "WebSearch",
|
"websearch": "WebSearch",
|
||||||
"edit": "Edit Model"
|
"edit": "Edit Model"
|
||||||
},
|
},
|
||||||
|
"navbar": {
|
||||||
|
"expand": "Expand Dialog",
|
||||||
|
"show_sidebar": "Show Sidebar",
|
||||||
|
"hide_sidebar": "Hide Sidebar"
|
||||||
|
},
|
||||||
"ollama": {
|
"ollama": {
|
||||||
"keep_alive_time.description": "The time in minutes to keep the connection alive, default is 5 minutes.",
|
"keep_alive_time.description": "The time in minutes to keep the connection alive, default is 5 minutes.",
|
||||||
"keep_alive_time.placeholder": "Minutes",
|
"keep_alive_time.placeholder": "Minutes",
|
||||||
|
|||||||
@ -481,6 +481,11 @@
|
|||||||
"websearch": "ウェブ検索",
|
"websearch": "ウェブ検索",
|
||||||
"edit": "モデルを編集"
|
"edit": "モデルを編集"
|
||||||
},
|
},
|
||||||
|
"navbar": {
|
||||||
|
"expand": "ダイアログを展開",
|
||||||
|
"show_sidebar": "サイドバーを表示",
|
||||||
|
"hide_sidebar": "サイドバーを非表示"
|
||||||
|
},
|
||||||
"ollama": {
|
"ollama": {
|
||||||
"keep_alive_time.description": "モデルがメモリに保持される時間(デフォルト:5分)",
|
"keep_alive_time.description": "モデルがメモリに保持される時間(デフォルト:5分)",
|
||||||
"keep_alive_time.placeholder": "分",
|
"keep_alive_time.placeholder": "分",
|
||||||
|
|||||||
@ -481,6 +481,11 @@
|
|||||||
"websearch": "Веб-поисковые",
|
"websearch": "Веб-поисковые",
|
||||||
"edit": "Редактировать модель"
|
"edit": "Редактировать модель"
|
||||||
},
|
},
|
||||||
|
"navbar": {
|
||||||
|
"expand": "Развернуть диалоговое окно",
|
||||||
|
"show_sidebar": "Показать боковую панель",
|
||||||
|
"hide_sidebar": "Скрыть боковую панель"
|
||||||
|
},
|
||||||
"ollama": {
|
"ollama": {
|
||||||
"keep_alive_time.description": "Время в минутах, в течение которого модель остается активной, по умолчанию 5 минут.",
|
"keep_alive_time.description": "Время в минутах, в течение которого модель остается активной, по умолчанию 5 минут.",
|
||||||
"keep_alive_time.placeholder": "Минуты",
|
"keep_alive_time.placeholder": "Минуты",
|
||||||
|
|||||||
@ -481,6 +481,11 @@
|
|||||||
"websearch": "联网",
|
"websearch": "联网",
|
||||||
"edit": "编辑模型"
|
"edit": "编辑模型"
|
||||||
},
|
},
|
||||||
|
"navbar": {
|
||||||
|
"expand": "伸缩对话框",
|
||||||
|
"show_sidebar": "显示侧边栏",
|
||||||
|
"hide_sidebar": "隐藏侧边栏"
|
||||||
|
},
|
||||||
"ollama": {
|
"ollama": {
|
||||||
"keep_alive_time.description": "对话后模型在内存中保持的时间(默认:5分钟)",
|
"keep_alive_time.description": "对话后模型在内存中保持的时间(默认:5分钟)",
|
||||||
"keep_alive_time.placeholder": "分钟",
|
"keep_alive_time.placeholder": "分钟",
|
||||||
|
|||||||
@ -481,6 +481,11 @@
|
|||||||
"websearch": "網路搜索",
|
"websearch": "網路搜索",
|
||||||
"edit": "編輯模型"
|
"edit": "編輯模型"
|
||||||
},
|
},
|
||||||
|
"navbar": {
|
||||||
|
"expand": "伸縮對話框",
|
||||||
|
"show_sidebar": "顯示側邊欄",
|
||||||
|
"hide_sidebar": "隱藏側邊欄"
|
||||||
|
},
|
||||||
"ollama": {
|
"ollama": {
|
||||||
"keep_alive_time.description": "對話後模型在記憶體中保持的時間(預設為 5 分鐘)。",
|
"keep_alive_time.description": "對話後模型在記憶體中保持的時間(預設為 5 分鐘)。",
|
||||||
"keep_alive_time.placeholder": "分鐘",
|
"keep_alive_time.placeholder": "分鐘",
|
||||||
|
|||||||
@ -14,6 +14,8 @@ import { EVENT_NAMES, EventEmitter } from '@renderer/services/EventService'
|
|||||||
import { useAppDispatch } from '@renderer/store'
|
import { useAppDispatch } from '@renderer/store'
|
||||||
import { setNarrowMode } from '@renderer/store/settings'
|
import { setNarrowMode } from '@renderer/store/settings'
|
||||||
import { Assistant, Topic } from '@renderer/types'
|
import { Assistant, Topic } from '@renderer/types'
|
||||||
|
import { Tooltip } from 'antd'
|
||||||
|
import { t } from 'i18next'
|
||||||
import { FC } from 'react'
|
import { FC } from 'react'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
|
|
||||||
@ -58,12 +60,16 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant }) => {
|
|||||||
<Navbar className="home-navbar">
|
<Navbar className="home-navbar">
|
||||||
{showAssistants && (
|
{showAssistants && (
|
||||||
<NavbarLeft style={{ justifyContent: 'space-between', borderRight: 'none', padding: 0 }}>
|
<NavbarLeft style={{ justifyContent: 'space-between', borderRight: 'none', padding: 0 }}>
|
||||||
<NavbarIcon onClick={toggleShowAssistants} style={{ marginLeft: isMac ? 16 : 0 }}>
|
<Tooltip title={t('navbar.hide_sidebar')} mouseEnterDelay={0.8}>
|
||||||
<i className="iconfont icon-hide-sidebar" />
|
<NavbarIcon onClick={toggleShowAssistants} style={{ marginLeft: isMac ? 16 : 0 }}>
|
||||||
</NavbarIcon>
|
<i className="iconfont icon-hide-sidebar" />
|
||||||
<NavbarIcon onClick={() => EventEmitter.emit(EVENT_NAMES.ADD_NEW_TOPIC)}>
|
</NavbarIcon>
|
||||||
<FormOutlined />
|
</Tooltip>
|
||||||
</NavbarIcon>
|
<Tooltip title={t('settings.shortcuts.new_topic')} mouseEnterDelay={0.8}>
|
||||||
|
<NavbarIcon onClick={() => EventEmitter.emit(EVENT_NAMES.ADD_NEW_TOPIC)}>
|
||||||
|
<FormOutlined />
|
||||||
|
</NavbarIcon>
|
||||||
|
</Tooltip>
|
||||||
</NavbarLeft>
|
</NavbarLeft>
|
||||||
)}
|
)}
|
||||||
<NavbarRight
|
<NavbarRight
|
||||||
@ -71,9 +77,13 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant }) => {
|
|||||||
className="home-navbar-right">
|
className="home-navbar-right">
|
||||||
<HStack alignItems="center">
|
<HStack alignItems="center">
|
||||||
{!showAssistants && (
|
{!showAssistants && (
|
||||||
<NavbarIcon onClick={() => toggleShowAssistants()} style={{ marginRight: 8, marginLeft: isMac ? 4 : -12 }}>
|
<Tooltip title={t('navbar.show_sidebar')} mouseEnterDelay={0.8}>
|
||||||
<i className="iconfont icon-show-sidebar" />
|
<NavbarIcon
|
||||||
</NavbarIcon>
|
onClick={() => toggleShowAssistants()}
|
||||||
|
style={{ marginRight: 8, marginLeft: isMac ? 4 : -12 }}>
|
||||||
|
<i className="iconfont icon-show-sidebar" />
|
||||||
|
</NavbarIcon>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
<TitleText
|
<TitleText
|
||||||
style={{ marginRight: 10, cursor: 'pointer' }}
|
style={{ marginRight: 10, cursor: 'pointer' }}
|
||||||
@ -85,17 +95,23 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant }) => {
|
|||||||
</HStack>
|
</HStack>
|
||||||
<HStack alignItems="center" gap={8}>
|
<HStack alignItems="center" gap={8}>
|
||||||
<UpdateAppButton />
|
<UpdateAppButton />
|
||||||
<NarrowIcon onClick={() => SearchPopup.show()}>
|
<Tooltip title={t('chat.assistant.search.placeholder')} mouseEnterDelay={0.8}>
|
||||||
<SearchOutlined />
|
<NarrowIcon onClick={() => SearchPopup.show()}>
|
||||||
</NarrowIcon>
|
<SearchOutlined />
|
||||||
<NarrowIcon onClick={handleNarrowModeToggle}>
|
</NarrowIcon>
|
||||||
<i className="iconfont icon-icon-adaptive-width"></i>
|
</Tooltip>
|
||||||
</NarrowIcon>
|
<Tooltip title={t('navbar.expand')} mouseEnterDelay={0.8}>
|
||||||
|
<NarrowIcon onClick={handleNarrowModeToggle}>
|
||||||
|
<i className="iconfont icon-icon-adaptive-width"></i>
|
||||||
|
</NarrowIcon>
|
||||||
|
</Tooltip>
|
||||||
{sidebarIcons.visible.includes('minapp') && (
|
{sidebarIcons.visible.includes('minapp') && (
|
||||||
<MinAppsPopover>
|
<MinAppsPopover>
|
||||||
<NarrowIcon>
|
<Tooltip title={t('minapp.title')} mouseEnterDelay={0.8}>
|
||||||
<i className="iconfont icon-appstore" />
|
<NarrowIcon>
|
||||||
</NarrowIcon>
|
<i className="iconfont icon-appstore" />
|
||||||
|
</NarrowIcon>
|
||||||
|
</Tooltip>
|
||||||
</MinAppsPopover>
|
</MinAppsPopover>
|
||||||
)}
|
)}
|
||||||
{topicPosition === 'right' && (
|
{topicPosition === 'right' && (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user