From 6c91feaf3f95d38496dcbd116a3985952feec866 Mon Sep 17 00:00:00 2001 From: Declan Date: Sun, 16 Jan 2022 08:25:37 -0800 Subject: [PATCH] Make small cosmetic improvments across the user interface (#396) --- photon-client/src/App.vue | 93 ++++---- .../src/components/common/cv-image.vue | 6 +- .../src/components/common/cv-radio.vue | 48 +++-- .../components/common/cv-tooltipped-label.vue | 2 +- .../pipeline/CameraAndPipelineSelect.vue | 29 +-- photon-client/src/views/CamerasView.vue | 2 +- photon-client/src/views/PipelineView.vue | 57 +++-- .../src/views/PipelineViews/ContoursTab.vue | 201 +++++++++--------- .../src/views/PipelineViews/OutputTab.vue | 6 +- .../src/views/PipelineViews/ThresholdTab.vue | 108 +++++----- .../src/views/SettingsViews/General.vue | 4 +- .../src/views/SettingsViews/Networking.vue | 125 ++++++----- 12 files changed, 364 insertions(+), 317 deletions(-) diff --git a/photon-client/src/App.vue b/photon-client/src/App.vue index a11ef9774..2f33cff07 100644 --- a/photon-client/src/App.vue +++ b/photon-client/src/App.vue @@ -87,31 +87,56 @@ - Advanced Mode + Compact Mode
- mdi-server - - + + mdi-server + + + - - NetworkTables server running for {{$store.state.ntConnectionInfo.clients ? $store.state.ntConnectionInfo.clients : 'zero'}} clients! + + NetworkTables server running for {{ $store.state.ntConnectionInfo.clients ? $store.state.ntConnectionInfo.clients : 'zero' }} clients! - - Robot connected! {{$store.state.ntConnectionInfo.address}} + + Robot connected! {{ $store.state.ntConnectionInfo.address }} - + Not connected to robot! - {{"Team: " + $store.state.settings.networkSettings.teamNumber}} + + Team number is {{ $store.state.settings.networkSettings.teamNumber }} + @@ -121,9 +146,9 @@ mdi-wifi mdi-wifi-off @@ -135,7 +160,6 @@
- @@ -159,23 +183,27 @@ No team number set! PhotonVision cannot connect to your robot! Please - head to the settings page and set your team number. + + vist the settings tab + + and set your team number. @@ -219,12 +247,6 @@ export default { localStorage.setItem("compactMode", value); }, }, - // ...mapState({ - // ntServerMode: state => state.settings.networkSettings.runNTServer, - // ntClients: state => state.ntConnectionInfo.clients, - // ntConnected: state => state.ntConnectionInfo.connected, - // backendConnected: state => state.backendConnected - // }) }, created() { document.addEventListener("keydown", e => { @@ -319,8 +341,7 @@ export default { } } this.previouslySelectedIndices = null; - } -, + }, switchToSettingsTab() { this.axios.post('http://' + this.$address + '/api/sendMetrics', {}) } diff --git a/photon-client/src/components/common/cv-image.vue b/photon-client/src/components/common/cv-image.vue index e654466ea..366cc0827 100644 --- a/photon-client/src/components/common/cv-image.vue +++ b/photon-client/src/components/common/cv-image.vue @@ -13,7 +13,7 @@ export default { name: "CvImage", // eslint-disable-next-line vue/require-prop-types - props: ['address', 'scale', 'maxHeight', 'maxHeightMd', 'maxHeightXl', 'colorPicking', 'id', 'disconnected'], + props: ['address', 'scale', 'maxHeight', 'maxHeightMd', 'maxHeightLg', 'maxHeightXl', 'colorPicking', 'id', 'disconnected'], data() { return { seed: 1.0, @@ -37,7 +37,9 @@ if (this.$vuetify.breakpoint.xl) { ret["max-height"] = this.maxHeightXl; - } else if (this.$vuetify.breakpoint.mdAndUp) { + } else if (this.$vuetify.breakpoint.lg) { + ret["max-height"] = this.maxHeightLg; + } else if (this.$vuetify.breakpoint.md) { ret["max-height"] = this.maxHeightMd; } diff --git a/photon-client/src/components/common/cv-radio.vue b/photon-client/src/components/common/cv-radio.vue index 98963deb5..f0a6a0bad 100644 --- a/photon-client/src/components/common/cv-radio.vue +++ b/photon-client/src/components/common/cv-radio.vue @@ -1,28 +1,46 @@