Skip to content

Commit

Permalink
perf: 🎉 Add OTG functions
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 1, 2023
1 parent 34800cf commit e249d84
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/locales/languages/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@
"preferences.audio.audio-output-buffer.placeholder": "Default 5ms",
"preferences.audio.disable.name": "Disable Audio",
"preferences.audio.disable.placeholder": "Disable audio stream",
"preferences.otg.name": "OTG",
"preferences.otg.enable.name": "Enable OTG",
"preferences.otg.enable.placeholder": "Turn on or off OTG",
"preferences.otg.enable.tips": "Enabling this will allow mouse and keyboard when connected via OTG",
"preferences.otg.hid-keyboard.name": "Use Keyboard",
"preferences.otg.hid-keyboard.placeholder": "Turn on or off keyboard OTG",
"preferences.otg.hid-keyboard.tips": "Enabling this option alone will disable mouse OTG, which can be enabled at the same time as the mouse option",
"preferences.otg.hid-mouse.name": "Use Mouse",
"preferences.otg.hid-mouse.placeholder": "Turn on or off mouse OTG",
"preferences.otg.hid-mouse.tips": "Enabling this option alone will disable keyboard OTG, which can be enabled at the same time as the keyboard option",
"about.name": "About",
"about.description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron.",
"about.update": "Check for Updates",
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 @@ -187,6 +187,16 @@
"preferences.audio.audio-output-buffer.placeholder": "默认值为 5ms",
"preferences.audio.disable.name": "禁用音频",
"preferences.audio.disable.placeholder": "开启后将禁用音频功能",
"preferences.otg.name": "OTG 控制",
"preferences.otg.enable.name": "启用 OTG",
"preferences.otg.enable.placeholder": "开启或关闭 OTG 功能",
"preferences.otg.enable.tips": "开启后可以使用物理键盘和鼠标控制安卓设备,注意:仅启用该选项将同时启用鼠标和键盘 OTG 功能",
"preferences.otg.hid-keyboard.name": "启用键盘",
"preferences.otg.hid-keyboard.placeholder": "开启或关闭键盘的 OTG 功能",
"preferences.otg.hid-keyboard.tips": "注意:仅启用该选项将禁用鼠标的 OTG 功能,它可以和启用鼠标选项同时开启",
"preferences.otg.hid-mouse.name": "启用鼠标",
"preferences.otg.hid-mouse.placeholder": "开启或关闭鼠标的 OTG 功能",
"preferences.otg.hid-mouse.tips": "注意:仅启用该选项将禁用键盘的 OTG 功能,它可以和启用键盘选项同时开启",
"about.name": "关于",
"about.description": "📱 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动",
"about.update": "检查并更新",
Expand Down
3 changes: 2 additions & 1 deletion src/store/preference/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import device from './device/index.js'
import window from './window/index.js'
import audio from './audio/index.js'
import record from './record/index.js'
import otg from './otg/index.js'

export default { common, video, device, window, audio, record }
export default { common, video, device, window, audio, record, otg }
31 changes: 31 additions & 0 deletions src/store/preference/model/otg/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export default {
label: 'preferences.otg.name',
field: 'scrcpy',

children: {
otg: {
label: 'preferences.otg.enable.name',
field: '--otg',
type: 'Switch',
value: null,
placeholder: 'preferences.otg.enable.placeholder',
tips: 'preferences.otg.enable.tips',
},
hidKeyboard: {
label: 'preferences.otg.hid-keyboard.name',
field: '--hid-keyboard',
type: 'Switch',
value: null,
placeholder: 'preferences.otg.hid-keyboard.placeholder',
tips: 'preferences.otg.hid-keyboard.tips',
},
hidMouse: {
label: 'preferences.otg.hid-mouse.name',
field: '--hid-mouse',
type: 'Switch',
value: null,
placeholder: 'preferences.otg.hid-mouse.placeholder',
tips: 'preferences.otg.hid-mouse.tips',
},
},
}

0 comments on commit e249d84

Please sign in to comment.