From 0338efd914272524a36a0f1479ba96de9e18984f Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Tue, 2 Nov 2021 22:12:57 +0100 Subject: [PATCH] feature: move webcams to new db namespace (#401) * refactor: create store for seperate webcam namespace Signed-off-by: Stefan Dej * refactor: update settings webcam and webcam panel to new namespace / store modules Signed-off-by: Stefan Dej * fix: types in webcam namespace Signed-off-by: Stefan Dej * feat: hide webcam panel, if no webcam is in the db Signed-off-by: Stefan Dej * refactor: remove debug output in settings webcam tab Signed-off-by: Stefan Dej * fix: margin between DependenciesPanel.vue and next panel Signed-off-by: Stefan Dej --- src/components/TheSidebar.vue | 2 +- src/components/panels/DependenciesPanel.vue | 1 - src/components/panels/WebcamPanel.vue | 60 ++++++------ .../settings/SettingsUiSettingsTab.vue | 12 +++ src/components/settings/SettingsWebcamTab.vue | 98 ++++++++++--------- src/components/webcams/Ipstreamer.vue | 2 +- src/components/webcams/Mjpegstreamer.vue | 2 +- .../webcams/MjpegstreamerAdaptive.vue | 3 +- src/components/webcams/Uv4lMjpeg.vue | 6 +- src/components/webcams/WebcamGrid.vue | 14 +-- src/locales/en.json | 5 +- src/pages/Webcam.vue | 2 +- src/store/gui/actions.ts | 60 +++++------- src/store/gui/getters.ts | 14 +-- src/store/gui/index.ts | 25 +++-- src/store/gui/mutations.ts | 43 +------- src/store/gui/types.ts | 22 ++--- src/store/gui/webcam/actions.ts | 48 +++++++++ src/store/gui/webcam/getters.ts | 15 +++ src/store/gui/webcam/index.ts | 23 +++++ src/store/gui/webcam/mutations.ts | 33 +++++++ src/store/gui/webcam/types.ts | 17 ++++ 22 files changed, 301 insertions(+), 206 deletions(-) create mode 100644 src/store/gui/webcam/actions.ts create mode 100644 src/store/gui/webcam/getters.ts create mode 100644 src/store/gui/webcam/index.ts create mode 100644 src/store/gui/webcam/mutations.ts create mode 100644 src/store/gui/webcam/types.ts diff --git a/src/components/TheSidebar.vue b/src/components/TheSidebar.vue index 3fd5cbac..fecc3330 100644 --- a/src/components/TheSidebar.vue +++ b/src/components/TheSidebar.vue @@ -127,7 +127,7 @@ export default class TheSidebar extends Mixins(BaseMixin) { } get boolNaviWebcam(): boolean { - return this.$store.state.gui.webcam.boolNavi + return this.$store.state.gui.webcamSettings.boolNavi } get moonrakerComponents(): string[] { diff --git a/src/components/panels/DependenciesPanel.vue b/src/components/panels/DependenciesPanel.vue index 80d8a503..f375b7d2 100644 --- a/src/components/panels/DependenciesPanel.vue +++ b/src/components/panels/DependenciesPanel.vue @@ -6,7 +6,6 @@ :collapsible="true" card-class="dependencies-panel" toolbar-color="orange darken-2" - class="mb-6 mb-md-9" > diff --git a/src/components/panels/WebcamPanel.vue b/src/components/panels/WebcamPanel.vue index 6e33f61e..e6b78843 100644 --- a/src/components/panels/WebcamPanel.vue +++ b/src/components/panels/WebcamPanel.vue @@ -20,7 +20,7 @@ - + mdi-view-grid @@ -28,7 +28,7 @@ {{ $t('Panels.WebcamPanel.All') }} - + {{ webcam.icon }} @@ -42,19 +42,19 @@ -