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