@@ -12,11 +12,11 @@ import Tooltip from "@/components/ui/Tooltip.vue"
1212import Spinner from " @/components/ui/Spinner.vue"
1313
1414/** Constants */
15- import { StatusMap , StatusLabelMap , NodeSpeedMap , NodeSpeedLabelMap } from " @/services/constants/node.js"
15+ import { StatusMap , StatusLabelMap , NodeSpeedMap } from " @/services/constants/node.js"
1616
1717/** Services */
1818import amp from " @/services/amp"
19- import { comma } from " @/services/utils"
19+ import { comma , isMobile } from " @/services/utils"
2020
2121/** Stores */
2222import { useAppStore } from " @/store/app.js"
@@ -31,8 +31,6 @@ const notificationsStore = useNotificationsStore()
3131const showMobileWarning = useCookie (" showMobileWarning" , { default : () => true })
3232const showOnboardingBanner = useCookie (" showOnboardingBanner" , { default : () => true })
3333
34- const { isMobile } = useDevice ()
35-
3634const emit = defineEmits ([" onClose" ])
3735const props = defineProps ({
3836 show: Boolean ,
@@ -51,7 +49,7 @@ onMounted(async () => {
5149 const delayedStart = setTimeout (() => {
5250 handleStart ()
5351
54- amp .log (" sampling:autostartTrigger" , { network: networks[selectedNetwork .value ], mobile: isMobile })
52+ amp .log (" sampling:autostartTrigger" , { network: networks[selectedNetwork .value ], mobile: isMobile () })
5553
5654 setTimeout (() => {
5755 notificationsStore .create ({
@@ -89,7 +87,7 @@ onMounted(async () => {
8987 callback : () => {
9088 clearTimeout (delayedStart)
9189
92- amp .log (" sampling:cancelAutostart" , { network: networks[selectedNetwork .value ], mobile: isMobile })
90+ amp .log (" sampling:cancelAutostart" , { network: networks[selectedNetwork .value ], mobile: isMobile () })
9391 },
9492 },
9593 {
@@ -101,7 +99,7 @@ onMounted(async () => {
10199
102100 amp .log (" sampling:disableAutostartFromNotification" , {
103101 network: networks[selectedNetwork .value ],
104- mobile: isMobile,
102+ mobile: isMobile () ,
105103 })
106104 },
107105 },
@@ -338,7 +336,7 @@ const handleStop = () => {
338336}
339337const handleStart = async () => {
340338 nodeStore .status = StatusMap .Starting
341- amp .log (" sampling:start" , { network: networks[selectedNetwork .value ], mobile: isMobile })
339+ amp .log (" sampling:start" , { network: networks[selectedNetwork .value ], mobile: isMobile () })
342340
343341 try {
344342 const logVisual = (event ) => {
@@ -428,14 +426,14 @@ const handleStart = async () => {
428426 }, 1_000 )
429427
430428 nodeStore .status = StatusMap .Started
431- amp .log (" sampling:started" , { network: networks[selectedNetwork .value ], mobile: isMobile })
429+ amp .log (" sampling:started" , { network: networks[selectedNetwork .value ], mobile: isMobile () })
432430
433431 showDetails .value = true
434432
435433 pid .value = await node .value .local_peer_id ()
436434 } catch (error) {
437435 nodeStore .status = StatusMap .Failed
438- amp .log (" sampling:failed" , { network: networks[selectedNetwork .value ], mobile: isMobile })
436+ amp .log (" sampling:failed" , { network: networks[selectedNetwork .value ], mobile: isMobile () })
439437
440438 console .error (" Error initializing Node:" , error)
441439 console .dir (error)
@@ -446,7 +444,7 @@ watch(
446444 () => props .show ,
447445 () => {
448446 if (props .show ) {
449- amp .log (" sampling:open" , { network: networks[selectedNetwork .value ], mobile: isMobile })
447+ amp .log (" sampling:open" , { network: networks[selectedNetwork .value ], mobile: isMobile () })
450448 }
451449 },
452450)
@@ -583,7 +581,7 @@ watch(
583581 </Flex >
584582 </Flex >
585583
586- <Flex v-if =" isMobile && showMobileWarning" wide gap =" 8" :class =" $style.warning" >
584+ <Flex v-if =" isMobile() && showMobileWarning" wide gap =" 8" :class =" $style.warning" >
587585 <Icon name =" info" size =" 16" color =" yellow" />
588586
589587 <Flex direction =" column" gap =" 16" >
0 commit comments