前端添加镜像输出选项

This commit is contained in:
fangxiang 2022-05-26 16:37:43 +08:00
parent 9cfe6783bd
commit 7ec5075c74
5 changed files with 43 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "media_player_client",
"version": "1.4.9",
"version": "1.4.10",
"description": "A Quasar Framework app",
"productName": "MediaPlayerClient",
"author": "fangxiang <fangxiang@cloudview.work>",

View File

@ -284,6 +284,19 @@
</q-btn>
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar class="width_5_2_2"
>{{ $t("mirroring output") }}:</q-item-section
>
<q-item-section>
<q-checkbox
v-model="mirroring_output"
:loading="loading"
:disable="loading"
@update:model-value="tooltipMirroringTime"
/>
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar class="width_5_2_2"
>{{ $t("output type") }}:</q-item-section
@ -1037,6 +1050,8 @@ export default defineComponent({
let contrast = ref(0);
let hue = ref(0);
const mirroring_output = ref(false);
const function_output_board_attribute = ref(
($store.state.device_attribute & Protocol.EDeviceAttribute.OutputBoard) !=
0
@ -1172,6 +1187,9 @@ export default defineComponent({
device_resolution_timing.value =
support_resolutions.target_resolution.timing;
}
mirroring_output.value =
config.device_hdmi_output_count == 2 ? true : false;
}, 1);
brightness.value = parseInt(config.graphics_brightness.toString());
@ -1319,6 +1337,7 @@ export default defineComponent({
request.device_resolution_name = device_resolution.value;
request.target_resolution_timing = device_resolution_timing.value;
request.rotate = parseInt(device_rotate.value.toString());
request.hdmi_output_count = mirroring_output.value ? 2 : 1;
let success = false;
try {
@ -1548,6 +1567,7 @@ export default defineComponent({
other_form,
graphics_form,
output_board_form,
mirroring_output,
refresh_all,
apply,
restoreOutputBoard,
@ -1693,6 +1713,21 @@ export default defineComponent({
}
}
},
tooltipMirroringTime(value: boolean) {
if (value) {
$q.dialog({
title: $t.t("info"),
message: $t.t(
"after mirroring output is enabled, the second output may need to wait 1 or 2 minutes before the screen appears!"
),
persistent: true,
ok: {
label: $t.t("i have known"),
flat: true,
},
});
}
},
isIpAddress(str: string) {
return (
str == "localhost" ||

View File

@ -28,4 +28,5 @@ export default class ApplicationConfigEntity {
runtime_os: string = "";
registered: boolean = false;
hdmi_in_decode_type_1: string | undefined;
device_hdmi_output_count = 1;
}

View File

@ -1705,6 +1705,7 @@ export namespace Protocol {
target_resolution_type: string = "EDID";
device_resolution_name: string = "3840x2160@60";
target_resolution_timing: string = "";
hdmi_output_count = 1;
constructor(rcp_id?: number) {
super();

View File

@ -546,4 +546,9 @@ export default {
location: "位置",
city_city_area: "市区",
"device standby mode": "设备已休眠",
"mirroring output": "镜像输出",
info: "信息",
"after mirroring output is enabled, the second output may need to wait 1 or 2 minutes before the screen appears!":
"启用镜像输出后第二个输出可能需要等待1~2分钟才会有画面!",
"i have known": "我已知晓",
};