Skip to content

Commit

Permalink
2.0.0-beta.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed Sep 1, 2023
1 parent ff4140d commit 4714c97
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 28 deletions.
28 changes: 19 additions & 9 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "pot",
"version": "2.0.0"
"version": "2.0.0-beta.0"
},
"tauri": {
"allowlist": {
Expand Down
12 changes: 10 additions & 2 deletions src/i18n/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"common": {
"ok": "Ok",
"cancel": "Cancel",
"save": "Save"
"save": "Save",
"write_clipboard": "Write to Clipboard"
},
"languages": {
"auto": "Auto Detect",
Expand Down Expand Up @@ -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" }
},
Expand All @@ -201,6 +205,10 @@
},
"translate": {
"translate": "Translate"
},
"recognize": {
"recognize": "重新识别",
"translate": "翻译"
}
}
}
7 changes: 6 additions & 1 deletion src/window/Config/pages/Service/Translate/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
41 changes: 27 additions & 14 deletions src/window/Recognize/TextArea/index.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -113,19 +114,31 @@ export default function TextArea() {
)}
</CardBody>
<CardFooter className='bg-content1 flex justify-start px-[12px]'>
<Button
isIconOnly
size='sm'
variant='light'
onPress={async () => {
await invoke('copy_img', {
width: imgRef.current.naturalWidth,
height: imgRef.current.naturalHeight,
});
}}
>
<MdContentCopy className='text-[16px]' />
</Button>
<ButtonGroup>
<Button
isIconOnly
size='sm'
variant='light'
onPress={async () => {
await invoke('copy_img', {
width: imgRef.current.naturalWidth,
height: imgRef.current.naturalHeight,
});
}}
>
<MdContentCopy className='text-[16px]' />
</Button>
<Button
isIconOnly
variant='light'
size='sm'
onPress={() => {
setText(text.replace(/\s+/g, ' '));
}}
>
<MdSmartButton className='text-[16px]' />
</Button>
</ButtonGroup>
</CardFooter>
</Card>
);
Expand Down
7 changes: 6 additions & 1 deletion src/window/Translate/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4714c97

Please sign in to comment.