diff --git a/src/renderer/src/components/MinApp/index.tsx b/src/renderer/src/components/MinApp/index.tsx index 3cb67076d7..03d49a62cc 100644 --- a/src/renderer/src/components/MinApp/index.tsx +++ b/src/renderer/src/components/MinApp/index.tsx @@ -1,6 +1,7 @@ /* eslint-disable react/no-unknown-property */ import { CloseOutlined, ExportOutlined, PushpinOutlined, ReloadOutlined } from '@ant-design/icons' import { isMac, isWindows } from '@renderer/config/constant' +import { AppLogo } from '@renderer/config/env' import { DEFAULT_MIN_APPS } from '@renderer/config/minapps' import { useBridge } from '@renderer/hooks/useBridge' import { useMinapps } from '@renderer/hooks/useMinapps' @@ -239,6 +240,10 @@ export default class MinApp { await delay(0) } + if (!app.logo) { + app.logo = AppLogo + } + MinApp.app = app store.dispatch(setMinappShow(true)) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 5aabfc9221..e0cc9e9924 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -560,7 +560,9 @@ }, "data.title": "Data Directory", "notion.api_key": "Notion API Key", + "notion.api_key_placeholder": "Enter Notion API Key", "notion.database_id": "Notion Database ID", + "notion.database_id_placeholder": "Enter Notion Database ID", "notion.title": "Notion Configuration", "notion.check": { "button": "Check", diff --git a/src/renderer/src/i18n/locales/ja-jp.json b/src/renderer/src/i18n/locales/ja-jp.json index 25774cc60b..9bf277902c 100644 --- a/src/renderer/src/i18n/locales/ja-jp.json +++ b/src/renderer/src/i18n/locales/ja-jp.json @@ -560,7 +560,9 @@ }, "data.title": "データディレクトリ", "notion.api_key": "Notion APIキー", + "notion.api_key_placeholder": "Notion APIキーを入力してください", "notion.database_id": "Notion データベースID", + "notion.database_id_placeholder": "Notion データベースIDを入力してください", "notion.title": "Notion 設定", "notion.check": { "button": "確認", diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json index 79ea0c77fe..85e194fd81 100644 --- a/src/renderer/src/i18n/locales/ru-ru.json +++ b/src/renderer/src/i18n/locales/ru-ru.json @@ -560,7 +560,9 @@ }, "data.title": "Каталог данных", "notion.api_key": "Ключ API Notion", + "notion.api_key_placeholder": "Введите ключ API Notion", "notion.database_id": "ID базы данных Notion", + "notion.database_id_placeholder": "Введите ID базы данных Notion", "notion.title": "Настройки Notion", "notion.check": { "button": "Проверить", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index 61ada8dba1..0b1b5a11fa 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -560,7 +560,9 @@ }, "data.title": "数据目录", "notion.api_key": "Notion 密钥", - "notion.database_id": "Notion 数据库ID", + "notion.api_key_placeholder": "请输入Notion 密钥", + "notion.database_id": "Notion 数据库 ID", + "notion.database_id_placeholder": "请输入Notion 数据库 ID", "notion.title": "Notion 配置", "notion.check": { "button": "检查", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 425aa49230..60a55bf5a5 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -558,7 +558,9 @@ }, "data.title": "數據目錄", "notion.api_key": "Notion 金鑰", + "notion.api_key_placeholder": "請輸入Notion 密鑰", "notion.database_id": "Notion 資料庫 ID", + "notion.database_id_placeholder": "請輸入Notion 資料庫 ID", "notion.title": "Notion 配置", "notion.check": { "button": "檢查", diff --git a/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx b/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx index 5509fc762b..9fc325b6c6 100644 --- a/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx +++ b/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx @@ -1,6 +1,7 @@ -import { FileSearchOutlined, FolderOpenOutlined, SaveOutlined } from '@ant-design/icons' +import { FileSearchOutlined, FolderOpenOutlined, InfoCircleOutlined, SaveOutlined } from '@ant-design/icons' import { Client } from '@notionhq/client' import { HStack } from '@renderer/components/Layout' +import MinApp from '@renderer/components/MinApp' import { useTheme } from '@renderer/context/ThemeProvider' import { backup, reset, restore } from '@renderer/services/BackupService' import { RootState, useAppDispatch } from '@renderer/store' @@ -60,9 +61,23 @@ const NotionSettings: FC = () => { }) } + const handleNotionTitleClick = () => { + MinApp.start({ + id: 'notion-help', + name: 'Notion Help', + url: 'https://docs.cherry-ai.com/advanced-basic/notion' + }) + } + return ( - {t('settings.data.notion.title')} + + {t('settings.data.notion.title')} + + {t('settings.data.notion.database_id')} @@ -73,6 +88,7 @@ const NotionSettings: FC = () => { onChange={handleNotionDatabaseIdChange} onBlur={handleNotionDatabaseIdChange} style={{ width: 315 }} + placeholder={t('settings.data.notion.database_id_placeholder')} /> @@ -86,6 +102,7 @@ const NotionSettings: FC = () => { onChange={handleNotionTokenChange} onBlur={handleNotionTokenChange} style={{ width: 250 }} + placeholder={t('settings.data.notion.api_key_placeholder')} />