From 4714c972d9efd2691a428223519d61a34542aa55 Mon Sep 17 00:00:00 2001 From: Pylogmon Date: Fri, 1 Sep 2023 22:46:20 +0800 Subject: [PATCH] 2.0.0-beta.0 --- CHANGELOG | 28 +++++++++---- src-tauri/tauri.conf.json | 2 +- src/i18n/locales/en_US.json | 12 +++++- .../Config/pages/Service/Translate/index.jsx | 7 +++- src/window/Recognize/TextArea/index.jsx | 41 ++++++++++++------- src/window/Translate/index.jsx | 7 +++- 6 files changed, 69 insertions(+), 28 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d5d17df6b9..f42c2164cf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,14 +1,24 @@ -## 1.14.0 (2023-08-11) +## 2.0.0-beta.0 (2023-09-01) -Windows 用户请以管理员权限运行 pot 之后再更新 -Windows users please run pot with administrator privileges before updating +## 注意:此版本为预览版本,有大量接口缺失,请按需谨慎升级 -### New feature: +## 注意:V2 版本完全重写,配置文件于 V1 不兼容,如有需要请先备份相关信息 + +## 注意:Windows 用户请以管理员权限运行 pot 之后再更新 + +## Note: This version is a preview version, there are a lot of interfaces missing, please upgrade carefully according to your needs. -- Add more Language (Mongolian, Mongolian(Cyrillic), Khmer)([`63c667b`](https://github.com/pot-app/pot-desktop/commit/63c667b770d74cde88353de47b2f85bcc1a88323)) (by @Pylogmon) -- Support Custom Url for DeepL([`8f79344`](https://github.com/pot-app/pot-desktop/commit/8f79344ea4eb3782c7e33cdfc812d68e7b350dd4)) (by @Pylogmon) +## Note: V2 version is completely rewritten, the configuration file is not compatible with V1, please backup the related information if needed. -### Bugs fixed: +## Note: For Windows users, please run pot with administrator privileges before updating. + +### New feature: -- delete newline failed (#361)([`09d5783`](https://github.com/pot-app/pot-desktop/commit/09d5783fafbda27612a776c8ea6034d8f1251ec8)) (by @Pylogmon) -- Card height error([`464f54e`](https://github.com/pot-app/pot-desktop/commit/464f54e77ad80e9090bac9d1763729b746dc05e2)) (by @Pylogmon) +- New User Interface (by @Pylogmon) +- Add WebDav Backup (by @Pylogmon) +- Custom OpenAI Prompt (by @Pylogmon) +- Add Window Border for Linux (by @Pylogmon) +- Fix Chinese OCR Space Error (by @Pylogmon) +- Add Translate Back (by @Pylogmon) +- Add Language Detecter (by @Pylogmon) +- Updater Window (by @Pylogmon) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 7f21195171..aef5b90206 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "pot", - "version": "2.0.0" + "version": "2.0.0-beta.0" }, "tauri": { "allowlist": { diff --git a/src/i18n/locales/en_US.json b/src/i18n/locales/en_US.json index 2786c792a2..9ddf592e69 100644 --- a/src/i18n/locales/en_US.json +++ b/src/i18n/locales/en_US.json @@ -3,7 +3,8 @@ "common": { "ok": "Ok", "cancel": "Cancel", - "save": "Save" + "save": "Save", + "write_clipboard": "Write to Clipboard" }, "languages": { "auto": "Auto Detect", @@ -189,7 +190,10 @@ "request_path": "Request Path", "api_key": "Api Key", "model": "Model", - "stream": "Stream Mode" + "stream": "Stream Mode", + "system_prompt": "System Prompt", + "user_prompt": "User Prompt", + "prompt_description": "By customizing the Prompt, you can customize the behavior of OpenAI. $text $from $to will be replaced with the text to be translated, source language, and target language." }, "yandex": { "title": "Yandex" } }, @@ -201,6 +205,10 @@ }, "translate": { "translate": "Translate" + }, + "recognize": { + "recognize": "重新识别", + "translate": "翻译" } } } diff --git a/src/window/Config/pages/Service/Translate/index.jsx b/src/window/Config/pages/Service/Translate/index.jsx index 86c2868cb9..72ca1079ac 100644 --- a/src/window/Config/pages/Service/Translate/index.jsx +++ b/src/window/Config/pages/Service/Translate/index.jsx @@ -14,7 +14,12 @@ export default function Translate() { const { isOpen: isSelectOpen, onOpen: onSelectOpen, onOpenChange: onSelectOpenChange } = useDisclosure(); const { isOpen: isConfigOpen, onOpen: onConfigOpen, onOpenChange: onConfigOpenChange } = useDisclosure(); const [openConfigName, setOpenConfigName] = useState('deepl'); - const [translateServiceList, setTranslateServiceList] = useConfig('translate_service_list', ['deepl', 'bing']); + const [translateServiceList, setTranslateServiceList] = useConfig('translate_service_list', [ + 'deepl', + 'bing', + 'yandex', + 'google', + ]); const { t } = useTranslation(); const toastStyle = useToastStyle(); diff --git a/src/window/Recognize/TextArea/index.jsx b/src/window/Recognize/TextArea/index.jsx index 9fe06d2ab8..7a18e93ad4 100644 --- a/src/window/Recognize/TextArea/index.jsx +++ b/src/window/Recognize/TextArea/index.jsx @@ -1,9 +1,10 @@ -import { Card, CardBody, CardFooter, Button, Skeleton } from '@nextui-org/react'; +import { Card, CardBody, CardFooter, Button, Skeleton, ButtonGroup } from '@nextui-org/react'; import { sendNotification } from '@tauri-apps/api/notification'; import { writeText } from '@tauri-apps/api/clipboard'; import { atom, useAtom, useAtomValue } from 'jotai'; import React, { useEffect, useState } from 'react'; import { MdContentCopy } from 'react-icons/md'; +import { MdSmartButton } from 'react-icons/md'; import { useTranslation } from 'react-i18next'; import { invoke } from '@tauri-apps/api'; import { nanoid } from 'nanoid'; @@ -113,19 +114,31 @@ export default function TextArea() { )} - + + + + ); diff --git a/src/window/Translate/index.jsx b/src/window/Translate/index.jsx index 6ad4d6c088..8e97763a3f 100644 --- a/src/window/Translate/index.jsx +++ b/src/window/Translate/index.jsx @@ -48,7 +48,12 @@ void listen('tauri://focus', () => { export default function Translate() { const [rememberWindowSize] = useConfig('translate_remember_window_size', false); - const [translateServiceList, setTranslateServiceList] = useConfig('translate_service_list', ['deepl', 'bing']); + const [translateServiceList, setTranslateServiceList] = useConfig('translate_service_list', [ + 'deepl', + 'bing', + 'yandex', + 'google', + ]); const [hideSource] = useConfig('hide_source', false); const [hideLanguage] = useConfig('hide_language', false); const [pined, setPined] = useState(false);