Skip to content

Commit

Permalink
perf: ♻️ Options in the preference settings
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Mar 14, 2024
1 parent 6cfb021 commit dc711cb
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/components/Preference/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<el-form
ref="elForm"
:model="preferenceData"
label-width="200px"
label-width="225px"
class="pr-8 pt-4"
>
<el-row :gutter="20">
Expand Down
9 changes: 5 additions & 4 deletions src/locales/languages/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@
"preferences.common.auto-connect.placeholder": "When enabled, the software will attempt to automatically connect to historical devices upon startup.",

"preferences.video.name": "Video",
"preferences.video.disable-video.name": "Disable Video Forwarding",
"preferences.video.disable-video.placeholder": "Video forwarding will be disabled when enabled",
"preferences.video.video-source.name": "Video Source",
"preferences.video.video-source.placeholder": "Device display",
"preferences.video.video-source.display": "Display",
Expand Down Expand Up @@ -250,10 +252,6 @@
"preferences.record.format.placeholder": "mp4",
"preferences.record.lock-video-orientation.name": "Video Direction",
"preferences.record.lock-video-orientation.placeholder": "Device Orientation",
"preferences.record.disable-video.name": "Disable Video Recording",
"preferences.record.disable-video.placeholder": "Video recording will be disabled when enabled",
"preferences.record.disable-audio.name": "Disable Audio Recording",
"preferences.record.disable-audio.placeholder": "Audio recording will be disabled when enabled",
"preferences.record.no-video-playback.name": "Disable Video Playback",
"preferences.record.no-video-playback.placeholder": "Video playback will be disabled during recording when enabled",
"preferences.record.no-video-playback.tips": "Note: Video will still be recorded, just playback disabled",
Expand All @@ -262,6 +260,9 @@
"preferences.record.no-audio-playback.tips": "Note: Audio will still be recorded, just playback disabled",

"preferences.audio.name": "Audio",
"preferences.audio.disable-audio.name": "Disable Audio Forwarding",
"preferences.audio.disable-audio.placeholder": "Audio forwarding will be disabled when enabled",
"preferences.audio.disable-audio.tips": "If your device audio capture is abnormal, you can open this option to ensure that you can open the mirror normally",
"preferences.audio.audio-source.name": "Audio Source",
"preferences.audio.audio-source.placeholder": "Device Audio Output",
"preferences.audio.audio-source.tips": "Tip: Selecting 'Microphone' as the source will allow you to record audio.",
Expand Down
9 changes: 5 additions & 4 deletions src/locales/languages/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@
"preferences.common.auto-connect.placeholder": "启用后,该软件将在启动时尝试自动连接到历史设备",

"preferences.video.name": "视频控制",
"preferences.video.disable-video.name": "禁用视频转发",
"preferences.video.disable-video.placeholder": "开启后将禁用视频转发",
"preferences.video.video-source.name": "视频源",
"preferences.video.video-source.placeholder": "默认为设备显示器",
"preferences.video.video-source.display": "显示器",
Expand Down Expand Up @@ -250,10 +252,6 @@
"preferences.record.time-limit.placeholder": "不限时长",
"preferences.record.lock-video-orientation.name": "录制视频方向",
"preferences.record.lock-video-orientation.placeholder": "设备默认方向",
"preferences.record.disable-video.name": "禁用视频录制",
"preferences.record.disable-video.placeholder": "开启后将禁用视频录制",
"preferences.record.disable-audio.name": "禁用音频录制",
"preferences.record.disable-audio.placeholder": "开启后将禁用音频录制",
"preferences.record.no-video-playback.name": "禁用视频播放",
"preferences.record.no-video-playback.placeholder": "开启后录制时将禁用视频播放",
"preferences.record.no-video-playback.tips": "注意:只是禁用了播放但是依然会录制视频",
Expand All @@ -262,6 +260,9 @@
"preferences.record.no-audio-playback.tips": "注意:只是禁用了播放但是依然会录制音频",

"preferences.audio.name": "音频控制",
"preferences.audio.disable-audio.name": "禁用音频转发",
"preferences.audio.disable-audio.placeholder": "开启后将禁用音频转发",
"preferences.audio.disable-audio.tips": "如果您的设备音频捕获异常,则可以打开此选项,以确保可以正常打开镜像",
"preferences.audio.audio-source.name": "音频源",
"preferences.audio.audio-source.placeholder": "设备音频输出",
"preferences.audio.audio-source.tips": "技巧:如果将来源设为麦克风将可以在录制时将声音录制下来",
Expand Down
8 changes: 8 additions & 0 deletions src/store/preference/model/audio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ export default {
field: 'scrcpy',

children: {
noAudio: {
label: 'preferences.audio.disable-audio.name',
field: '--no-audio',
type: 'Switch',
value: undefined,
placeholder: 'preferences.audio.disable-audio.placeholder',
tips: 'preferences.audio.disable-audio.tips',
},
audioSource: {
label: 'preferences.audio.audio-source.name',
field: '--audio-source',
Expand Down
14 changes: 0 additions & 14 deletions src/store/preference/model/record/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,6 @@ export default {
append: 's',
span: 24,
},
noVideo: {
label: 'preferences.record.disable-video.name',
field: '--no-video',
type: 'Switch',
value: undefined,
placeholder: 'preferences.record.disable-video.placeholder',
},
noAudio: {
label: 'preferences.record.disable-audio.name',
field: '--no-audio',
type: 'Switch',
value: undefined,
placeholder: 'preferences.record.disable-audio.placeholder',
},
noVideoPlayback: {
label: 'preferences.record.no-video-playback.name',
field: '--no-video-playback',
Expand Down
7 changes: 7 additions & 0 deletions src/store/preference/model/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ export default {
field: 'scrcpy',

children: {
noVideo: {
label: 'preferences.video.disable-video.name',
field: '--no-video',
type: 'Switch',
value: undefined,
placeholder: 'preferences.video.disable-video.placeholder',
},
videoSource: {
hidden: true,
label: 'preferences.video.video-source.name',
Expand Down

0 comments on commit dc711cb

Please sign in to comment.