From 63fdc87a1cbf54abe6776c2f59ce8fceed7996fc Mon Sep 17 00:00:00 2001 From: bee-worker <70210089+bee-worker@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:20:26 +0100 Subject: [PATCH 1/2] chore(master): release 0.46.0 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index feb84eb..da9ef5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.46.0](https://github.com/ethersphere/swarm-desktop/compare/v0.45.0...v0.46.0) (2024-11-28) + + +### Features + +* add screenshot plugin ([#451](https://github.com/ethersphere/swarm-desktop/issues/451)) ([d0a3906](https://github.com/ethersphere/swarm-desktop/commit/d0a3906df129c94c5dc40c8870d594328381da22)) + ## [0.45.0](https://github.com/ethersphere/swarm-desktop/compare/v0.44.0...v0.45.0) (2024-11-25) diff --git a/package-lock.json b/package-lock.json index 1c89747..e072510 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "swarm-desktop", - "version": "0.45.0", + "version": "0.46.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "swarm-desktop", - "version": "0.45.0", + "version": "0.46.0", "license": "BSD-3-Clause", "dependencies": { "@ethersphere/bee-js": "^8.3.1", diff --git a/package.json b/package.json index 0550d2b..4fb42b3 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "name": "Swarm Association", "email": "info@ethswarm.org" }, - "version": "0.45.0", + "version": "0.46.0", "description": "Desktop client for running and managing bee", "homepage": "https://desktop.ethswarm.org/", "repository": "https://github.com/ethersphere/swarm-desktop", From 123be2dd4de6d70bfe356eb84f165ec30dc19b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20S=C3=A1rai?= Date: Thu, 28 Nov 2024 14:41:24 +0100 Subject: [PATCH 2/2] feat: improve screenshot plugin dimensions and styling --- src/plugins/screenshot/utils/index.ts | 4 ++-- src/plugins/screenshot/windows/preview/preview.css | 2 +- src/plugins/screenshot/windows/preview/preview.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/screenshot/utils/index.ts b/src/plugins/screenshot/utils/index.ts index 599e795..8a84888 100644 --- a/src/plugins/screenshot/utils/index.ts +++ b/src/plugins/screenshot/utils/index.ts @@ -51,8 +51,8 @@ export function getScreenSize(resizeBy = 3) { const scaleFactor = primaryDisplay.scaleFactor const defaultScreenSize = { - width: (width / resizeBy) * scaleFactor, - height: (height / resizeBy) * scaleFactor, + width: Math.floor((width / resizeBy) * scaleFactor), + height: Math.floor((height / resizeBy) * scaleFactor), } return { diff --git a/src/plugins/screenshot/windows/preview/preview.css b/src/plugins/screenshot/windows/preview/preview.css index 7c53ecf..f03861d 100644 --- a/src/plugins/screenshot/windows/preview/preview.css +++ b/src/plugins/screenshot/windows/preview/preview.css @@ -145,7 +145,7 @@ iframe { img { display: block; max-width: 90%; - max-height: 720px; + max-height: 75vh; object-fit: contain; } diff --git a/src/plugins/screenshot/windows/preview/preview.ts b/src/plugins/screenshot/windows/preview/preview.ts index 7aa704a..b3bff14 100644 --- a/src/plugins/screenshot/windows/preview/preview.ts +++ b/src/plugins/screenshot/windows/preview/preview.ts @@ -12,6 +12,7 @@ function createPreviewWindow(imgDataURL: string) { previewWindow = new BrowserWindow({ width: defaultScreenSize.width, height: defaultScreenSize.height, + useContentSize: true, resizable: false, webPreferences: { preload: path.join(__dirname, 'preview-preload.js'),