From 91440a2341f04f479e237baf33d5597280ef22ba Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Thu, 11 Jul 2024 15:39:53 -0300 Subject: [PATCH] iframe: Use globally available default BlueOS address instead of own hardcoded version --- src/assets/defaults.ts | 3 ++- src/components/widgets/IFrame.vue | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/assets/defaults.ts b/src/assets/defaults.ts index baa1e943e..4f6bda1b1 100644 --- a/src/assets/defaults.ts +++ b/src/assets/defaults.ts @@ -30,7 +30,8 @@ export const defaultMiniWidgetManagerVars = { } const hostname = window.location.hostname -export const defaultGlobalAddress = hostname == '' || hostname == undefined ? 'blueos-avahi.local' : hostname +export const defaultBlueOsAddress = 'http://blueos-avahi.local' +export const defaultGlobalAddress = hostname == '' || hostname == undefined ? defaultBlueOsAddress : hostname export const widgetProfiles: Profile[] = [ { name: 'ROV default', diff --git a/src/components/widgets/IFrame.vue b/src/components/widgets/IFrame.vue index 113e27935..1f1ab3a06 100644 --- a/src/components/widgets/IFrame.vue +++ b/src/components/widgets/IFrame.vue @@ -47,6 +47,7 @@ import { useWindowSize } from '@vueuse/core' import { computed, defineProps, onBeforeMount, ref, toRefs, watch } from 'vue' +import { defaultBlueOsAddress } from '@/assets/defaults' import Snackbar from '@/components/Snackbar.vue' import { isValidURL } from '@/libs/utils' import { useWidgetManagerStore } from '@/stores/widgetManager' @@ -90,7 +91,7 @@ onBeforeMount(() => { } widget.value.options = { - source: 'http://blueos.local', + source: defaultBlueOsAddress, } })