Skip to content

Commit

Permalink
Edit Mode: Fix widget images realtive paths
Browse files Browse the repository at this point in the history
Signed-off-by: Arturo Manzoli <[email protected]>
  • Loading branch information
ArturoManzoli authored and rafaellehmkuhl committed Jul 23, 2024
1 parent a6f8040 commit d479ce4
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/components/EditMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
<div />
<img
v-bind="tooltipProps"
:src="`../src/assets/widgets/${widgetType}.png`"
:src="widgetImages[widgetType]"
alt="widget-icon"
class="p-4 max-h-[75%] max-w-[95%]"
/>
Expand Down Expand Up @@ -589,6 +589,17 @@ import { defaultMiniWidgetManagerVars } from '@/assets/defaults'
import BoatThumb from '@/assets/vehicles/BlueBoat_thumb.png'
import BlueRoboticsLogo from '@/assets/vehicles/BlueRoboticsLogo.png'
import RovThumb from '@/assets/vehicles/BlueROV_thumb.png'
import AttitudeImg from '@/assets/widgets/Attitude.png'
import CompassImg from '@/assets/widgets/Compass.png'
import CompassHUDImg from '@/assets/widgets/CompassHUD.png'
import DepthHUDImg from '@/assets/widgets/DepthHUD.png'
import IFrameImg from '@/assets/widgets/IFrame.png'
import ImageViewImg from '@/assets/widgets/ImageView.png'
import MapImg from '@/assets/widgets/Map.png'
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 { useInteractionDialog } from '@/composables/interactionDialog'
import { MavType } from '@/libs/connection/m2r/messages/mavlink2rest-enum'
import { isHorizontalScroll } from '@/libs/utils'
Expand Down Expand Up @@ -647,6 +658,20 @@ const availableMiniWidgetTypes = computed(() =>
}))
)
const widgetImages = {
Attitude: AttitudeImg,
Compass: CompassImg,
DepthHUD: DepthHUDImg,
CompassHUD: CompassHUDImg,
IFrame: IFrameImg,
ImageView: ImageViewImg,
Map: MapImg,
MiniWidgetsBar: MiniWidgetsBarImg,
URLVideoPlayer: URLVideoPlayerImg,
VideoPlayer: VideoPlayerImg,
VirtualHorizon: VirtualHorizonImg,
}
const confirmDelete = async (): Promise<void> => {
showDialog({
maxWidth: '500px',
Expand Down

0 comments on commit d479ce4

Please sign in to comment.