feat: 添加Notion文档按钮Tooltip
This commit is contained in:
parent
045708d9b3
commit
6aaa3def0d
@ -567,6 +567,7 @@
|
|||||||
"notion.database_id": "Notion Database ID",
|
"notion.database_id": "Notion Database ID",
|
||||||
"notion.database_id_placeholder": "Enter Notion Database ID",
|
"notion.database_id_placeholder": "Enter Notion Database ID",
|
||||||
"notion.title": "Notion Configuration",
|
"notion.title": "Notion Configuration",
|
||||||
|
"notion.help": "Notion Configuration Documentation",
|
||||||
"notion.check": {
|
"notion.check": {
|
||||||
"button": "Check",
|
"button": "Check",
|
||||||
"fail": "Connection failed, please check network and Api_key and Database_id",
|
"fail": "Connection failed, please check network and Api_key and Database_id",
|
||||||
|
|||||||
@ -567,6 +567,7 @@
|
|||||||
"notion.database_id": "Notion データベースID",
|
"notion.database_id": "Notion データベースID",
|
||||||
"notion.database_id_placeholder": "Notion データベースIDを入力してください",
|
"notion.database_id_placeholder": "Notion データベースIDを入力してください",
|
||||||
"notion.title": "Notion 設定",
|
"notion.title": "Notion 設定",
|
||||||
|
"notion.help": "Notion 設定ドキュメント",
|
||||||
"notion.check": {
|
"notion.check": {
|
||||||
"button": "確認",
|
"button": "確認",
|
||||||
"fail": "接続エラー、ネットワーク設定とApi_keyとDatabase_idを確認してください",
|
"fail": "接続エラー、ネットワーク設定とApi_keyとDatabase_idを確認してください",
|
||||||
|
|||||||
@ -567,6 +567,7 @@
|
|||||||
"notion.database_id": "ID базы данных Notion",
|
"notion.database_id": "ID базы данных Notion",
|
||||||
"notion.database_id_placeholder": "Введите ID базы данных Notion",
|
"notion.database_id_placeholder": "Введите ID базы данных Notion",
|
||||||
"notion.title": "Настройки Notion",
|
"notion.title": "Настройки Notion",
|
||||||
|
"notion.help": "Документация по настройке Notion",
|
||||||
"notion.check": {
|
"notion.check": {
|
||||||
"button": "Проверить",
|
"button": "Проверить",
|
||||||
"fail": "Не удалось подключиться, пожалуйста, проверьте сеть и правильность Api_key и Database_id",
|
"fail": "Не удалось подключиться, пожалуйста, проверьте сеть и правильность Api_key и Database_id",
|
||||||
|
|||||||
@ -567,6 +567,7 @@
|
|||||||
"notion.database_id": "Notion 数据库 ID",
|
"notion.database_id": "Notion 数据库 ID",
|
||||||
"notion.database_id_placeholder": "请输入Notion 数据库 ID",
|
"notion.database_id_placeholder": "请输入Notion 数据库 ID",
|
||||||
"notion.title": "Notion 配置",
|
"notion.title": "Notion 配置",
|
||||||
|
"notion.help" : "Notion 配置文档",
|
||||||
"notion.check": {
|
"notion.check": {
|
||||||
"button": "检查",
|
"button": "检查",
|
||||||
"fail": "连接失败,请检查网络及Api_key和Database_id是否正确",
|
"fail": "连接失败,请检查网络及Api_key和Database_id是否正确",
|
||||||
|
|||||||
@ -565,6 +565,7 @@
|
|||||||
"notion.database_id": "Notion 資料庫 ID",
|
"notion.database_id": "Notion 資料庫 ID",
|
||||||
"notion.database_id_placeholder": "請輸入Notion 資料庫 ID",
|
"notion.database_id_placeholder": "請輸入Notion 資料庫 ID",
|
||||||
"notion.title": "Notion 配置",
|
"notion.title": "Notion 配置",
|
||||||
|
"notion.help": "Notion 配置文檔",
|
||||||
"notion.check": {
|
"notion.check": {
|
||||||
"button": "檢查",
|
"button": "檢查",
|
||||||
"fail": "連接失敗,請檢查網絡及Api_key和Database_id是否正確",
|
"fail": "連接失敗,請檢查網絡及Api_key和Database_id是否正確",
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { backup, reset, restore } from '@renderer/services/BackupService'
|
|||||||
import { RootState, useAppDispatch } from '@renderer/store'
|
import { RootState, useAppDispatch } from '@renderer/store'
|
||||||
import { setNotionApiKey, setNotionDatabaseID } from '@renderer/store/settings'
|
import { setNotionApiKey, setNotionDatabaseID } from '@renderer/store/settings'
|
||||||
import { AppInfo } from '@renderer/types'
|
import { AppInfo } from '@renderer/types'
|
||||||
import { Button, Modal, Typography } from 'antd'
|
import { Button, Modal, Tooltip, Typography } from 'antd'
|
||||||
import Input from 'antd/es/input/Input'
|
import Input from 'antd/es/input/Input'
|
||||||
import { FC, useEffect, useState } from 'react'
|
import { FC, useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@ -73,10 +73,12 @@ const NotionSettings: FC = () => {
|
|||||||
<SettingGroup theme={theme}>
|
<SettingGroup theme={theme}>
|
||||||
<SettingTitle style={{ justifyContent: 'flex-start', gap: 10 }}>
|
<SettingTitle style={{ justifyContent: 'flex-start', gap: 10 }}>
|
||||||
{t('settings.data.notion.title')}
|
{t('settings.data.notion.title')}
|
||||||
|
<Tooltip title={t('settings.data.notion.help')} placement="right">
|
||||||
<InfoCircleOutlined
|
<InfoCircleOutlined
|
||||||
style={{ color: 'var(--color-text-2)', cursor: 'pointer' }}
|
style={{ color: 'var(--color-text-2)', cursor: 'pointer' }}
|
||||||
onClick={handleNotionTitleClick}
|
onClick={handleNotionTitleClick}
|
||||||
/>
|
/>
|
||||||
|
</Tooltip>
|
||||||
</SettingTitle>
|
</SettingTitle>
|
||||||
<SettingDivider />
|
<SettingDivider />
|
||||||
<SettingRow>
|
<SettingRow>
|
||||||
@ -104,9 +106,7 @@ const NotionSettings: FC = () => {
|
|||||||
style={{ width: 250 }}
|
style={{ width: 250 }}
|
||||||
placeholder={t('settings.data.notion.api_key_placeholder')}
|
placeholder={t('settings.data.notion.api_key_placeholder')}
|
||||||
/>
|
/>
|
||||||
<Button onClick={handleNotionConnectionCheck}>
|
<Button onClick={handleNotionConnectionCheck}>{t('settings.data.notion.check.button')}</Button>
|
||||||
{t('settings.data.notion.check.button')}
|
|
||||||
</Button>
|
|
||||||
</HStack>
|
</HStack>
|
||||||
</SettingRow>
|
</SettingRow>
|
||||||
<SettingDivider /> {/* 添加分割线 */}
|
<SettingDivider /> {/* 添加分割线 */}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user