From fd904ffe7f4d2a578276da8aee4c88118eaff537 Mon Sep 17 00:00:00 2001 From: fangxiang Date: Tue, 18 Jan 2022 08:52:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E5=B9=95=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 6 +- src/App.vue | 13 - src/common/ClientConnection.ts | 6 - src/common/RemoteDataExangeProcesser.ts | 10 + src/components/SignalSourceDialog.vue | 7 + src/components/SubtitleDialog.vue | 55 ++- src/entities/SubtitleEntity.ts | 3 +- src/entities/WSProtocol.ts | 21 +- src/i18n/zh-CN/index.ts | 1 + src/pages/FooterPortrait.vue | 1 - src/pages/WallPage.vue | 2 - yarn.lock | 425 ++++++++++++++++-------- 12 files changed, 336 insertions(+), 214 deletions(-) diff --git a/package.json b/package.json index a006f62..7c7f5a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "media_player_client", - "version": "1.0.2", + "version": "1.0.3", "description": "A Quasar Framework app", "productName": "MediaPlayerClient", "author": "fangxiang ", @@ -15,14 +15,14 @@ "axios": "^0.21.1", "core-js": "^3.6.5", "element-resize-detector": "^1.2.3", - "quasar": "^2.3.4", + "quasar": "^2.4.2", "reconnecting-websocket": "^4.4.0", "v-viewer": "^3.0.9", "vue-i18n": "^9.0.0-beta.0", "vuex": "^4.0.1" }, "devDependencies": { - "@quasar/app": "^3.2.5", + "@quasar/app": "^3.2.6", "@types/node": "^10.17.15", "workbox-webpack-plugin": "^6.0.0" }, diff --git a/src/App.vue b/src/App.vue index 2ec7355..5479e4f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,19 +27,6 @@ export default defineComponent({ document.body.classList.add("overflow-hidden"); - const refreshFanTemp = async () => { - try { - const info = await GlobalData.getInstance() - .getCurrentClient() - ?.getUnimportantInfo(); - console.log(info); - if (info) { - $q.commit("setFanTemp", info.fan_temp); - } - } catch {} - }; - setInterval(refreshFanTemp, 1000 * 3); - return {}; }, }); diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 04a7af8..90e0aaa 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -653,12 +653,6 @@ export default class ClientConnection { ); } - public async getUnimportantInfo() { - return await this.doRpc( - new Protocol.GetUnimportantInfoRequestEntity(0) - ); - } - public restartDevice(delay_ms?: number) { this.ws?.send( JSON.stringify(new Protocol.RestartDeviceRequestEntity(delay_ms)) diff --git a/src/common/RemoteDataExangeProcesser.ts b/src/common/RemoteDataExangeProcesser.ts index f299e83..d5a8dd4 100644 --- a/src/common/RemoteDataExangeProcesser.ts +++ b/src/common/RemoteDataExangeProcesser.ts @@ -354,6 +354,16 @@ export default class RemoteDataExangeProcesser { } } break; + case Protocol.Commands.kFanTemperature: + { + const temp = JSON.parse( + notify.data + ) as Protocol.FanTemperatureNotifyEntity; + if (temp) { + $store.commit("setFanTemp", temp.fan_temp); + } + } + break; } } catch {} } diff --git a/src/components/SignalSourceDialog.vue b/src/components/SignalSourceDialog.vue index 4b6651b..ad4d7c8 100644 --- a/src/components/SignalSourceDialog.vue +++ b/src/components/SignalSourceDialog.vue @@ -277,6 +277,7 @@ import { reactive, onUnmounted, computed, + nextTick, } from "vue"; import { useStore } from "src/store"; import GlobalData from "src/common/GlobalData"; @@ -507,6 +508,12 @@ export default defineComponent({ let { path, file }: __I = obj; if (path && file) { item_data.media_url = path + "/" + file.name; + + if (item_data.name.trim() == "") { + nextTick(() => { + item_data.name = file.name; + }); + } } } }, diff --git a/src/components/SubtitleDialog.vue b/src/components/SubtitleDialog.vue index e770deb..a052246 100644 --- a/src/components/SubtitleDialog.vue +++ b/src/components/SubtitleDialog.vue @@ -49,14 +49,16 @@ - +