|
|
|
@ -1,7 +1,7 @@ |
|
|
|
import type React from 'react'; |
|
|
|
import { useEffect } from 'react'; |
|
|
|
|
|
|
|
import { AnimatePresence, m } from 'framer-motion'; |
|
|
|
import { m } from 'framer-motion'; |
|
|
|
|
|
|
|
import { BLE } from '@components/connection/BLE'; |
|
|
|
import { HTTP } from '@components/connection/HTTP'; |
|
|
|
@ -49,17 +49,16 @@ export const Connection = (): JSX.Element => { |
|
|
|
}, [meshtasticState.ready, dispatch]); |
|
|
|
|
|
|
|
return ( |
|
|
|
<AnimatePresence> |
|
|
|
{appState.connectionModalOpen && ( |
|
|
|
<Modal |
|
|
|
title="Connect to a device" |
|
|
|
open={appState.connectionModalOpen} |
|
|
|
onClose={(): void => { |
|
|
|
dispatch(closeConnectionModal()); |
|
|
|
}} |
|
|
|
> |
|
|
|
<div className="flex max-w-3xl flex-col gap-4 md:flex-row"> |
|
|
|
<div className="md:w-1/2"> |
|
|
|
<div className="space-y-2"> |
|
|
|
<div className="flex flex-col md:w-1/2"> |
|
|
|
<div className="flex flex-grow flex-col space-y-2"> |
|
|
|
<Select |
|
|
|
label="Connection Method" |
|
|
|
optionsEnum={connType} |
|
|
|
@ -108,9 +107,7 @@ export const Connection = (): JSX.Element => { |
|
|
|
exit={{ opacity: 0 }} |
|
|
|
className="m-auto h-40 w-40 text-green-500" |
|
|
|
src={`/placeholders/${ |
|
|
|
appState.darkMode |
|
|
|
? 'View Code Dark.svg' |
|
|
|
: 'View Code.svg' |
|
|
|
appState.darkMode ? 'View Code Dark.svg' : 'View Code.svg' |
|
|
|
}`}
|
|
|
|
/> |
|
|
|
</div> |
|
|
|
@ -134,7 +131,5 @@ export const Connection = (): JSX.Element => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Modal> |
|
|
|
)} |
|
|
|
</AnimatePresence> |
|
|
|
); |
|
|
|
}; |
|
|
|
|