Skip to content

Commit

Permalink
iframe: Use globally available default BlueOS address instead of own …
Browse files Browse the repository at this point in the history
…hardcoded version
  • Loading branch information
rafaellehmkuhl committed Jul 11, 2024
1 parent c5556c4 commit 91440a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/assets/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion src/components/widgets/IFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -90,7 +91,7 @@ onBeforeMount(() => {
}
widget.value.options = {
source: 'http://blueos.local',
source: defaultBlueOsAddress,
}
})
Expand Down

0 comments on commit 91440a2

Please sign in to comment.