|
| 1 | +import { EraseButton } from '@components/Button/EraseButton' |
| 2 | +import { OpenDocs } from '@components/Button/OpenDocs' |
| 3 | +import { WebSerial } from '@components/Button/WebSerial' |
| 4 | +import { FirmwareList } from '@components/FirmwareList' |
| 5 | +import { Form } from '@components/Form' |
| 6 | +import { useAppAPIContext } from '@src/store/context/api' |
| 7 | +import { useAppNotificationsContext } from '@src/store/context/notifications' |
| 8 | +import AppSettings from '@src/views/AppSettings' |
| 9 | + |
| 10 | +const AppSettingsPage = () => { |
| 11 | + let download: (firmware: string) => Promise<void> = () => Promise.resolve() |
| 12 | + |
| 13 | + const { downloadAsset } = useAppAPIContext() |
| 14 | + |
| 15 | + if (downloadAsset) download = downloadAsset |
| 16 | + |
| 17 | + const { handleSound } = useAppNotificationsContext() |
| 18 | + |
| 19 | + return ( |
| 20 | + <div class="flex justify-center items-center content-center flex-col pt-[100px] text-white"> |
| 21 | + <AppSettings |
| 22 | + onClickFlipLeftXAxis={() => console.log('onClickFlipLeftXAxis')} |
| 23 | + onClickFlipRightXAxis={() => { |
| 24 | + console.log('onClickFlipRightXAxis') |
| 25 | + }} |
| 26 | + onClickFlipYAxis={() => { |
| 27 | + console.log('onClickFlipYAxis') |
| 28 | + }} |
| 29 | + onClickDualEyeFalloff={() => { |
| 30 | + console.log('onClickDualEyeFalloff') |
| 31 | + }} |
| 32 | + onClickSyncBlinks={() => { |
| 33 | + console.log('onClickSyncBlinks') |
| 34 | + }} |
| 35 | + onClickBlobFallback={() => { |
| 36 | + console.log('onClickBlobFallback') |
| 37 | + }} |
| 38 | + onChange={(format, value) => { |
| 39 | + console.log(format, value) |
| 40 | + }} |
| 41 | + onChangeAddress={() => { |
| 42 | + console.log('onChangeAddress') |
| 43 | + }} |
| 44 | + onChangeOSCPort={() => { |
| 45 | + console.log('onChangeOSCPort') |
| 46 | + }} |
| 47 | + onChangeOSCReceiverPort={() => { |
| 48 | + console.log('onChangeOSCReceiverPort') |
| 49 | + }} |
| 50 | + onChangeOSCRecenterPort={() => { |
| 51 | + console.log('onChangeOSCRecenterPort') |
| 52 | + }} |
| 53 | + onChangeOSCRecalibrateAddress={() => { |
| 54 | + console.log('onChangeOSCRecalibrateAddress') |
| 55 | + }} |
| 56 | + /> |
| 57 | + <button |
| 58 | + class="rounded-[8px] bg-blue-700 p-2 text-white mt-1 hover:bg-blue-600 focus:bg-blue-500" |
| 59 | + onClick={() => { |
| 60 | + download('esp32AIThinker') |
| 61 | + console.log('[Download Asset]: Downloading...') |
| 62 | + }}> |
| 63 | + Download Release Asset |
| 64 | + </button> |
| 65 | + <button |
| 66 | + class="rounded-[8px] bg-blue-700 p-2 text-white mt-1 hover:bg-blue-600 focus:bg-blue-500" |
| 67 | + onClick={() => { |
| 68 | + handleSound('EyeTrackApp_Audio_start.wav') |
| 69 | + console.log('[Audio Handler]: Sound Played') |
| 70 | + }}> |
| 71 | + Play Sound |
| 72 | + </button> |
| 73 | + <EraseButton /> |
| 74 | + <WebSerial /> |
| 75 | + <OpenDocs /> |
| 76 | + <FirmwareList /> |
| 77 | + <Form /> |
| 78 | + </div> |
| 79 | + ) |
| 80 | +} |
| 81 | + |
| 82 | +export default AppSettingsPage |
0 commit comments