diff --git a/package.json b/package.json index b038358..7264846 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "media_player_client", - "version": "1.5.5", + "version": "1.5.6", "description": "A Quasar Framework app", "productName": "MediaPlayerClient", "author": "fangxiang ", @@ -22,7 +22,7 @@ "reconnecting-websocket": "^4.4.0", "sortablejs": "^1.15.0", "to": "^0.2.9", - "ts-md5": "^1.2.11", + "ts-md5": "^1.3.1", "update": "^0.7.4", "v-viewer": "^3.0.9", "vue": "^3.0.0", diff --git a/public/media_control_client_product.js b/public/media_control_client_product.js index e3fa936..0a5a8ac 100644 --- a/public/media_control_client_product.js +++ b/public/media_control_client_product.js @@ -1,2 +1,3 @@ -// window.media_control_client_product = "LED_PLAYER"; -window.media_control_client_product = "SPECIAL_VIDEO"; +window.media_control_client_product = "LED_PLAYER"; +// window.media_control_client_product = "SPECIAL_VIDEO"; +// window.media_control_client_product = "RK_3568"; diff --git a/public/new_icon/network_setting.png b/public/new_icon/network_setting.png index c8549ff..2a0e1f3 100644 Binary files a/public/new_icon/network_setting.png and b/public/new_icon/network_setting.png differ diff --git a/public/new_icon/timing_task.png b/public/new_icon/timing_task.png index ca0f24b..e55d75c 100644 Binary files a/public/new_icon/timing_task.png and b/public/new_icon/timing_task.png differ diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 23b8d75..68481fa 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -715,6 +715,26 @@ export default class ClientConnection { ); } + public setUserName(user_name: string) { + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity( + 0, + "user_name", + user_name + ) + ) + ); + } + + public setPassword(password: string) { + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity(0, "password", password) + ) + ); + } + public setSpecialVideoLayoutRotation(rotation: string) { this.ws?.send( JSON.stringify( diff --git a/src/components/SystemSettingDialog.vue b/src/components/SystemSettingDialog.vue index cb282f8..f4b43ea 100644 --- a/src/components/SystemSettingDialog.vue +++ b/src/components/SystemSettingDialog.vue @@ -46,6 +46,8 @@ indicator-color="primary" align="justify" narrow-indicator + outside-arrows + mobile-arrows class="bg-grey-2 text-teal" @update:model-value="onTabChanged" > @@ -98,6 +100,21 @@ :label="$t('output board setting')" :disable="loading" /> + + @@ -772,26 +789,6 @@ /> - - - - - - @@ -1022,6 +1019,229 @@ + + + + + + + + {{ + $t("user name") + ":" + }} + + + + + + {{ + $t("old password") + ":" + }} + + + + + + + + {{ + $t("new password") + ":" + }} + + + + + + + + + + + + + + + + + + + + {{ $t("product name") }}: + + + {{ $t("TV splicing box") }} + + + + + {{ $t("copyright") }}: + + + {{ $t("guangdong chuangxian jishu") }} LTD. + + + + {{ $t("client version") }}: + + + {{ client_version.version }} + + + + {{ $t("server version") }}: + + + {{ server_version }} + + + +
+ + {{ $t("server commit hash") }}: + + + {{ server_commit_hash }} + + + + {{ $t("server branch name") }}: + + + {{ server_branch_name }} + + + + {{ $t("server build date") }}: + + + {{ server_build_date }} + + + + {{ $t("kernel version") }}: + + + {{ kernel_version }} + + + + {{ $t("rootfs version") }}: + + + {{ rootfs_version }} + + +
+ + + + + + + + + + + + +
+
+
+
+
@@ -1101,6 +1321,18 @@ width: 20%; } +.width_5_5 { + width: 30%; +} + +.width_5_5_5 { + width: 35%; +} + +.width_5_6 { + width: 40%; +} + ._panel { padding: 3px; height: 60vh; @@ -1129,6 +1361,10 @@ import { AdvancedIpAddressEntity } from "src/entities/AdvancedIpAddressEntity"; import { EDeviceAttribute } from "src/entities/EDeviceAttribute"; +import version from "../../package.json"; + +import { Md5 } from "ts-md5"; + const _time_zones = [ "UTC-12(Central Pacific)", "UTC-11(Central Pacific)", @@ -1265,6 +1501,7 @@ export default defineComponent({ let other_form: Ref = ref(null); let graphics_form: Ref = ref(null); let output_board_form: Ref = ref(null); + const user_form: Ref = ref(null); let output_board_wall_row = ref(2); let output_board_wall_col = ref(2); @@ -1281,6 +1518,16 @@ export default defineComponent({ const timing_tasks: Ref = ref([]); + let click_count = ref(0); + const target_click_count = ref(30); + let client_version = ref(version); + let server_version = ref("unknow"); + let server_commit_hash = ref("unknow"); + let server_build_date = ref("unknow"); + let server_branch_name = ref("unknow"); + let kernel_version = ref("unknow"); + let rootfs_version = ref("unknow"); + const refresh_network = () => { const config = GlobalData.getInstance()?.applicationConfig; if (config) { @@ -1691,8 +1938,87 @@ export default defineComponent({ case "output_board": output_board_form.value.submit(); break; + case "user": + user_form.value.submit(); + break; } }; + + const applyUser = async () => { + loading.value = true; + console.log("zzz"); + const request = new Protocol.SetOutputBoardSettingRequestEntity(); + request.wall_col = parseInt(output_board_wall_col.value.toString()); + request.wall_row = parseInt(output_board_wall_row.value.toString()); + request.splicing = output_board_splicing.value == $t.t("on"); + request.vertical_blanking = parseInt( + output_board_vertical_blanking.value.toString() + ); + request.horizon_blanking = parseInt( + output_board_horizon_blanking.value.toString() + ); + request.rotate = parseInt(output_board_rotate.value.toString()); + request.volume = parseInt(output_board_volume.value.toString()); + request.mute = output_board_mute.value == $t.t("on"); + request.output_board_resolution = output_board_resolution.value; + + let success = false; + try { + const appconfig = GlobalData.getInstance().applicationConfig; + if ( + user_name.value.trim().length > 0 && + old_password.value.trim().length > 0 && + new_password.value.trim().length > 0 && + appconfig + ) { + const old_pwd = Md5.hashStr(old_password.value.trim()).toLowerCase(); + const new_pwd = Md5.hashStr(new_password.value.trim()).toLowerCase(); + if ( + appconfig.password && + appconfig.password.toLowerCase() == old_pwd + ) { + if (user_name.value.trim() != appconfig.user_name) { + GlobalData.getInstance() + .getCurrentClient() + ?.setUserName(user_name.value.trim()); + } + + if (new_pwd != old_pwd) { + GlobalData.getInstance().getCurrentClient()?.setPassword(new_pwd); + } + success = true; + } else { + $q.notify({ + color: "negative", + icon: "warning", + message: + $t.t("edit user or password") + + $t.t(" ") + + $t.t("fail") + + ", " + + $t.t("old password error") + + "!", + position: "top", + timeout: 2500, + }); + loading.value = false; + return; + } + } + } catch {} + $q.notify({ + color: success ? "positive" : "negative", + icon: success ? "done" : "warning", + message: + $t.t("edit user or password") + + (success ? $t.t("success") : $t.t("fail")) + + "!", + position: "top", + timeout: 2500, + }); + loading.value = false; + }; + const restoreOutputBoard = () => { GlobalData.getInstance().getCurrentClient()?.restoreOutputBoard(); }; @@ -1710,6 +2036,31 @@ export default defineComponent({ } }; + const user_name = ref( + GlobalData.getInstance().applicationConfig?.user_name ?? "admin" + ); + const old_password = ref(""); + const show_old_password = ref(false); + const new_password = ref(""); + const show_new_password = ref(false); + + watch( + () => tab.value, + (newV, oldV) => { + if (newV == "user") { + user_name.value = + GlobalData.getInstance().applicationConfig?.user_name ?? "admin"; + old_password.value = ""; + new_password.value = ""; + show_old_password.value = false; + show_new_password.value = false; + } + if (newV != "about") { + click_count.value = 0; + } + } + ); + return { show_dialog, e_week_Days: ref(EWeekDays), @@ -1761,7 +2112,22 @@ export default defineComponent({ other_form, graphics_form, output_board_form, + user_form, mirroring_output, + click_count, + target_click_count, + client_version, + server_version, + server_commit_hash, + server_build_date, + server_branch_name, + kernel_version, + rootfs_version, + user_name, + old_password, + new_password, + show_new_password, + show_old_password, refresh_all, apply, restoreOutputBoard, @@ -1769,6 +2135,7 @@ export default defineComponent({ applyGraphics, applyOther, applyOutputBoard, + applyUser, loga(a: any) { console.log(a); }, @@ -1785,8 +2152,26 @@ export default defineComponent({ }); refresh_all(); + + try { + GlobalData.getInstance() + .getCurrentClient() + ?.getBuildInfo() + ?.then((build_info) => { + if (build_info) { + server_version.value = build_info.version; + server_commit_hash.value = build_info.commit_hash; + server_build_date.value = build_info.build_date; + server_branch_name.value = build_info.branch_name; + kernel_version.value = build_info.kernel_version; + rootfs_version.value = build_info.rootfs_version; + } + }); + // console.log(build_info); + } catch {} }, resetData() { + click_count.value = 0; loading.value = false; tab.value = "network"; }, diff --git a/src/components/custom/ISVVideoWallDialog.vue b/src/components/custom/ISVVideoWallDialog.vue index 3240d33..4f70327 100644 --- a/src/components/custom/ISVVideoWallDialog.vue +++ b/src/components/custom/ISVVideoWallDialog.vue @@ -98,33 +98,32 @@ - -
+ +
-
+
-   HI: {{ (row - 1) * preview_cols + col }} +   HDMI Port: + {{ (row - 1) * preview_cols + col }}
(row - 1) * preview_cols + col - 1 " > -   SI: +   Splice Index: {{ (outputs[(row - 1) * preview_cols + col - 1] .output_index ?? (row - 1) * preview_cols + col) + 1 @@ -219,12 +218,21 @@