From ca4db52c7196754abb0092c1a725848442dd9364 Mon Sep 17 00:00:00 2001 From: FME849 <1414439@gmail.com> Date: Tue, 4 Apr 2023 22:33:32 +0700 Subject: [PATCH 1/8] minor UI update in request connection --- apps/web/src/routing.tsx | 4 ++-- apps/web/src/screens/Request/Connection/index.tsx | 10 ++++------ apps/web/src/screens/Request/shared.ts | 2 ++ 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 apps/web/src/screens/Request/shared.ts diff --git a/apps/web/src/routing.tsx b/apps/web/src/routing.tsx index 4aaa3918c..9df48aebd 100644 --- a/apps/web/src/routing.tsx +++ b/apps/web/src/routing.tsx @@ -2,7 +2,7 @@ import { createHashRouter } from 'react-router-dom'; import DashboardScreen from './screens/Dashboard'; import ProfileScreen from './screens/Profile'; -import RequestConnectionScreen from './screens/Request/Connection'; +import RequestConnection from './screens/Request/Connection'; export const router = createHashRouter([ { @@ -15,6 +15,6 @@ export const router = createHashRouter([ }, { path: '/request-connection', - element: , + element: , }, ]); diff --git a/apps/web/src/screens/Request/Connection/index.tsx b/apps/web/src/screens/Request/Connection/index.tsx index 832991307..6c2e584a9 100644 --- a/apps/web/src/screens/Request/Connection/index.tsx +++ b/apps/web/src/screens/Request/Connection/index.tsx @@ -3,11 +3,9 @@ import { Image } from '@walless/gui'; import { HeaderRequest } from '../../../components/HeaderRequest'; import LightText from '../../../components/LightText'; +import { logoSize, logoUri } from '../shared'; -const logoSize = 60; -const logoUri = { uri: '/img/app_logo.png' }; - -const RequestConnectionScreen = () => { +const RequestConnection = () => { return ( @@ -32,7 +30,7 @@ const RequestConnectionScreen = () => { underrealm.stormgate.io - + Under Realm would like to connect with your Walless account to: @@ -80,4 +78,4 @@ const RequestConnectionScreen = () => { ); }; -export default RequestConnectionScreen; +export default RequestConnection; diff --git a/apps/web/src/screens/Request/shared.ts b/apps/web/src/screens/Request/shared.ts new file mode 100644 index 000000000..62ad1e79e --- /dev/null +++ b/apps/web/src/screens/Request/shared.ts @@ -0,0 +1,2 @@ +export const logoSize = 60; +export const logoUri = { uri: '/img/app_logo.png' }; From 0931b44df14da3dce93a29cb5a1d46ca4ab2a269 Mon Sep 17 00:00:00 2001 From: FME849 <1414439@gmail.com> Date: Tue, 4 Apr 2023 22:35:22 +0700 Subject: [PATCH 2/8] add request signature --- apps/web/src/routing.tsx | 5 ++ .../src/screens/Request/Signature/index.tsx | 69 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 apps/web/src/screens/Request/Signature/index.tsx diff --git a/apps/web/src/routing.tsx b/apps/web/src/routing.tsx index 9df48aebd..9b28729ca 100644 --- a/apps/web/src/routing.tsx +++ b/apps/web/src/routing.tsx @@ -3,6 +3,7 @@ import { createHashRouter } from 'react-router-dom'; import DashboardScreen from './screens/Dashboard'; import ProfileScreen from './screens/Profile'; import RequestConnection from './screens/Request/Connection'; +import RequestSignature from './screens/Request/Signature'; export const router = createHashRouter([ { @@ -17,4 +18,8 @@ export const router = createHashRouter([ path: '/request-connection', element: , }, + { + path: '/request-signature', + element: , + }, ]); diff --git a/apps/web/src/screens/Request/Signature/index.tsx b/apps/web/src/screens/Request/Signature/index.tsx new file mode 100644 index 000000000..5fc5bd74e --- /dev/null +++ b/apps/web/src/screens/Request/Signature/index.tsx @@ -0,0 +1,69 @@ +import { AlertCircle, Button, Image, Stack, Text } from '@walless/gui'; + +import { HeaderRequest } from '../../../components/HeaderRequest'; +import LightText from '../../../components/LightText'; +import { logoSize, logoUri } from '../shared'; + +export const RequestSignature = () => { + return ( + + + + + + + Your signature has been requested + + + + Under Realm + + underrealm.stormgate.io + + + + + + Message: + + + + + [Custom message] Sign this message to prove that you have accessed + to this wallet account and we’ll log you in. This won’t cost you + anything! [Seal code: r3092850297] + + + + + + Only connect to websites you trust! + + + + + + + ); +}; + +export default RequestSignature; From 308fc8de1149e78b34aaae437a9582f11aebeb0a Mon Sep 17 00:00:00 2001 From: FME849 <1414439@gmail.com> Date: Tue, 4 Apr 2023 23:17:00 +0700 Subject: [PATCH 3/8] add HyperLink component to gui package --- packages/gui/components/HyperLink.tsx | 36 +++++++++++++++++++++++++++ packages/gui/index.ts | 1 + 2 files changed, 37 insertions(+) create mode 100644 packages/gui/components/HyperLink.tsx diff --git a/packages/gui/components/HyperLink.tsx b/packages/gui/components/HyperLink.tsx new file mode 100644 index 000000000..6ad89fe10 --- /dev/null +++ b/packages/gui/components/HyperLink.tsx @@ -0,0 +1,36 @@ +import { FC } from 'react'; +import { GetProps, styled } from '@tamagui/core'; + +import { Text } from './styled'; + +interface Props { + title?: string; + onPress?: () => void; +} + +export const HyperLink: FC = ({ + title, + onPress, + ...props +}) => { + return ( + + {title || 'Link'} + + ); +}; + +export default HyperLink; + +export const HyperLinkFrame = styled(Text, { + color: '#0694D3', + hoverStyle: { + cursor: 'pointer', + textDecorationLine: 'underline', + }, + focusStyle: { + textDecorationLine: 'underline', + }, +}); + +type HyperLinkProps = GetProps; diff --git a/packages/gui/index.ts b/packages/gui/index.ts index fb9c26c35..95d6c80b9 100644 --- a/packages/gui/index.ts +++ b/packages/gui/index.ts @@ -1,5 +1,6 @@ export * from './components/Anchor'; export * from './components/Button'; +export * from './components/HyperLink'; export * from './components/ModalManager'; export * from './components/Provider'; export * from './components/styled'; From 66a1295d2550099c6d990b899529e7ca9af51abd Mon Sep 17 00:00:00 2001 From: FME849 <1414439@gmail.com> Date: Tue, 4 Apr 2023 23:17:19 +0700 Subject: [PATCH 4/8] add request layout --- apps/web/src/routing.tsx | 5 + apps/web/src/screens/Request/Layout/index.tsx | 92 +++++++++++++++++++ .../src/screens/Request/Signature/index.tsx | 4 +- 3 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 apps/web/src/screens/Request/Layout/index.tsx diff --git a/apps/web/src/routing.tsx b/apps/web/src/routing.tsx index 9b28729ca..e45487558 100644 --- a/apps/web/src/routing.tsx +++ b/apps/web/src/routing.tsx @@ -3,6 +3,7 @@ import { createHashRouter } from 'react-router-dom'; import DashboardScreen from './screens/Dashboard'; import ProfileScreen from './screens/Profile'; import RequestConnection from './screens/Request/Connection'; +import RequestLayout from './screens/Request/Layout'; import RequestSignature from './screens/Request/Signature'; export const router = createHashRouter([ @@ -22,4 +23,8 @@ export const router = createHashRouter([ path: '/request-signature', element: , }, + { + path: '/request-layout', + element: , + }, ]); diff --git a/apps/web/src/screens/Request/Layout/index.tsx b/apps/web/src/screens/Request/Layout/index.tsx new file mode 100644 index 000000000..fcf659baa --- /dev/null +++ b/apps/web/src/screens/Request/Layout/index.tsx @@ -0,0 +1,92 @@ +import { + AlertCircle, + Button, + HyperLink, + Image, + Stack, + Text, +} from '@walless/gui'; + +import { HeaderRequest } from '../../../components/HeaderRequest'; +import LightText from '../../../components/LightText'; +import { logoSize, logoUri } from '../shared'; + +export const RequestLayout = () => { + return ( + + + + + + + Layout request + + + + Under Realm + + underrealm.stormgate.io + + + + + Under Realm would like to add its custom layout appearance to your + Walless account. + + + + + + + + + + + + This action does not make any fund transfer. This site cannot + transfer fund without your permission. + + + + + + Only connect to websites you trust! + + + + + + + + + + + ); +}; + +export default RequestLayout; diff --git a/apps/web/src/screens/Request/Signature/index.tsx b/apps/web/src/screens/Request/Signature/index.tsx index 5fc5bd74e..8774a3405 100644 --- a/apps/web/src/screens/Request/Signature/index.tsx +++ b/apps/web/src/screens/Request/Signature/index.tsx @@ -38,9 +38,7 @@ export const RequestSignature = () => { paddingTop={15} paddingBottom={5} > - - Message: - + Message: From 45b8e306002301c489bb46b8e279a99ef44a4a09 Mon Sep 17 00:00:00 2001 From: FME849 <1414439@gmail.com> Date: Wed, 5 Apr 2023 12:10:35 +0700 Subject: [PATCH 5/8] replace icon in RequestHeader by bare-icon image --- apps/web/assets/img/bare-icon.png | Bin 0 -> 1411 bytes apps/web/src/components/HeaderRequest.tsx | 11 ++++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 apps/web/assets/img/bare-icon.png diff --git a/apps/web/assets/img/bare-icon.png b/apps/web/assets/img/bare-icon.png new file mode 100644 index 0000000000000000000000000000000000000000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/apps/web/src/components/HeaderRequest.tsx b/apps/web/src/components/HeaderRequest.tsx index 2bb146e09..eae0e32fe 100644 --- a/apps/web/src/components/HeaderRequest.tsx +++ b/apps/web/src/components/HeaderRequest.tsx @@ -1,9 +1,10 @@ import { Button, ChevronDown, Image, Stack, Text } from '@walless/gui'; -const iconSize = 45; +const iconWidth = 40; +const iconHeight = iconWidth / 2; export const HeaderRequest = () => { - const iconSrc = { uri: '/img/icon-lg.png' }; + const iconSrc = { uri: '/img/bare-icon.png' }; return ( { alignItems="center" backgroundColor="#121B22" paddingHorizontal={15} - paddingVertical={5} + paddingVertical={10} > - + Zbz thic... @@ -22,7 +23,7 @@ export const HeaderRequest = () => { - + ); }; From 3e7b12f71b2d7c9b4bbe08cfce7d572f58772c94 Mon Sep 17 00:00:00 2001 From: FME849 <1414439@gmail.com> Date: Wed, 5 Apr 2023 15:12:51 +0700 Subject: [PATCH 6/8] add border according to design --- apps/web/src/screens/Request/Connection/index.tsx | 10 ++++++++-- apps/web/src/screens/Request/Layout/index.tsx | 2 ++ apps/web/src/screens/Request/Signature/index.tsx | 8 +++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/apps/web/src/screens/Request/Connection/index.tsx b/apps/web/src/screens/Request/Connection/index.tsx index 6c2e584a9..dd03efb1b 100644 --- a/apps/web/src/screens/Request/Connection/index.tsx +++ b/apps/web/src/screens/Request/Connection/index.tsx @@ -30,7 +30,13 @@ const RequestConnection = () => { underrealm.stormgate.io - + Under Realm would like to connect with your Walless account to: @@ -50,7 +56,7 @@ const RequestConnection = () => { - + diff --git a/apps/web/src/screens/Request/Layout/index.tsx b/apps/web/src/screens/Request/Layout/index.tsx index fcf659baa..c90f8a215 100644 --- a/apps/web/src/screens/Request/Layout/index.tsx +++ b/apps/web/src/screens/Request/Layout/index.tsx @@ -53,6 +53,8 @@ export const RequestLayout = () => { borderRadius={15} marginBottom={20} padding={15} + borderColor="rgba(86, 102, 116, .2)" + borderWidth={1} > diff --git a/apps/web/src/screens/Request/Signature/index.tsx b/apps/web/src/screens/Request/Signature/index.tsx index 8774a3405..6b17592fb 100644 --- a/apps/web/src/screens/Request/Signature/index.tsx +++ b/apps/web/src/screens/Request/Signature/index.tsx @@ -29,7 +29,13 @@ export const RequestSignature = () => { underrealm.stormgate.io - + Date: Wed, 5 Apr 2023 15:59:17 +0700 Subject: [PATCH 7/8] remove HyperLink component which is a duplicate of Anchor component --- packages/gui/components/HyperLink.tsx | 36 --------------------------- packages/gui/index.ts | 1 - 2 files changed, 37 deletions(-) delete mode 100644 packages/gui/components/HyperLink.tsx diff --git a/packages/gui/components/HyperLink.tsx b/packages/gui/components/HyperLink.tsx deleted file mode 100644 index 6ad89fe10..000000000 --- a/packages/gui/components/HyperLink.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { FC } from 'react'; -import { GetProps, styled } from '@tamagui/core'; - -import { Text } from './styled'; - -interface Props { - title?: string; - onPress?: () => void; -} - -export const HyperLink: FC = ({ - title, - onPress, - ...props -}) => { - return ( - - {title || 'Link'} - - ); -}; - -export default HyperLink; - -export const HyperLinkFrame = styled(Text, { - color: '#0694D3', - hoverStyle: { - cursor: 'pointer', - textDecorationLine: 'underline', - }, - focusStyle: { - textDecorationLine: 'underline', - }, -}); - -type HyperLinkProps = GetProps; diff --git a/packages/gui/index.ts b/packages/gui/index.ts index 95d6c80b9..fb9c26c35 100644 --- a/packages/gui/index.ts +++ b/packages/gui/index.ts @@ -1,6 +1,5 @@ export * from './components/Anchor'; export * from './components/Button'; -export * from './components/HyperLink'; export * from './components/ModalManager'; export * from './components/Provider'; export * from './components/styled'; From c6423637c6adae3b8930a34b1dc7117e1cbd9bad Mon Sep 17 00:00:00 2001 From: FME849 <1414439@gmail.com> Date: Wed, 5 Apr 2023 16:10:19 +0700 Subject: [PATCH 8/8] replace HyperLink by Anchor component --- apps/web/src/screens/Request/Layout/index.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/web/src/screens/Request/Layout/index.tsx b/apps/web/src/screens/Request/Layout/index.tsx index c90f8a215..17de727b2 100644 --- a/apps/web/src/screens/Request/Layout/index.tsx +++ b/apps/web/src/screens/Request/Layout/index.tsx @@ -1,11 +1,4 @@ -import { - AlertCircle, - Button, - HyperLink, - Image, - Stack, - Text, -} from '@walless/gui'; +import { AlertCircle, Anchor, Button, Image, Stack, Text } from '@walless/gui'; import { HeaderRequest } from '../../../components/HeaderRequest'; import LightText from '../../../components/LightText'; @@ -42,7 +35,14 @@ export const RequestLayout = () => { Walless account. - + + Learn more +