From f7af0d29c1be9df1148399c6b68f0248c8a5e008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Sun, 18 Aug 2024 07:25:37 -0700 Subject: [PATCH] widgets: Add Webcam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/components/EditMenu.vue | 2 + src/components/widgets/Webcam.vue | 104 ++++++++++++++++++++++++++++++ src/types/widgets.ts | 1 + 3 files changed, 107 insertions(+) create mode 100644 src/components/widgets/Webcam.vue diff --git a/src/components/EditMenu.vue b/src/components/EditMenu.vue index e358eba38..066a1610c 100644 --- a/src/components/EditMenu.vue +++ b/src/components/EditMenu.vue @@ -609,6 +609,7 @@ import MiniWidgetsBarImg from '@/assets/widgets/MiniWidgetsBar.png' import URLVideoPlayerImg from '@/assets/widgets/URLVideoPlayer.png' import VideoPlayerImg from '@/assets/widgets/VideoPlayer.png' import VirtualHorizonImg from '@/assets/widgets/VirtualHorizon.png' +import WebcamViewImg from '@/assets/widgets/WebcamView.png' import { useInteractionDialog } from '@/composables/interactionDialog' import { MavType } from '@/libs/connection/m2r/messages/mavlink2rest-enum' import { isHorizontalScroll } from '@/libs/utils' @@ -674,6 +675,7 @@ const widgetImages = { CompassHUD: CompassHUDImg, IFrame: IFrameImg, ImageView: ImageViewImg, + Webcam: WebcamViewImg, Map: MapImg, MiniWidgetsBar: MiniWidgetsBarImg, URLVideoPlayer: URLVideoPlayerImg, diff --git a/src/components/widgets/Webcam.vue b/src/components/widgets/Webcam.vue new file mode 100644 index 000000000..dfcae06a7 --- /dev/null +++ b/src/components/widgets/Webcam.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/src/types/widgets.ts b/src/types/widgets.ts index 23e2f704e..3475157a7 100644 --- a/src/types/widgets.ts +++ b/src/types/widgets.ts @@ -11,6 +11,7 @@ export enum WidgetType { CompassHUD = 'CompassHUD', IFrame = 'IFrame', ImageView = 'ImageView', + Webcam = 'Webcam', Map = 'Map', MiniWidgetsBar = 'MiniWidgetsBar', URLVideoPlayer = 'URLVideoPlayer',