Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 18, 2023
2 parents 009e9d9 + bc3b114 commit 7e74416
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [1.15.0](https://github.com/viarotel-org/escrcpy/compare/v1.14.3...v1.15.0) (2023-11-18)


### Features

* 添加投屏窗口大小控制 ([97d7868](https://github.com/viarotel-org/escrcpy/commit/97d7868abaf321a5693b621b97af82ecf3fa9ada))


### Performance Improvements

* 🚀 Add window position option ([866aa2c](https://github.com/viarotel-org/escrcpy/commit/866aa2cfd253f702112367a857c88c40714c1065))

## [1.14.3](https://github.com/viarotel-org/escrcpy/compare/v1.14.2...v1.14.3) (2023-11-17)


Expand Down
7 changes: 7 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ Windows 及 Linux 端内部集成了 Gnirehtet, 用于提供 PC 到安卓设
- [iBar](https://www.better365.cn/ibar.html)
- [Bartender](https://www.macbartender.com/)

### macOS 安装成功后打开提示文件损坏

> 这个通常是因为软件包本身没有签名导致的,可以尝试以下解决方法
1. 终端中执行 `sudo spctl --master-disable` 以允许任何来源
2. 终端中执行 `sudo xattr -r -d com.apple.quarantine [AppPath]` 以尝试修复提示软件包损坏

## 获得帮助

> 因为是开源项目 全靠爱发电 所以支持有限 更新节奏不固定
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,13 @@ Please refer to the detailed instructions under [Reasons why mouse and keyboard
- [iBar](https://www.better365.cn/ibar.html)
- [Bartender](https://www.macbartender.com/)

### After a successful installation of macOS, when I try to open it, I receive a prompt saying the file is damaged.

> This is usually due to the software package not being signed. You can try the following solutions:
1. Open Terminal and execute `sudo spctl --master-disable` to allow software from any source.
2. Open Terminal and execute `sudo xattr -r -d com.apple.quarantine [AppPath]` to attempt fixing the damaged software package prompt.

## Getting Help

> As this is an open source project run entirely by donations, support is limited and updates may not be on a fixed schedule.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "escrcpy",
"version": "1.14.3",
"version": "1.15.0",
"private": true,
"description": "Scrcpy Powered by Electron",
"author": "viarotel",
Expand Down
10 changes: 10 additions & 0 deletions src/locales/languages/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,16 @@
"preferences.window.always-top.placeholder": "Keep control window topmost",
"preferences.window.disable-screen-saver.name": "Disable Screensaver",
"preferences.window.disable-screen-saver.placeholder": "Disable computer screensaver",
"preferences.window.size.width": "Window Width",
"preferences.window.size.width.placeholder": "Device Width",
"preferences.window.size.width.tips": "Note: Changing this setting may result in blurry display.",
"preferences.window.size.height": "Window Height",
"preferences.window.size.height.placeholder": "Device Height",
"preferences.window.size.height.tips": "Note: Changing this setting may result in blurry display.",
"preferences.window.position.x": "Window X Position",
"preferences.window.position.x.placeholder": "Relative to Desktop Center",
"preferences.window.position.y": "Window Y Position",
"preferences.window.position.y.placeholder": "Relative to Desktop Center",

"preferences.record.name": "Recording",
"preferences.record.format.name": "Format",
Expand Down
10 changes: 10 additions & 0 deletions src/locales/languages/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@
"preferences.window.always-top.placeholder": "开启后控制窗口将始终位于顶部",
"preferences.window.disable-screen-saver.name": "禁用屏幕保护程序",
"preferences.window.disable-screen-saver.placeholder": "开启后将禁用计算机屏幕保护程序",
"preferences.window.size.width": "窗口宽度",
"preferences.window.size.width.placeholder": "设备宽度",
"preferences.window.size.width.tips": "注意:更改此设置可能会导致显示模糊",
"preferences.window.size.height": "窗口高度",
"preferences.window.size.height.placeholder": "设备高度",
"preferences.window.size.height.tips": "注意:更改此设置可能会导致显示模糊",
"preferences.window.position.x": "窗口横坐标",
"preferences.window.position.x.placeholder": "相对于桌面中心",
"preferences.window.position.y": "窗口纵坐标",
"preferences.window.position.y.placeholder": "相对于桌面中心",

"preferences.record.name": "音视频录制",
"preferences.record.format.name": "录制视频格式",
Expand Down
7 changes: 5 additions & 2 deletions src/store/preference/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export const usePreferenceStore = defineStore({
this.init()
},
setData(data, scope = this.deviceScope) {
const pickData = pickBy(data, value => !!value)
const pickData = pickBy(
data,
value => !!value || typeof value === 'number',
)

if (data.adbPath === adbPath) {
delete pickData.adbPath
Expand Down Expand Up @@ -136,7 +139,7 @@ export const usePreferenceStore = defineStore({
}

const valueList = Object.entries(data).reduce((arr, [key, value]) => {
if (!value) {
if (!value && typeof value !== 'number') {
return arr
}

Expand Down
30 changes: 30 additions & 0 deletions src/store/preference/model/window/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@ export default {
field: 'scrcpy',

children: {
windowWidth: {
label: 'preferences.window.size.width',
field: '--window-width',
type: 'Input.number',
value: undefined,
placeholder: 'preferences.window.size.width.placeholder',
tips: 'preferences.window.size.width.tips',
},
windowHeight: {
label: 'preferences.window.size.height',
field: '--window-height',
type: 'Input.number',
value: undefined,
placeholder: 'preferences.window.size.height.placeholder',
tips: 'preferences.window.size.height.tips',
},
windowX: {
label: 'preferences.window.position.x',
field: '--window-x',
type: 'Input.number',
value: undefined,
placeholder: 'preferences.window.position.x.placeholder',
},
windowY: {
label: 'preferences.window.position.y',
field: '--window-y',
type: 'Input.number',
value: undefined,
placeholder: 'preferences.window.position.y.placeholder',
},
windowBorderless: {
label: 'preferences.window.borderless.name',
field: '--window-borderless',
Expand Down

0 comments on commit 7e74416

Please sign in to comment.