diff --git a/README.de-DE.md b/README.de-DE.md
index a92ee80..fb203c9 100644
--- a/README.de-DE.md
+++ b/README.de-DE.md
@@ -1,14 +1,14 @@
-
-
pear-rec
-
-
-
-
-
-
-
-
+
+ pear-rec
+
+
+
+
+
+
+
+
---
diff --git a/README.md b/README.md
index 79323bb..5c4b3b9 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-
-
pear-rec
-
-
-
-
-
-
-
-
+
+ pear-rec
+
+
+
+
+
+
+
+
---
@@ -27,6 +27,8 @@
## 🧱 Frameworks
+
+
The cross-Platform of `pear-rec` is based on `electronjs`, and the front-end is based on `reactjs`. The functions of screenshot, screen recording, recording, recording (dynamic image) gif are a project based on `webrtc` and `webcodecs`.
## 🖖 Vue
diff --git a/README.zh-CN.md b/README.zh-CN.md
index d7a9879..48cd253 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,14 +1,14 @@
-
-
pear-rec
-
-
-
-
-
-
-
-
+
+ pear-rec
+
+
+
+
+
+
+
+
---
@@ -27,6 +27,8 @@
## 🧱 架构
+
+
> pear-rec(梨子 rec) 的跨平台是基于 `electronjs`,前端是基于 `reactjs`,截图、录屏、录音、录像、录制(动图)gif 等功能是基于 `webrtc` 和 `webcodecs` 的一个项目。
## 🖖 Vue
diff --git a/packages/desktop/electron/win/shotScreenWin.ts b/packages/desktop/electron/win/shotScreenWin.ts
index 5f7cd79..51e7a2a 100644
--- a/packages/desktop/electron/win/shotScreenWin.ts
+++ b/packages/desktop/electron/win/shotScreenWin.ts
@@ -5,8 +5,6 @@ import path from 'node:path';
import * as utils from '../main/utils';
let shotScreenWin: BrowserWindow | null = null;
-let savePath: string = '';
-let downloadSet: Set = new Set();
function createShotScreenWin(): BrowserWindow {
shotScreenWin = new BrowserWindow({
@@ -121,7 +119,7 @@ async function downloadImg(file: any) {
fileName: defaultPath,
filePath: imagePath,
bounds: file.bounds,
- isClose: file.isClose,
+ isShow: isShow,
isPin: isPin,
});
console.log(`${imagePath}:图片保存成功`);
@@ -130,33 +128,15 @@ async function downloadImg(file: any) {
}
}
-async function downloadURLShotScreenWin(downloadUrl: string, isShowDialog?: boolean) {
- savePath = '';
- isShowDialog && (savePath = await showOpenDialogShotScreenWin());
- downloadSet.add(downloadUrl);
- shotScreenWin?.webContents.downloadURL(downloadUrl);
-}
-
-async function showOpenDialogShotScreenWin() {
- let res = await dialog.showOpenDialog({
- properties: ['openDirectory'],
- });
-
- const savePath = res.filePaths[0] || '';
-
- return savePath;
-}
-
function copyImg(filePath: string) {
- const image = nativeImage.createFromDataURL(filePath);
- clipboard.writeImage(image);
+ const data = Buffer.from(`file://${encodeURI(filePath)}`, 'utf-8');
+ clipboard.writeBuffer('image/png', data);
}
export {
closeShotScreenWin,
copyImg,
createShotScreenWin,
- downloadURLShotScreenWin,
downloadImg,
hideShotScreenWin,
maximizeShotScreenWin,
diff --git a/packages/docs/desktop/examples.md b/packages/docs/desktop/examples.md
index 036eea7..a052ddc 100644
--- a/packages/docs/desktop/examples.md
+++ b/packages/docs/desktop/examples.md
@@ -23,6 +23,9 @@
+
+
+
## 首页
diff --git a/packages/docs/public/imgs/webav.png b/packages/docs/public/imgs/webav.png
new file mode 100644
index 0000000..50e2541
Binary files /dev/null and b/packages/docs/public/imgs/webav.png differ
diff --git a/packages/web/src/pages/shotScreen/index.tsx b/packages/web/src/pages/shotScreen/index.tsx
index 9600186..0dc5980 100644
--- a/packages/web/src/pages/shotScreen/index.tsx
+++ b/packages/web/src/pages/shotScreen/index.tsx
@@ -222,6 +222,8 @@ function ShotScreen() {
width: bounds.width,
height: bounds.height,
});
+ } else {
+ file.isShow || window.electronAPI?.sendViOpenWin({ recordId: recordId });
}
}
} catch (err) {