Skip to content

Commit bf15231

Browse files
committed
3.0.5
1 parent 07b78b9 commit bf15231

File tree

13 files changed

+96
-5
lines changed

13 files changed

+96
-5
lines changed

CHANGELOG

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 3.0.4 (2024-06-26)
1+
## 3.0.5 (2024-06-27)
22

33
### Break Change:
44

@@ -10,6 +10,7 @@
1010
- support multiple instance service
1111
- use javascript plugin system
1212
- enable dev tools
13+
- add database api for plugin
1314

1415
### Bugs fixed:
1516

com.pot_app.pot.metainfo.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,30 @@
5353
</screenshot>
5454
</screenshots>
5555
<releases>
56+
<release version="3.0.5" date="2024-06-27">
57+
<url type="details">https://github.com/pot-app/pot-desktop/releases/tag/3.0.5</url>
58+
<description>
59+
<p>Break Change:</p>
60+
<ul>
61+
<li>After version 3.x, old plugins will no longer be available. They will be automatically deleted upon upgrade. Please visit the plugin repository to download and install the new versions. If the plugin developers have not yet updated their plugins, please contact them to request an upgrade.</li>
62+
<li xml:lang="zh-Hans">3.x版本之后旧版插件不再可用,升级后会自动删除旧版插件,请前往插件仓库下载安装新版插件使用,若插件开发者还没适配新版插件,请联系插件开发者升级插件。</li>
63+
</ul>
64+
<p>New feature:</p>
65+
<ul>
66+
<li>Support multiple instance services</li>
67+
<li>Use Javascript plugin system</li>
68+
<li>Enable dev tools</li>
69+
<li>Add Database api for plugin</li>
70+
</ul>
71+
<p>Bugs fixed:</p>
72+
<ul>
73+
<li>Recognize failed</li>
74+
<li>TTS failed</li>
75+
<li>Collection failed</li>
76+
<li>Default Lingva error</li>
77+
</ul>
78+
</description>
79+
</release>
5680
<release version="3.0.4" date="2024-06-26">
5781
<url type="details">https://github.com/pot-app/pot-desktop/releases/tag/3.0.4</url>
5882
<description>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pot",
33
"private": true,
4-
"version": "3.0.4",
4+
"version": "3.0.5",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

public/logo/ecdict.svg

Lines changed: 1 addition & 0 deletions
Loading

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "pot",
11-
"version": "3.0.4"
11+
"version": "3.0.5"
1212
},
1313
"tauri": {
1414
"allowlist": {

src/i18n/locales/en_US.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@
292292
"yandex": {
293293
"title": "Yandex"
294294
},
295+
"ecdict": {
296+
"title": "ECDict(Online)"
297+
},
295298
"transmart": {
296299
"title": "TranSmart",
297300
"username": "User Name",
@@ -462,4 +465,4 @@
462465
"delete_space": "Delete Space"
463466
}
464467
}
465-
}
468+
}

src/i18n/locales/zh_CN.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@
292292
"yandex": {
293293
"title": "Yandex"
294294
},
295+
"ecdict": {
296+
"title": "ECDict(在线)"
297+
},
295298
"transmart": {
296299
"title": "腾讯交互翻译",
297300
"username": "用户名",
@@ -462,4 +465,4 @@
462465
"delete_space": "删除空格"
463466
}
464467
}
465-
}
468+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { useTranslation } from 'react-i18next';
2+
import { Button } from '@nextui-org/react';
3+
import React from 'react';
4+
5+
export function Config(props) {
6+
const { updateServiceList, onClose } = props;
7+
const { t } = useTranslation();
8+
9+
return (
10+
<>
11+
<div>{t('services.no_need')}</div>
12+
<div>
13+
<Button
14+
fullWidth
15+
color='primary'
16+
onPress={() => {
17+
updateServiceList('ecdict');
18+
onClose();
19+
}}
20+
>
21+
{t('common.save')}
22+
</Button>
23+
</div>
24+
</>
25+
);
26+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { fetch, Body } from '@tauri-apps/api/http';
2+
3+
export async function translate(text, _from, _to) {
4+
const res = await fetch(`https://pot-app.com/api/dict`, {
5+
method: 'POST',
6+
body: Body.json({ text }),
7+
});
8+
9+
if (res.ok) {
10+
let result = res.data;
11+
return result;
12+
} else {
13+
throw `Http Request Error\nHttp Status: ${res.status}\n${JSON.stringify(res.data)}`;
14+
}
15+
}
16+
17+
export * from './Config';
18+
export * from './info';

src/services/translate/ecdict/info.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export const info = {
2+
name: 'ecdict',
3+
icon: 'logo/ecdict.svg',
4+
};
5+
6+
export enum Language {
7+
auto = '',
8+
zh_cn = 'zh',
9+
zh_tw = 'zh',
10+
en = 'en',
11+
}

0 commit comments

Comments
 (0)