diff --git a/src/stores/mainVehicle.ts b/src/stores/mainVehicle.ts index ee8e6af49..bfbaa3a5c 100644 --- a/src/stores/mainVehicle.ts +++ b/src/stores/mainVehicle.ts @@ -1,4 +1,4 @@ -import { useTimestamp, watchThrottled } from '@vueuse/core' +import { useStorage, useTimestamp, watchThrottled } from '@vueuse/core' import { defineStore } from 'pinia' import { computed, reactive, ref, watch } from 'vue' @@ -64,7 +64,7 @@ export const useMainVehicleStore = defineStore('main-vehicle', () => { const ws_protocol = location?.protocol === 'https:' ? 'wss' : 'ws' const cpuLoad = ref() - const globalAddress = useBlueOsStorage('cockpit-vehicle-address', defaultGlobalAddress) + const globalAddress = useStorage('cockpit-vehicle-address', defaultGlobalAddress) const defaultMainConnectionURI = ref(`${ws_protocol}://${globalAddress.value}/mavlink2rest/ws/mavlink`) const defaultWebRTCSignallingURI = ref(`${ws_protocol}://${globalAddress.value}:6021/`) diff --git a/src/stores/widgetManager.ts b/src/stores/widgetManager.ts index 3d9b5a48e..10d3063a7 100644 --- a/src/stores/widgetManager.ts +++ b/src/stores/widgetManager.ts @@ -1,6 +1,6 @@ import '@/libs/cosmos' -import { useDebounceFn, useWindowSize } from '@vueuse/core' +import { useDebounceFn, useStorage, useWindowSize } from '@vueuse/core' import { saveAs } from 'file-saver' import { defineStore } from 'pinia' import Swal from 'sweetalert2' @@ -50,8 +50,8 @@ export const useWidgetManagerStore = defineStore('widget-manager', () => { const gridInterval = ref(0.01) const currentMiniWidgetsProfile = useBlueOsStorage('cockpit-mini-widgets-profile-v4', miniWidgetsProfile) const savedProfiles = useBlueOsStorage(savedProfilesKey, []) - const currentViewIndex = useBlueOsStorage('cockpit-current-view-index', 0) - const currentProfileIndex = useBlueOsStorage('cockpit-current-profile-index', 0) + const currentViewIndex = useStorage('cockpit-current-view-index', 0) + const currentProfileIndex = useStorage('cockpit-current-profile-index', 0) const desiredTopBarHeightPixels = ref(48) const desiredBottomBarHeightPixels = ref(48) const visibleAreaMinClearancePixels = ref(20)