diff --git a/src/common/SpecialVideoHelper.ts b/src/common/SpecialVideoHelper.ts index 3409791..fb94728 100644 --- a/src/common/SpecialVideoHelper.ts +++ b/src/common/SpecialVideoHelper.ts @@ -3,9 +3,12 @@ export interface IScreenInfo { screen_height: number; unit_width: number; unit_height: number; - wall_rows: number; - wall_cols: number; + screen_rows: number; + screen_cols: number; desktop_col: number; + desktop_row: number; + desktop_width: number; + desktop_height: number; } export class SpecialVideoHelper { @@ -22,15 +25,17 @@ export class SpecialVideoHelper { const unit_height = SpecialVideoHelper.kScreenHeight / desktp_row; const screen_width = wall_cols * unit_width; const screen_height = wall_rows * unit_height; - console.log(screen_width); return { screen_width, screen_height, unit_width, unit_height, - wall_rows, - wall_cols, + screen_rows: wall_rows, + screen_cols: wall_cols, desktop_col, + desktop_row: desktop_col, + desktop_width: SpecialVideoHelper.kScreenWidth, + desktop_height: SpecialVideoHelper.kScreenHeight, }; } } diff --git a/src/components/SignalSourceDialog.vue b/src/components/SignalSourceDialog.vue index 5e2e85d..207f03c 100644 --- a/src/components/SignalSourceDialog.vue +++ b/src/components/SignalSourceDialog.vue @@ -392,10 +392,6 @@ export default defineComponent({ label: $t.t("multimedia file"), value: "EwindowType::Multimedia", }, - { - label: $t.t("Web"), - value: "EwindowType::Web", - }, { label: $t.t("image"), value: "EwindowType::Image", @@ -404,6 +400,10 @@ export default defineComponent({ label: $t.t("rtsp"), value: "EwindowType::Rtsp", }, + { + label: $t.t("Web"), + value: "EwindowType::Web", + }, { label: $t.t("clock"), value: "EwindowType::Clock", @@ -417,24 +417,30 @@ export default defineComponent({ const refresh_signal_source_options = () => { signal_source_options.value = []; - for (const item of build_signal_source_options) { - signal_source_options.value.push(item); - } - if ( - ($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) == - 0 - ) { - signal_source_options.value.push({ - label: $t.t("weather"), - value: "EwindowType::Weather", - }); - } else { - const index = signal_source_options.value.findIndex( - (element: any) => element && element.value == "EwindowType::Weather" - ); - if (index != -1) { - signal_source_options.value.splice(index, 1); + if ($store.state.isLedPlayer()) { + for (const item of build_signal_source_options) { + signal_source_options.value.push(item); } + if ( + ($store.state.device_attribute & + Protocol.EDeviceAttribute.CustomISV) == + 0 + ) { + signal_source_options.value.push({ + label: $t.t("weather"), + value: "EwindowType::Weather", + }); + } else { + const index = signal_source_options.value.findIndex( + (element: any) => element && element.value == "EwindowType::Weather" + ); + if (index != -1) { + signal_source_options.value.splice(index, 1); + } + } + } else if ($store.state.isSpecialVideo()) { + signal_source_options.value = []; + signal_source_options.value = build_signal_source_options.slice(0, 2); } }; diff --git a/src/components/WindowRectEditDialog.vue b/src/components/WindowRectEditDialog.vue index fcd83d8..8b82e7f 100644 --- a/src/components/WindowRectEditDialog.vue +++ b/src/components/WindowRectEditDialog.vue @@ -352,9 +352,8 @@ export default defineComponent({ }; if ( - window_rect.x + window_rect.width > - $store.state.device_screen_width || - window_rect.y + window_rect.height > $store.state.device_screen_height + window_rect.x + window_rect.width > screen_width.value || + window_rect.y + window_rect.height > screen_height.value ) { $q.dialog({ title: $t.t("Warning"),