From a298f87ef5e5be42386ef57ba8bf3f027a80b174 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 12:03:32 +0300 Subject: [PATCH 01/28] Create connect device folder --- src/pages/ConnectDevicePage/ConnectDevicePage.stories.ts | 2 +- src/pages/CreateLocalNodePage/CreateLocalNodePage.stories.ts | 2 +- src/pages/PairDevice/PairDevice.stories.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/ConnectDevicePage/ConnectDevicePage.stories.ts b/src/pages/ConnectDevicePage/ConnectDevicePage.stories.ts index b9e2b668..7e31953b 100644 --- a/src/pages/ConnectDevicePage/ConnectDevicePage.stories.ts +++ b/src/pages/ConnectDevicePage/ConnectDevicePage.stories.ts @@ -4,7 +4,7 @@ import ConnectDevicePage from './ConnectDevicePage' import { withRouter } from 'storybook-addon-react-router-v6' const meta = { - title: 'Pages/ConnectDevicePage', + title: 'Connect-Device/ConnectDevicePage', component: ConnectDevicePage, parameters: { layout: 'centered', diff --git a/src/pages/CreateLocalNodePage/CreateLocalNodePage.stories.ts b/src/pages/CreateLocalNodePage/CreateLocalNodePage.stories.ts index 4405c851..f904da0c 100644 --- a/src/pages/CreateLocalNodePage/CreateLocalNodePage.stories.ts +++ b/src/pages/CreateLocalNodePage/CreateLocalNodePage.stories.ts @@ -4,7 +4,7 @@ import CreateLocalNodePage from './CreateLocalNodePage' import { withRouter } from 'storybook-addon-react-router-v6' const meta = { - title: 'Pages/CreateLocalNodePage', + title: 'Connect-Device/CreateLocalNodePage', component: CreateLocalNodePage, parameters: { layout: 'centered', diff --git a/src/pages/PairDevice/PairDevice.stories.ts b/src/pages/PairDevice/PairDevice.stories.ts index 1bb8e39a..ad58a98a 100644 --- a/src/pages/PairDevice/PairDevice.stories.ts +++ b/src/pages/PairDevice/PairDevice.stories.ts @@ -4,7 +4,7 @@ import { withRouter } from 'storybook-addon-react-router-v6' import PairDevice from './PairDevice' const meta = { - title: 'Pages/PairDevice', + title: 'Connect-Device/PairDevice', component: PairDevice, parameters: { layout: 'centered', From 46011eec7867d72a5ab3efc7eb409a68529ee70a Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 12:30:20 +0300 Subject: [PATCH 02/28] Update from new figma design --- public/icons/connection-blue.svg | 8 ++++++++ .../ConnectExistingInstance.tsx | 0 src/pages/PairDevice/PairDevice.tsx | 15 +++------------ 3 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 public/icons/connection-blue.svg create mode 100644 src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx diff --git a/public/icons/connection-blue.svg b/public/icons/connection-blue.svg new file mode 100644 index 00000000..bcab717c --- /dev/null +++ b/public/icons/connection-blue.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx new file mode 100644 index 00000000..e69de29b diff --git a/src/pages/PairDevice/PairDevice.tsx b/src/pages/PairDevice/PairDevice.tsx index d7915b0f..9d0ac96f 100644 --- a/src/pages/PairDevice/PairDevice.tsx +++ b/src/pages/PairDevice/PairDevice.tsx @@ -10,9 +10,9 @@ import CreateAvatar from '../../components/General/CreateAvatar/CreateAvatar' import GenerateId from './GenerateId' import { NodeIcon } from '@status-im/icons' import Header from '../../components/General/Header' +import Icon from '../../components/General/Icon' const PairDevice = () => { - const [autoChecked, setAutoChecked] = useState(false) const [isAwaitingPairing, setIsAwaitingPairing] = useState(false) const isPaired = false const isPairing = false @@ -41,19 +41,10 @@ const PairDevice = () => { )} - Settings + Advanced Settings - { - setAutoChecked(v) - }} - size={20} - /> - Auto Connect Paired Device + {isPaired && } From 110efe9d2851a0ff256c19988d745dbe23a0fffd Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 13:52:51 +0300 Subject: [PATCH 03/28] Create ConnectExistingInstance --- .../ConnectExistingInstance.tsx | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index e69de29b..e1aa6883 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -0,0 +1,62 @@ +import { Separator, XStack, YStack } from 'tamagui' +import { useState } from 'react' +import { Button, Checkbox, Text } from '@status-im/components' + +import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' +import SyncStatus from './SyncStatus' +import Titles from '../../components/General/Titles' + +import CreateAvatar from '../../components/General/CreateAvatar/CreateAvatar' +import GenerateId from './GenerateId' +import { NodeIcon } from '@status-im/icons' +import Header from '../../components/General/Header' +import Icon from '../../components/General/Icon' +import PairedSuccessfully from '../PairDevice/PairedSuccessfully' + +const ConnectExistingInstance = () => { + const [isAwaitingPairing, setIsAwaitingPairing] = useState(false) + const isPaired = false + const isPairing = false + + const changeSetIsAwaitingPairing = (result: boolean) => { + setIsAwaitingPairing(result) + } + + return ( + + +
+ + {/* {isPaired ? : } */} + {/* {!isPaired && ( + + )} */} + + + Advanced Settings + + + + + {isPaired && } + + + + + + + ) +} + +export default ConnectExistingInstance From a68283d658aeae714a34f17a9c1226b5f1b4bf1f Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 14:21:43 +0300 Subject: [PATCH 04/28] Style buttons and texts --- src/App.tsx | 5 ++++ .../ConnectExistingInstance.tsx | 23 +++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 337bcf2b..f433fcc2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -13,6 +13,7 @@ import PinnedNotification from './components/General/PinnedNottification' import { RootState } from './redux/store' import CreateLocalNodePage from './pages/CreateLocalNodePage/CreateLocalNodePage' import ValidatorOnboarding from './pages/ValidatorOnboarding/ValidatorOnboarding' +import ConnectExistingInstance from './pages/ConnectExistingInstance/ConnectExistingInstance' const router = createBrowserRouter([ { @@ -35,6 +36,10 @@ const router = createBrowserRouter([ path: '/pair-device', element: , }, + { + path: '/pair-existing-instance', + element: , + }, { path: '/create-local-node', element: }, { path: '/validator-onboarding', element: }, ]) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index e1aa6883..c814be18 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -1,14 +1,14 @@ import { Separator, XStack, YStack } from 'tamagui' import { useState } from 'react' -import { Button, Checkbox, Text } from '@status-im/components' +import { Button, Text } from '@status-im/components' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' -import SyncStatus from './SyncStatus' + import Titles from '../../components/General/Titles' import CreateAvatar from '../../components/General/CreateAvatar/CreateAvatar' -import GenerateId from './GenerateId' -import { NodeIcon } from '@status-im/icons' + +import { NodeIcon, SettingsIcon, CompleteIdIcon } from '@status-im/icons' import Header from '../../components/General/Header' import Icon from '../../components/General/Icon' import PairedSuccessfully from '../PairDevice/PairedSuccessfully' @@ -32,6 +32,19 @@ const ConnectExistingInstance = () => { >
+ + + Connect via IP + + + {/* {isPaired ? : } */} {/* {!isPaired && ( { Advanced Settings - + {isPaired && } From 7946fa393a7db29a17e00a23f465ae45b1551bd4 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 15:25:07 +0300 Subject: [PATCH 05/28] Create API token input field --- .../ConnectExistingInstance.tsx | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index c814be18..7696c8c6 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -1,6 +1,6 @@ import { Separator, XStack, YStack } from 'tamagui' import { useState } from 'react' -import { Button, Text } from '@status-im/components' +import { Button, Input, Text } from '@status-im/components' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' @@ -8,7 +8,7 @@ import Titles from '../../components/General/Titles' import CreateAvatar from '../../components/General/CreateAvatar/CreateAvatar' -import { NodeIcon, SettingsIcon, CompleteIdIcon } from '@status-im/icons' +import { NodeIcon, SettingsIcon, CompleteIdIcon, ClearIcon } from '@status-im/icons' import Header from '../../components/General/Header' import Icon from '../../components/General/Icon' import PairedSuccessfully from '../PairDevice/PairedSuccessfully' @@ -17,11 +17,11 @@ const ConnectExistingInstance = () => { const [isAwaitingPairing, setIsAwaitingPairing] = useState(false) const isPaired = false const isPairing = false + const [encryptedPassword, setEncryptedPassword] = useState('') const changeSetIsAwaitingPairing = (result: boolean) => { setIsAwaitingPairing(result) } - return ( { changeSetIsAwaitingPairing={changeSetIsAwaitingPairing} /> )} */} + + + + API Token + + + } + value={encryptedPassword} + onChangeText={changeEncryptedPasswordHandler} + /> + Advanced Settings From dedf4d3012572525aa6848c6f003e4b6ccd3ad3e Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 15:25:18 +0300 Subject: [PATCH 06/28] Add API Token handlers --- .../ConnectExistingInstance/ConnectExistingInstance.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index 7696c8c6..13a68f19 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -19,8 +19,11 @@ const ConnectExistingInstance = () => { const isPairing = false const [encryptedPassword, setEncryptedPassword] = useState('') - const changeSetIsAwaitingPairing = (result: boolean) => { - setIsAwaitingPairing(result) + const changeEncryptedPasswordHandler = (value: string) => { + setEncryptedPassword(value) + } + const clearEncryptedPasswordHandler = () => { + setEncryptedPassword('') } return ( @@ -65,6 +68,7 @@ const ConnectExistingInstance = () => { size={16} color="#A1ABBD" style={{ cursor: 'pointer' }} + onClick={clearEncryptedPasswordHandler} /> } value={encryptedPassword} From c9e5ef30a4c5cbff4b5b510e9f2b0c0e9455314e Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 15:37:44 +0300 Subject: [PATCH 07/28] clear code --- .../ConnectExistingInstance/ConnectExistingInstance.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index 13a68f19..b42c232d 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -48,14 +48,7 @@ const ConnectExistingInstance = () => { Advanced - {/* {isPaired ? : } */} - {/* {!isPaired && ( - - )} */} + From 42fe3132389e7d5c5a961dd14d67220bd89de843 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 16:56:41 +0300 Subject: [PATCH 08/28] Create ConnectExistingInctance.stories.tsx --- .../ConnectExistingInctance.stories.tsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/pages/ConnectExistingInstance/ConnectExistingInctance.stories.tsx diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInctance.stories.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInctance.stories.tsx new file mode 100644 index 00000000..2f22b83b --- /dev/null +++ b/src/pages/ConnectExistingInstance/ConnectExistingInctance.stories.tsx @@ -0,0 +1,21 @@ +import type { Meta, StoryObj } from '@storybook/react' + +import ConnectExistingInstance from './ConnectExistingInstance' +import { withRouter } from 'storybook-addon-react-router-v6' + +const meta = { + title: 'Connect-Device/ConnectExistingInstance', + component: ConnectExistingInstance, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + decorators: [withRouter], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Page: Story = { + args: {}, +} From 8972d8fa92d55472b00ab818baba26677f90408e Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 16:57:10 +0300 Subject: [PATCH 09/28] use tamagui Switch in Connect Existing Nimbus Instance --- .../ConnectExistingInstance.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index b42c232d..995694c9 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -1,4 +1,4 @@ -import { Separator, XStack, YStack } from 'tamagui' +import { Separator, Switch, XStack, YStack } from 'tamagui' import { useState } from 'react' import { Button, Input, Text } from '@status-im/components' @@ -18,10 +18,12 @@ const ConnectExistingInstance = () => { const isPaired = false const isPairing = false const [encryptedPassword, setEncryptedPassword] = useState('') + const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) const changeEncryptedPasswordHandler = (value: string) => { setEncryptedPassword(value) } + const clearEncryptedPasswordHandler = () => { setEncryptedPassword('') } @@ -48,7 +50,19 @@ const ConnectExistingInstance = () => { Advanced - + {/* two rows */} + + + Protocol + + setIsBeaconSwitchOn(prev => !prev)}> + + + + + + + From 31572de9b60f286e0be85bc873cab3ba9d486cc4 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 16:57:31 +0300 Subject: [PATCH 10/28] Style switch and Thumb --- src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index 995694c9..ed8fe512 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -55,8 +55,8 @@ const ConnectExistingInstance = () => { Protocol - setIsBeaconSwitchOn(prev => !prev)}> - + setIsBeaconSwitchOn(prev => !prev)}> + From 2013506f04ca930af8aab672085bbb7807d83d67 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 17:33:53 +0300 Subject: [PATCH 11/28] Clear code --- .../ConnectExistingInstance.tsx | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index ed8fe512..67d3647a 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -1,6 +1,6 @@ -import { Separator, Switch, XStack, YStack } from 'tamagui' +import { Separator, Stack, Switch, XStack, YStack } from 'tamagui' import { useState } from 'react' -import { Button, Input, Text } from '@status-im/components' +import { Button, Checkbox, Input, Text } from '@status-im/components' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' @@ -12,13 +12,11 @@ import { NodeIcon, SettingsIcon, CompleteIdIcon, ClearIcon } from '@status-im/ic import Header from '../../components/General/Header' import Icon from '../../components/General/Icon' import PairedSuccessfully from '../PairDevice/PairedSuccessfully' +import ClientAddressRow from './ClientAddressRow' const ConnectExistingInstance = () => { - const [isAwaitingPairing, setIsAwaitingPairing] = useState(false) const isPaired = false - const isPairing = false const [encryptedPassword, setEncryptedPassword] = useState('') - const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) const changeEncryptedPasswordHandler = (value: string) => { setEncryptedPassword(value) @@ -51,18 +49,7 @@ const ConnectExistingInstance = () => { {/* two rows */} - - - Protocol - - setIsBeaconSwitchOn(prev => !prev)}> - - - - - - - + @@ -89,10 +76,10 @@ const ConnectExistingInstance = () => { - {isPaired && } + - From 6cc33d598ed72655145b08acb031d983c5f539bc Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 17:34:04 +0300 Subject: [PATCH 12/28] Create ClientAddressRow.tsx --- .../ClientAddressRow.tsx | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/pages/ConnectExistingInstance/ClientAddressRow.tsx diff --git a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx new file mode 100644 index 00000000..593852f8 --- /dev/null +++ b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx @@ -0,0 +1,61 @@ +import { Input, Text } from "@status-im/components" +import { useState } from "react" +import { Checkbox, Stack, Switch, XStack, YStack } from "tamagui" + +const ClientAddressRow = () => { + const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) + const [inputAdress, setInputAdress] = useState('') + const [vcPort, setVcPort] = useState('') + const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) + + return ( + + + + + Protocol + (HTTP/HTTPS) + + + setIsBeaconSwitchOn(prev => !prev)}> + + + + + + Validator Client Address + + { }} + /> + + + + + VC Port + + { }} + /> + + + + setIsClientAddressChecked(prev => !prev)} + size={32} + /> + + + + + ) +} + +export default ClientAddressRow \ No newline at end of file From f6de3a708c677022f8deea694fc10e1cd599106c Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Fri, 22 Sep 2023 17:35:16 +0300 Subject: [PATCH 13/28] Create ClientAddressRow.stories.tsx --- .../ClientAddressRow.stories.tsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx diff --git a/src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx b/src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx new file mode 100644 index 00000000..45fd9f55 --- /dev/null +++ b/src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx @@ -0,0 +1,21 @@ +import type { Meta, StoryObj } from '@storybook/react' + +import ClientAddressRow from './ClientAddressRow' +import { withRouter } from 'storybook-addon-react-router-v6' + +const meta = { + title: 'Connect-Device/ClientAddressRow', + component: ClientAddressRow, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + decorators: [withRouter], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Page: Story = { + args: {}, +} From 82bdb38be66f3c09be68a7ac4615f9608fbc9264 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 09:24:18 +0300 Subject: [PATCH 14/28] Create Beacon Address row --- .../ConnectExistingInstance/BeaconAddress.tsx | 61 +++++++++++++++++++ .../ConnectExistingInstance.tsx | 6 +- 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 src/pages/ConnectExistingInstance/BeaconAddress.tsx diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.tsx new file mode 100644 index 00000000..11b4d14e --- /dev/null +++ b/src/pages/ConnectExistingInstance/BeaconAddress.tsx @@ -0,0 +1,61 @@ +import { Input, Text } from "@status-im/components" +import { useState } from "react" +import { Checkbox, Stack, Switch, XStack, YStack } from "tamagui" + +const BeackonAddress = () => { + const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) + const [inputAdress, setInputAdress] = useState('') + const [vcPort, setVcPort] = useState('') + const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) + + return ( + + + + + Protocol + (HTTP/HTTPS) + + + setIsBeaconSwitchOn(prev => !prev)}> + + + + + + Beacon Address + + { }} + /> + + + + + VC Port + + { }} + /> + + + + setIsClientAddressChecked(prev => !prev)} + size={32} + /> + + + + + ) +} + +export default BeackonAddress \ No newline at end of file diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index 67d3647a..ed4f0514 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -1,6 +1,6 @@ -import { Separator, Stack, Switch, XStack, YStack } from 'tamagui' +import { Separator, XStack, YStack } from 'tamagui' import { useState } from 'react' -import { Button, Checkbox, Input, Text } from '@status-im/components' +import { Button, Input, Text } from '@status-im/components' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' @@ -13,6 +13,7 @@ import Header from '../../components/General/Header' import Icon from '../../components/General/Icon' import PairedSuccessfully from '../PairDevice/PairedSuccessfully' import ClientAddressRow from './ClientAddressRow' +import BeackonAddress from './BeaconAddress' const ConnectExistingInstance = () => { const isPaired = false @@ -50,6 +51,7 @@ const ConnectExistingInstance = () => { {/* two rows */} + From 46556f71edcea4ab478cdf68634ff60b2f09b456 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 18:37:47 +0300 Subject: [PATCH 15/28] fix all inputs onChange event handler --- src/pages/ConnectExistingInstance/BeaconAddress.tsx | 8 ++++---- src/pages/ConnectExistingInstance/ClientAddressRow.tsx | 6 +++--- .../ConnectExistingInstance/ConnectExistingInstance.tsx | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.tsx index 11b4d14e..e901f283 100644 --- a/src/pages/ConnectExistingInstance/BeaconAddress.tsx +++ b/src/pages/ConnectExistingInstance/BeaconAddress.tsx @@ -7,7 +7,7 @@ const BeackonAddress = () => { const [inputAdress, setInputAdress] = useState('') const [vcPort, setVcPort] = useState('') const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) - + return ( @@ -23,12 +23,12 @@ const BeackonAddress = () => { - Beacon Address + Beacon Address { }} + onChangeText={(e) => { setInputAdress(e) }} /> @@ -39,7 +39,7 @@ const BeackonAddress = () => { { }} + onChangeText={(e) => { setVcPort(e) }} /> diff --git a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx index 593852f8..799bc678 100644 --- a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx +++ b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx @@ -7,7 +7,7 @@ const ClientAddressRow = () => { const [inputAdress, setInputAdress] = useState('') const [vcPort, setVcPort] = useState('') const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) - + return ( @@ -28,7 +28,7 @@ const ClientAddressRow = () => { { }} + onChangeText={(e) => { setInputAdress(e) }} /> @@ -39,7 +39,7 @@ const ClientAddressRow = () => { { }} + onChangeText={(e) => { setVcPort(e)}} /> diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index ed4f0514..1fd90a64 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -49,7 +49,6 @@ const ConnectExistingInstance = () => { Advanced - {/* two rows */} From 13bdc216cfb3dcc3f66a520330bcf79c2ea3e0db Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 18:38:47 +0300 Subject: [PATCH 16/28] fix warnings --- .../ConnectExistingInstance.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index 1fd90a64..36545bfb 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -1,22 +1,17 @@ import { Separator, XStack, YStack } from 'tamagui' import { useState } from 'react' import { Button, Input, Text } from '@status-im/components' - import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' import Titles from '../../components/General/Titles' - -import CreateAvatar from '../../components/General/CreateAvatar/CreateAvatar' - + import { NodeIcon, SettingsIcon, CompleteIdIcon, ClearIcon } from '@status-im/icons' import Header from '../../components/General/Header' -import Icon from '../../components/General/Icon' -import PairedSuccessfully from '../PairDevice/PairedSuccessfully' + import ClientAddressRow from './ClientAddressRow' import BeackonAddress from './BeaconAddress' const ConnectExistingInstance = () => { - const isPaired = false const [encryptedPassword, setEncryptedPassword] = useState('') const changeEncryptedPasswordHandler = (value: string) => { @@ -50,7 +45,7 @@ const ConnectExistingInstance = () => { - + From 13e8680a7c40756046672d2f5bb7ed97b8b09a52 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 18:58:47 +0300 Subject: [PATCH 17/28] Add Checkboxes --- src/pages/ConnectExistingInstance/BeaconAddress.tsx | 5 ++--- src/pages/ConnectExistingInstance/ClientAddressRow.tsx | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.tsx index e901f283..ede1fe08 100644 --- a/src/pages/ConnectExistingInstance/BeaconAddress.tsx +++ b/src/pages/ConnectExistingInstance/BeaconAddress.tsx @@ -1,6 +1,6 @@ -import { Input, Text } from "@status-im/components" +import { Checkbox, Input, Text } from "@status-im/components" import { useState } from "react" -import { Checkbox, Stack, Switch, XStack, YStack } from "tamagui" +import { Stack, Switch, XStack, YStack } from "tamagui" const BeackonAddress = () => { const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) @@ -43,7 +43,6 @@ const BeackonAddress = () => { /> - { const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) @@ -39,11 +39,10 @@ const ClientAddressRow = () => { { setVcPort(e)}} + onChangeText={(e) => { setVcPort(e) }} /> - Date: Mon, 25 Sep 2023 19:35:59 +0300 Subject: [PATCH 18/28] clear code --- src/pages/PairDevice/PairDevice.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/PairDevice/PairDevice.tsx b/src/pages/PairDevice/PairDevice.tsx index 9d0ac96f..a27e1ebb 100644 --- a/src/pages/PairDevice/PairDevice.tsx +++ b/src/pages/PairDevice/PairDevice.tsx @@ -1,6 +1,6 @@ import { Separator, XStack, YStack } from 'tamagui' import { useState } from 'react' -import { Button, Checkbox, Text } from '@status-im/components' +import { Button, Text } from '@status-im/components' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' import SyncStatus from './SyncStatus' From 8229810c1810f6c142f416584e7ce53bb22e18e6 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 21:14:39 +0300 Subject: [PATCH 19/28] Create BeaconAddress.stories.tsx --- .../BeaconAddress.stories.tsx | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx new file mode 100644 index 00000000..93242de0 --- /dev/null +++ b/src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx @@ -0,0 +1,21 @@ +import type { Meta, StoryObj } from '@storybook/react' + +import BeaconAddress from './BeaconAddress' +import { withRouter } from 'storybook-addon-react-router-v6' + +const meta = { + title: 'Connect-Device/BeaconAddress', + component: BeaconAddress, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + decorators: [withRouter], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Page: Story = { + args: {}, +} From a855b7d84fa39ca34069144fcd7e52e0110b62dc Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 21:46:38 +0300 Subject: [PATCH 20/28] Update ConnectExistingInstance.tsx --- .../ConnectExistingInstance.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index 36545bfb..71356c57 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -4,7 +4,7 @@ import { Button, Input, Text } from '@status-im/components' import PageWrapperShadow from '../../components/PageWrappers/PageWrapperShadow' import Titles from '../../components/General/Titles' - + import { NodeIcon, SettingsIcon, CompleteIdIcon, ClearIcon } from '@status-im/icons' import Header from '../../components/General/Header' @@ -17,10 +17,7 @@ const ConnectExistingInstance = () => { const changeEncryptedPasswordHandler = (value: string) => { setEncryptedPassword(value) } - - const clearEncryptedPasswordHandler = () => { - setEncryptedPassword('') - } + return ( { setEncryptedPassword('')} style={{ cursor: 'pointer' }} - onClick={clearEncryptedPasswordHandler} /> } value={encryptedPassword} @@ -72,7 +69,6 @@ const ConnectExistingInstance = () => { - + From efa356cbdcb89e8e21f432ebf0f317fbd5cc4730 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 22:20:06 +0300 Subject: [PATCH 22/28] fix import --- src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index a3d59cb2..ecd467e0 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -9,7 +9,7 @@ import { NodeIcon, SettingsIcon, CompleteIdIcon, ClearIcon } from '@status-im/ic import Header from '../../components/General/Header' import ClientAddressRow from './ClientAddressRow' -import BeackonAddress from './BeaconAddress' +import BeaconAddress from './BeaconAddress' const ConnectExistingInstance = () => { const [encryptedPassword, setEncryptedPassword] = useState('') @@ -42,7 +42,7 @@ const ConnectExistingInstance = () => { - + From 9a0338518070fcdcdb25e1b7708cc85b2b85076e Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 22:20:29 +0300 Subject: [PATCH 23/28] Style beaconAddress Switch and Switch thumb --- src/pages/ConnectExistingInstance/BeaconAddress.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.tsx index ede1fe08..262204e0 100644 --- a/src/pages/ConnectExistingInstance/BeaconAddress.tsx +++ b/src/pages/ConnectExistingInstance/BeaconAddress.tsx @@ -2,7 +2,7 @@ import { Checkbox, Input, Text } from "@status-im/components" import { useState } from "react" import { Stack, Switch, XStack, YStack } from "tamagui" -const BeackonAddress = () => { +const BeaconAddress = () => { const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) const [inputAdress, setInputAdress] = useState('') const [vcPort, setVcPort] = useState('') @@ -17,8 +17,8 @@ const BeackonAddress = () => { (HTTP/HTTPS) - setIsBeaconSwitchOn(prev => !prev)}> - + setIsBeaconSwitchOn(prev => !prev)}> + @@ -57,4 +57,4 @@ const BeackonAddress = () => { ) } -export default BeackonAddress \ No newline at end of file +export default BeaconAddress \ No newline at end of file From 91b91ddb88706986cf3ae5064f3521358da0e3a7 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 22:20:55 +0300 Subject: [PATCH 24/28] Style validator Address Switch and Switch thumb --- src/pages/ConnectExistingInstance/ClientAddressRow.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx index be65f7a9..1627c058 100644 --- a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx +++ b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx @@ -16,9 +16,8 @@ const ClientAddressRow = () => { Protocol (HTTP/HTTPS) - - setIsBeaconSwitchOn(prev => !prev)}> - + setIsBeaconSwitchOn(prev => !prev)}> + From 9f89b7b50267ce67569eff442ec6ee60d3fde3fc Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 25 Sep 2023 22:21:53 +0300 Subject: [PATCH 25/28] Style continue button --- src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index ecd467e0..30edf3f3 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -71,7 +71,7 @@ const ConnectExistingInstance = () => { - From 7cce79fcf9bdbbd074c1c207083dd56c53a11ca0 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Tue, 26 Sep 2023 09:28:11 +0300 Subject: [PATCH 26/28] Fix checkbox style --- src/pages/ConnectExistingInstance/BeaconAddress.tsx | 4 ++-- src/pages/ConnectExistingInstance/ClientAddressRow.tsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.tsx index 262204e0..159c43e7 100644 --- a/src/pages/ConnectExistingInstance/BeaconAddress.tsx +++ b/src/pages/ConnectExistingInstance/BeaconAddress.tsx @@ -42,13 +42,13 @@ const BeaconAddress = () => { onChangeText={(e) => { setVcPort(e) }} /> - + setIsClientAddressChecked(prev => !prev)} - size={32} + size={20} /> diff --git a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx index 1627c058..a13e53ae 100644 --- a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx +++ b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx @@ -41,13 +41,14 @@ const ClientAddressRow = () => { onChangeText={(e) => { setVcPort(e) }} /> - + setIsClientAddressChecked(prev => !prev)} - size={32} + size={20} + /> From fb94ca76d562c59dbc62951ea47a186552221d8d Mon Sep 17 00:00:00 2001 From: Rickard Andersson Date: Tue, 26 Sep 2023 13:01:02 +0300 Subject: [PATCH 27/28] style: format --- .../BeaconAddress.stories.tsx | 16 +-- .../ConnectExistingInstance/BeaconAddress.tsx | 134 ++++++++++------- .../ClientAddressRow.stories.tsx | 16 +-- .../ClientAddressRow.tsx | 135 +++++++++++------- .../ConnectExistingInstance.tsx | 128 ++++++++--------- src/pages/PairDevice/PairDevice.tsx | 5 +- 6 files changed, 246 insertions(+), 188 deletions(-) diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx index 93242de0..a6dae199 100644 --- a/src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx +++ b/src/pages/ConnectExistingInstance/BeaconAddress.stories.tsx @@ -4,18 +4,18 @@ import BeaconAddress from './BeaconAddress' import { withRouter } from 'storybook-addon-react-router-v6' const meta = { - title: 'Connect-Device/BeaconAddress', - component: BeaconAddress, - parameters: { - layout: 'centered', - }, - tags: ['autodocs'], - decorators: [withRouter], + title: 'Connect-Device/BeaconAddress', + component: BeaconAddress, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + decorators: [withRouter], } satisfies Meta export default meta type Story = StoryObj export const Page: Story = { - args: {}, + args: {}, } diff --git a/src/pages/ConnectExistingInstance/BeaconAddress.tsx b/src/pages/ConnectExistingInstance/BeaconAddress.tsx index 159c43e7..07b793fe 100644 --- a/src/pages/ConnectExistingInstance/BeaconAddress.tsx +++ b/src/pages/ConnectExistingInstance/BeaconAddress.tsx @@ -1,60 +1,88 @@ -import { Checkbox, Input, Text } from "@status-im/components" -import { useState } from "react" -import { Stack, Switch, XStack, YStack } from "tamagui" +import { Checkbox, Input, Text } from '@status-im/components' +import { useState } from 'react' +import { Stack, Switch, XStack, YStack } from 'tamagui' const BeaconAddress = () => { - const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) - const [inputAdress, setInputAdress] = useState('') - const [vcPort, setVcPort] = useState('') - const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) + const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) + const [inputAdress, setInputAdress] = useState('') + const [vcPort, setVcPort] = useState('') + const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) - return ( - - - - - Protocol - (HTTP/HTTPS) - + return ( + + + + + + {' '} + Protocol{' '} + + + {' '} + (HTTP/HTTPS) + + - setIsBeaconSwitchOn(prev => !prev)}> - - - - - - Beacon Address - - { setInputAdress(e) }} - /> - - - - - VC Port - - { setVcPort(e) }} - /> - - - setIsClientAddressChecked(prev => !prev)} - size={20} - /> - - - + setIsBeaconSwitchOn(prev => !prev)} + > + + - ) + + + Beacon Address + + { + setInputAdress(e) + }} + /> + + + + + VC Port + + { + setVcPort(e) + }} + /> + + + setIsClientAddressChecked(prev => !prev)} + size={20} + /> + + + + + ) } -export default BeaconAddress \ No newline at end of file +export default BeaconAddress diff --git a/src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx b/src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx index 45fd9f55..c6eff0ff 100644 --- a/src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx +++ b/src/pages/ConnectExistingInstance/ClientAddressRow.stories.tsx @@ -4,18 +4,18 @@ import ClientAddressRow from './ClientAddressRow' import { withRouter } from 'storybook-addon-react-router-v6' const meta = { - title: 'Connect-Device/ClientAddressRow', - component: ClientAddressRow, - parameters: { - layout: 'centered', - }, - tags: ['autodocs'], - decorators: [withRouter], + title: 'Connect-Device/ClientAddressRow', + component: ClientAddressRow, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + decorators: [withRouter], } satisfies Meta export default meta type Story = StoryObj export const Page: Story = { - args: {}, + args: {}, } diff --git a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx index a13e53ae..5fec41d0 100644 --- a/src/pages/ConnectExistingInstance/ClientAddressRow.tsx +++ b/src/pages/ConnectExistingInstance/ClientAddressRow.tsx @@ -1,60 +1,87 @@ -import { Checkbox, Input, Text } from "@status-im/components" -import { useState } from "react" -import { Stack, Switch, XStack, YStack } from "tamagui" +import { Checkbox, Input, Text } from '@status-im/components' +import { useState } from 'react' +import { Stack, Switch, XStack, YStack } from 'tamagui' const ClientAddressRow = () => { - const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) - const [inputAdress, setInputAdress] = useState('') - const [vcPort, setVcPort] = useState('') - const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) + const [isBeaconSwitchOn, setIsBeaconSwitchOn] = useState(false) + const [inputAdress, setInputAdress] = useState('') + const [vcPort, setVcPort] = useState('') + const [isClientAddressChecked, setIsClientAddressChecked] = useState(false) - return ( - - - - - Protocol - (HTTP/HTTPS) - - setIsBeaconSwitchOn(prev => !prev)}> - - - - - - Validator Client Address - - { setInputAdress(e) }} - /> - - - - - VC Port - - { setVcPort(e) }} - /> - - - setIsClientAddressChecked(prev => !prev)} - size={20} - - /> - - - + return ( + + + + + + {' '} + Protocol{' '} + + + {' '} + (HTTP/HTTPS) + + + setIsBeaconSwitchOn(prev => !prev)} + > + + - ) + + + Validator Client Address + + { + setInputAdress(e) + }} + /> + + + + + VC Port + + { + setVcPort(e) + }} + /> + + + setIsClientAddressChecked(prev => !prev)} + size={20} + /> + + + + + ) } -export default ClientAddressRow \ No newline at end of file +export default ClientAddressRow diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index 30edf3f3..a1e81385 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -12,72 +12,72 @@ import ClientAddressRow from './ClientAddressRow' import BeaconAddress from './BeaconAddress' const ConnectExistingInstance = () => { - const [encryptedPassword, setEncryptedPassword] = useState('') + const [encryptedPassword, setEncryptedPassword] = useState('') - const changeEncryptedPasswordHandler = (value: string) => { - setEncryptedPassword(value) - } + const changeEncryptedPasswordHandler = (value: string) => { + setEncryptedPassword(value) + } - return ( - - -
- - - - Connect via IP - - - - - - - - - API Token - - setEncryptedPassword('')} - style={{ cursor: 'pointer' }} - /> - } - value={encryptedPassword} - onChangeText={changeEncryptedPasswordHandler} - /> - - - - Advanced Settings - - - - - - - - - - - ) + return ( + + +
+ + + + Connect via IP + + + + + + + + + API Token + + setEncryptedPassword('')} + style={{ cursor: 'pointer' }} + /> + } + value={encryptedPassword} + onChangeText={changeEncryptedPasswordHandler} + /> + + + + Advanced Settings + + + + + + + + + + + ) } export default ConnectExistingInstance diff --git a/src/pages/PairDevice/PairDevice.tsx b/src/pages/PairDevice/PairDevice.tsx index a27e1ebb..d77ce79a 100644 --- a/src/pages/PairDevice/PairDevice.tsx +++ b/src/pages/PairDevice/PairDevice.tsx @@ -44,7 +44,10 @@ const PairDevice = () => { Advanced Settings - + {isPaired && } From 96553bc37d2ef7554144bc6387ae441bfbf03b7e Mon Sep 17 00:00:00 2001 From: Rickard Andersson Date: Tue, 26 Sep 2023 13:09:02 +0300 Subject: [PATCH 28/28] fix: fix errors after formatting lul prettier, JS ecosystem greatest --- src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx | 2 +- src/pages/PairDevice/PairDevice.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx index a1e81385..bb4ff43e 100644 --- a/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx +++ b/src/pages/ConnectExistingInstance/ConnectExistingInstance.tsx @@ -66,7 +66,7 @@ const ConnectExistingInstance = () => { diff --git a/src/pages/PairDevice/PairDevice.tsx b/src/pages/PairDevice/PairDevice.tsx index d77ce79a..b8fb90e5 100644 --- a/src/pages/PairDevice/PairDevice.tsx +++ b/src/pages/PairDevice/PairDevice.tsx @@ -45,8 +45,7 @@ const PairDevice = () => { {isPaired && }