Merge branch 'magic_wall'

# Conflicts:
#	src/common/ClientConnection.ts
#	src/components/RegisterDialog.vue
#	src/components/SystemSettingDialog.vue
#	src/entities/MagicWallConfig.ts
#	src/entities/RectF.ts
#	src/entities/WSProtocol.ts
#	src/i18n/en-US/index.ts
#	src/i18n/zh-CN/index.ts
#	src/pages/TopToolBar.vue
#	src/store/index.ts
This commit is contained in:
miao 2023-02-01 13:41:33 +08:00
commit e940f24b52
12 changed files with 3740 additions and 1340 deletions

View File

@ -69,15 +69,7 @@
:disable="loading" :disable="loading"
/> />
</q-item-section> </q-item-section>
<q-item-section avatar>
<q-btn
@click="setDeviceAttribute"
:label="$t('commit')"
no-caps
outline
color="primary"
/>
</q-item-section>
</q-item> </q-item>
<q-item> <q-item>
<q-item-section avatar></q-item-section> <q-item-section avatar></q-item-section>
@ -85,12 +77,33 @@
<q-checkbox <q-checkbox
v-model="function_custom_ISV" v-model="function_custom_ISV"
:label="$t('Custom ISV')" :label="$t('Custom ISV')"
class="offset-md-1 col"
color="cyan" color="cyan"
class="col"
:loading="loading" :loading="loading"
:disable="loading" :disable="loading"
/> />
</q-item-section> </q-item-section>
<q-item-section>
<q-checkbox
v-model="function_magic_wall"
:label="$t('magic wall')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
</q-item-section>
<q-item-section avatar>
<q-btn
@click="setDeviceAttribute"
:label="$t('commit')"
no-caps
outline
color="primary"
/>
</q-item-section>
</q-item> </q-item>
<q-item> <q-item>
<q-item-section avatar> <q-item-section avatar>
@ -198,6 +211,9 @@ export default defineComponent({
const function_mirroring_output = ref( const function_mirroring_output = ref(
$store.state.custom_defines.function_mirroring_output $store.state.custom_defines.function_mirroring_output
); );
const function_magic_wall = ref(
$store.state.custom_defines.function_magic_wall
);
const target_language = ref("zh-CN"); const target_language = ref("zh-CN");
return { return {
@ -206,6 +222,7 @@ export default defineComponent({
function_center_control, function_center_control,
function_output_board, function_output_board,
function_custom_ISV, function_custom_ISV,
function_magic_wall,
function_mirroring_output, function_mirroring_output,
target_language, target_language,
@ -219,6 +236,8 @@ export default defineComponent({
$store.state.custom_defines.function_output_board; $store.state.custom_defines.function_output_board;
function_mirroring_output.value = function_mirroring_output.value =
$store.state.custom_defines.function_mirroring_output; $store.state.custom_defines.function_mirroring_output;
function_magic_wall.value =
$store.state.custom_defines.function_magic_wall;
}, },
resetData() { resetData() {
loading.value = false; loading.value = false;
@ -227,6 +246,7 @@ export default defineComponent({
function_output_board.value = false; function_output_board.value = false;
function_mirroring_output.value = false; function_mirroring_output.value = false;
function_custom_ISV.value = false; function_custom_ISV.value = false;
function_magic_wall.value=false;
}, },
restartDevice() { restartDevice() {
@ -319,6 +339,9 @@ export default defineComponent({
if (function_custom_ISV.value) { if (function_custom_ISV.value) {
attribute |= EDeviceAttribute.CustomISV; attribute |= EDeviceAttribute.CustomISV;
} }
if (function_magic_wall.value) {
attribute |= EDeviceAttribute.ProductMagicWall;
}
GlobalData.getInstance() GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()

File diff suppressed because it is too large Load Diff

View File

@ -303,6 +303,15 @@
:loading="loading" :loading="loading"
:disable="loading" :disable="loading"
/> />
<q-checkbox
v-model="function_magic_wall"
:label="$t('magic wall')"
color="cyan"
class="offset-md-1 col"
:loading="loading"
:disable="loading"
/>
</div> </div>
</q-item-section> </q-item-section>
</q-item> </q-item>
@ -419,6 +428,7 @@ export default defineComponent({
const function_output_board = ref(false); const function_output_board = ref(false);
const function_mirroring_output = ref(false); const function_mirroring_output = ref(false);
const function_custom_ISV = ref(false); const function_custom_ISV = ref(false);
const function_magic_wall = ref(false);
const trial_days = ref(0); const trial_days = ref(0);
const last_days = ref(0); const last_days = ref(0);
@ -441,6 +451,7 @@ export default defineComponent({
function_output_board.value = false; function_output_board.value = false;
function_mirroring_output.value = false; function_mirroring_output.value = false;
function_custom_ISV.value = false; function_custom_ISV.value = false;
function_magic_wall.value=false;
}; };
const showDialog = async () => { const showDialog = async () => {
@ -472,6 +483,9 @@ export default defineComponent({
$store.state.custom_defines.function_output_board; $store.state.custom_defines.function_output_board;
function_mirroring_output.value = function_mirroring_output.value =
$store.state.custom_defines.function_mirroring_output; $store.state.custom_defines.function_mirroring_output;
const function_magic_wall = ref(
$store.state.custom_defines.function_magic_wall
);
}; };
return { return {
@ -493,6 +507,7 @@ export default defineComponent({
server_address, server_address,
function_output_board, function_output_board,
function_custom_ISV, function_custom_ISV,
function_magic_wall,
function_center_control, function_center_control,
function_mirroring_output, function_mirroring_output,
target_language, target_language,
@ -621,6 +636,9 @@ export default defineComponent({
if (function_custom_ISV.value) { if (function_custom_ISV.value) {
attribute |= EDeviceAttribute.CustomISV; attribute |= EDeviceAttribute.CustomISV;
} }
if (function_magic_wall.value) {
attribute |= EDeviceAttribute.ProductMagicWall;
}
GlobalData.getInstance() GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()

View File

@ -1272,6 +1272,7 @@
<div <div
v-if=" v-if="
click_count >= target_click_count ||
click_count >= target_click_count || click_count >= target_click_count ||
$store.state.advanced_debug $store.state.advanced_debug
" "
@ -1721,7 +1722,6 @@ export default defineComponent({
current_time.value = date.formatDate(timeStamp, "HH:mm:ss"); current_time.value = date.formatDate(timeStamp, "HH:mm:ss");
} }
}; };
const refresh_output_board = async () => { const refresh_output_board = async () => {
const settings = await GlobalData.getInstance() const settings = await GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()
@ -1738,6 +1738,7 @@ export default defineComponent({
output_board_volume.value = settings.volume; output_board_volume.value = settings.volume;
output_board_mute.value = settings.mute ? $t.t("on") : $t.t("off"); output_board_mute.value = settings.mute ? $t.t("on") : $t.t("off");
{ {
output_board_resolution_options.value = []; output_board_resolution_options.value = [];
for (const item of Object.keys( for (const item of Object.keys(
@ -2021,6 +2022,9 @@ export default defineComponent({
const applyOutputBoard = async () => { const applyOutputBoard = async () => {
loading.value = true; loading.value = true;
const request = new Protocol.SetOutputBoardSettingRequestEntity(); const request = new Protocol.SetOutputBoardSettingRequestEntity();
const response = await GlobalData.getInstance()
.getCurrentClient()
?.getMagicWallConfig();
request.wall_col = parseInt(output_board_wall_col.value.toString()); request.wall_col = parseInt(output_board_wall_col.value.toString());
request.wall_row = parseInt(output_board_wall_row.value.toString()); request.wall_row = parseInt(output_board_wall_row.value.toString());
request.splicing = output_board_splicing.value == $t.t("on"); request.splicing = output_board_splicing.value == $t.t("on");
@ -2034,13 +2038,20 @@ export default defineComponent({
request.volume = parseInt(output_board_volume.value.toString()); request.volume = parseInt(output_board_volume.value.toString());
request.mute = output_board_mute.value == $t.t("on"); request.mute = output_board_mute.value == $t.t("on");
request.output_board_resolution = output_board_resolution.value; request.output_board_resolution = output_board_resolution.value;
let success = false; let success = false;
try { try {
await GlobalData.getInstance() await GlobalData.getInstance()
.getCurrentClient() .getCurrentClient()
?.setOutputBoardSetting(request); ?.setOutputBoardSetting(request);
success = true; success = true;
if ($store.state.custom_defines.function_magic_wall && response&&success) {
const output_length =
parseInt(output_board_wall_col.value.toString()) *
parseInt(output_board_wall_row.value.toString());
if (output_length != response.config.col * response.config.row) {
$store.commit("setShowMonitorList", []);
}
}
} catch {} } catch {}
$q.notify({ $q.notify({
color: success ? "positive" : "negative", color: success ? "positive" : "negative",
@ -2113,7 +2124,6 @@ export default defineComponent({
const applyUser = async () => { const applyUser = async () => {
loading.value = true; loading.value = true;
console.log("zzz");
const request = new Protocol.SetOutputBoardSettingRequestEntity(); const request = new Protocol.SetOutputBoardSettingRequestEntity();
request.wall_col = parseInt(output_board_wall_col.value.toString()); request.wall_col = parseInt(output_board_wall_col.value.toString());
request.wall_row = parseInt(output_board_wall_row.value.toString()); request.wall_row = parseInt(output_board_wall_row.value.toString());

View File

@ -22,7 +22,7 @@ export enum EDeviceAttribute {
Reserve18 = 0x00040000, Reserve18 = 0x00040000,
Reserve19 = 0x00080000, Reserve19 = 0x00080000,
Reserve20 = 0x00100000, Reserve20 = 0x00100000,
Reserve21 = 0x00200000, ProductMagicWall = 0x00200000,
Reserve22 = 0x00400000, Reserve22 = 0x00400000,
Reserve23 = 0x00800000, Reserve23 = 0x00800000,
Reserve24 = 0x01000000, Reserve24 = 0x01000000,

View File

@ -1,8 +1,8 @@
import RotatedRectF from "./RectF"; import RotatedRectF, { RotatedRectFWithIndex } from "./RectF";
export default class MagicWallConfig { export default class MagicWallConfig {
magic_wall_enable = false; magic_wall_enable = false;
row = 0; row = 0;
col = 0; col = 0;
windows: RotatedRectF[] = []; windows: RotatedRectFWithIndex[] = [];
} }

View File

@ -32,3 +32,11 @@ export class RotatedRectF extends RectF {
this.angle = angle; this.angle = angle;
} }
} }
export class RotatedRectFWithIndex extends RotatedRectF{
index:number=0;
percenter:number=0;
initial_h:number=0;
initial_w:number=0;
background_h:number=0;
background_w:number=0;
}

View File

@ -57,6 +57,7 @@ export default {
Accept: "Accept", Accept: "Accept",
"move speed": "Move Speed", "move speed": "Move Speed",
"y offset": "Y Offset", "y offset": "Y Offset",
"the number must be greater than 0":"the number must be greater than 0",
"pos x": "X Position", "pos x": "X Position",
"pos y": "Y Position", "pos y": "Y Position",
width: "Width", width: "Width",
@ -432,4 +433,14 @@ export default {
"verify key length is 6": "Verify Key Length Is 6", "verify key length is 6": "Verify Key Length Is 6",
server: "Server", server: "Server",
"set cloud server setting": "Set Cloud Server Setting", "set cloud server setting": "Set Cloud Server Setting",
"set magic wall":"Set Magic wall",
"update magic wall":"Update Magic Wall",
"magic wall":"Magic Wall",
"angle":"Angle",
"topology diagram":"Topology Diagram",
"physical central location":"Central Location",
"monitors list":"Monitors List",
"resize":"Resize",
"export magic":"Export"
}; };

View File

@ -499,7 +499,7 @@ export default {
Warning: "警告", Warning: "警告",
function: "功能", function: "功能",
commit: "提交", commit: "提交",
"set device function": "设置设备功能成功", "set device function": "设置设备功能",
operator_play_signal_source: "信号源", operator_play_signal_source: "信号源",
"toolbar edit window rect": "窗口大小", "toolbar edit window rect": "窗口大小",
exit: "退出", exit: "退出",
@ -700,4 +700,13 @@ export default {
"verify key length is 6": "校验码长度必须为6", "verify key length is 6": "校验码长度必须为6",
server: "服务", server: "服务",
"set cloud server setting": "设置云服务器", "set cloud server setting": "设置云服务器",
"set magic wall":"设置魔墙",
"update magic wall":"更新魔墙",
"magic wall":"魔墙",
"angle":"角度",
"topology diagram":"拓扑图",
"physical central location":"物理中心位置",
"monitors list":"显示器",
"resize":"缩放",
"export magic":"导出"
}; };

View File

@ -305,7 +305,7 @@
<q-item <q-item
clickable clickable
:disable="!$store.state.power_state" :disable="!$store.state.power_state"
v-if="$store.state.isLedPlayer()" v-if="$store.state.isLedPlayer()&&!$store.state.custom_defines.function_magic_wall"
v-close-popup v-close-popup
@click=" @click="
($store.state.isSpecialVideo() ($store.state.isSpecialVideo()
@ -322,6 +322,24 @@
{{ $t("grid setting") }} {{ $t("grid setting") }}
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item
clickable
:disable="!$store.state.power_state"
v-close-popup
@click="$refs.control_panel_dialog.showDialog()"
v-if="$store.state.custom_defines.function_magic_wall"
>
<q-item-section avatar>
<!-- <q-icon name="image" /> -->
<q-icon name="img:new_icon/file_manager.png" />
</q-item-section>
<q-item-section>
{{ $t("magic wall") }}
</q-item-section>
</q-item>
<q-item <q-item
clickable clickable
@ -478,6 +496,7 @@
v-if="$store.state.isSpecialVideo()" v-if="$store.state.isSpecialVideo()"
ref="special_video_grid_setting_dialog" ref="special_video_grid_setting_dialog"
/> />
<control-panel-dialog ref="control_panel_dialog" />
<background-image-dialog ref="background_image_dialog" /> <background-image-dialog ref="background_image_dialog" />
<subtitle-dialog ref="subtitle_dialog" /> <subtitle-dialog ref="subtitle_dialog" />
<recovery-database-dialog ref="recovery_database_dialog" /> <recovery-database-dialog ref="recovery_database_dialog" />
@ -519,6 +538,9 @@ import { useStore } from "src/store";
import FusionSettingsDialog from "src/components/FusionSettingsDialog.vue"; import FusionSettingsDialog from "src/components/FusionSettingsDialog.vue";
import GridSettingDialog from "src/components/GridSettingDialog.vue"; import GridSettingDialog from "src/components/GridSettingDialog.vue";
import SpecialVideoGridSettingDialog from "src/components/SpecialVideoGridSettingDialog.vue"; import SpecialVideoGridSettingDialog from "src/components/SpecialVideoGridSettingDialog.vue";
import ControlPanelDialog from "src/components/ControlPanelDialog.vue";
import BackgroundImageDialog from "src/components/BackgroundImageDialog.vue"; import BackgroundImageDialog from "src/components/BackgroundImageDialog.vue";
import RecoveryDatabaseDialog from "src/components/RecoveryDatabaseDialog.vue"; import RecoveryDatabaseDialog from "src/components/RecoveryDatabaseDialog.vue";
import UpgradeDialog from "src/components/UpgradeDialog.vue"; import UpgradeDialog from "src/components/UpgradeDialog.vue";
@ -550,6 +572,9 @@ export default defineComponent({
components: { components: {
GridSettingDialog, GridSettingDialog,
SpecialVideoGridSettingDialog, SpecialVideoGridSettingDialog,
ControlPanelDialog,
BackgroundImageDialog, BackgroundImageDialog,
RecoveryDatabaseDialog, RecoveryDatabaseDialog,
UpgradeDialog, UpgradeDialog,
@ -596,7 +621,7 @@ export default defineComponent({
let wendu: any = $store.state.fan_temp.toFixed(1); let wendu: any = $store.state.fan_temp.toFixed(1);
let sulv: any = 1 - wendu / 150; let sulv: any = 1 - wendu / 150;
return "rotate " + sulv + "s linear infinite"; return "rotate " + sulv + "s linear infinite";
}); });
const checkRegistered = () => { const checkRegistered = () => {
if ( if (
GlobalData.getInstance().getCurrentClient()?.is_connected && GlobalData.getInstance().getCurrentClient()?.is_connected &&

File diff suppressed because it is too large Load Diff

View File

@ -37,6 +37,7 @@ export class CustomDefines {
function_output_board = false; function_output_board = false;
function_center_control = false; function_center_control = false;
function_mirroring_output = false; function_mirroring_output = false;
function_magic_wall=false;
} }
export interface IWuJieEventBus { export interface IWuJieEventBus {
@ -53,7 +54,27 @@ export interface IWuJieInterface {
props: any; props: any;
bus: IWuJieEventBus; bus: IWuJieEventBus;
} }
class test_monitor {
w = 0.0;
h = 0.0;
currentx = 0.0;
currenty = 0.0;
centerx = 0.0;
centery = 0.0;
angle = 0;
id = 0;
constructor(id: number, w: number, h: number) {
this.currentx = 0.0;
this.currenty = 0.0;
this.angle = 0;
this.centerx = 0;
this.centery = 0;
this.id = id;
this.w = w;
this.h = h;
}
}
export interface StateInterface { export interface StateInterface {
// Define your own store structure, using submodules if needed // Define your own store structure, using submodules if needed
// example: ExampleStateInterface; // example: ExampleStateInterface;
@ -91,6 +112,7 @@ export interface StateInterface {
device_attribute: number; device_attribute: number;
power_state: boolean; power_state: boolean;
product_name: string; product_name: string;
show_monitor_list:test_monitor[];
custom_defines: CustomDefines; custom_defines: CustomDefines;
fusion_configuration: object; fusion_configuration: object;
isLedPlayer: () => boolean; isLedPlayer: () => boolean;
@ -359,7 +381,7 @@ export default store(function (/* { ssrContext } */) {
power_state: false, power_state: false,
fusion_configuration: {}, fusion_configuration: {},
product_name: EProductNames.LED_PLAYER, product_name: EProductNames.LED_PLAYER,
show_monitor_list:[],
custom_defines: new CustomDefines(), custom_defines: new CustomDefines(),
selected_projector: "0/0", selected_projector: "0/0",
EnableBlending: false, EnableBlending: false,
@ -380,6 +402,9 @@ export default store(function (/* { ssrContext } */) {
setInitialized(state: StateInterface, playload?: any) { setInitialized(state: StateInterface, playload?: any) {
state.initialized = true; state.initialized = true;
}, },
setShowMonitorList(state: StateInterface, playload?: any) {
state.show_monitor_list = playload
},
updateLandspace(state: StateInterface, playload?: any) { updateLandspace(state: StateInterface, playload?: any) {
if (typeof playload == "boolean") { if (typeof playload == "boolean") {
state.landspace = playload; state.landspace = playload;
@ -412,6 +437,8 @@ export default store(function (/* { ssrContext } */) {
(state.device_attribute & EDeviceAttribute.CenterControl) != 0; (state.device_attribute & EDeviceAttribute.CenterControl) != 0;
state.custom_defines.function_mirroring_output = state.custom_defines.function_mirroring_output =
(state.device_attribute & EDeviceAttribute.MirroringOutput) != 0; (state.device_attribute & EDeviceAttribute.MirroringOutput) != 0;
state.custom_defines.function_magic_wall =
(state.device_attribute & EDeviceAttribute.ProductMagicWall) != 0;
} }
}, },
setAvancedDebug(state: StateInterface, playload?: any) { setAvancedDebug(state: StateInterface, playload?: any) {