Skip to content

Commit ee945be

Browse files
authored
Merge pull request #478 from getAlby/umarrg/master
Proposal: updated onboarding screens (final)
2 parents f034cf5 + 35abe99 commit ee945be

File tree

20 files changed

+342
-313
lines changed

20 files changed

+342
-313
lines changed

src/app/components/Card/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export default function Card({ alias, satoshis, fiat, color, currency }) {
22
return (
33
<div className={`${color} h-36 rounded-lg pt-6`}>
4-
<p className="font-normal text-white ml-6">{alias}</p>
5-
<p className="text-2xl font-medium text-white ml-6 mt-2">{satoshis}</p>
4+
<p className="font-normal text-black ml-6">{alias}</p>
5+
<p className="text-2xl font-bold text-black ml-6 mt-2">{satoshis}</p>
66
<p className="font-normal text-white ml-6 mt-1">
77
{fiat} {currency}
88
</p>

src/app/components/LinkButton/index.tsx

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Link } from "react-router-dom";
2-
import { CaretRightIcon } from "@bitcoin-design/bitcoin-icons-react/filled";
32

43
type Props = {
54
to: string;
@@ -11,23 +10,16 @@ type Props = {
1110
export default function LinkButton({ to, title, description, logo }: Props) {
1211
return (
1312
<Link to={to} className="block">
14-
<div className="p-4 bg-white flex justify-between items-center shadow overflow-hidden border-b border-gray-200 rounded-lg hover:bg-gray-50 transition duration-200">
13+
<div className="p-4 bg-white h-96 text-center shadow-lg overflow-hidden border-b border-gray-200 rounded-lg hover:bg-gray-50 transition duration-200">
14+
<div className="my-12">
15+
<img src={logo} alt="logo" className="inline rounded-3xl w-32" />
16+
</div>
1517
<div>
1618
<span className="block text-lg">{title}</span>
1719
{description && (
1820
<span className="text-sm text-gray-500">{description}</span>
1921
)}
2022
</div>
21-
<div>
22-
<img
23-
src={logo}
24-
alt="logo"
25-
width="75em"
26-
height="75em"
27-
className="inline rounded-lg mr-3"
28-
/>
29-
<CaretRightIcon className="h-5 w-5 inline" />
30-
</div>
3123
</div>
3224
</Link>
3325
);

src/app/components/QrcodeScanner/index.tsx

+11-10
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,26 @@ function QrcodeScanner({
111111
}
112112

113113
return (
114-
<div className="shadow-sm bg-white rounded-md border border-gray-300 flex flex-col items-center">
115-
<h4 className="text-xl font-bold my-4">Scan QR Code</h4>
116-
114+
<div className="shadow-sm bg-white rounded-md border border-gray-300 flex flex-col items-center p-6">
117115
{!isScanning && (
118116
<>
119-
<QrCodeIcon className="h-24 w-24 text-blue-500" />
120-
<div className="my-6">
121-
<Button
122-
label="Start scanning"
123-
onClick={handleRequestCameraPermissions}
124-
/>
117+
<div className="flex justify-center text-center items-center">
118+
<div>
119+
<h4 className="text-lg font-bold mb-2">Scan QR Code</h4>
120+
<Button
121+
label="Start scanning"
122+
onClick={handleRequestCameraPermissions}
123+
/>
124+
</div>
125+
<QrCodeIcon className="h-40 w-40 ml-4 -mr-8 text-blue-500" />
125126
</div>
126127
</>
127128
)}
128129

129130
<div className="bg-black w-full" id="reader" />
130131

131132
{isScanning && (
132-
<div className="my-6 text-center">
133+
<div className="mt-6 text-center">
133134
<div className="mb-4">
134135
<select
135136
className="w-72 border-gray-300 rounded-md shadow-sm text-gray-700 bg-white hover:bg-gray-50"

src/app/components/Steps/index.jsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,18 @@ export default function Steps({ steps }) {
88
case "complete":
99
outerStyles =
1010
"group pl-4 py-2 flex flex-col border-l-4 border-orange-bitcoin md:pl-0 md:pt-4 md:pb-0 md:border-l-0 md:border-t-4";
11-
innerStyles =
12-
"text-xs text-orange-bitcoin font-semibold tracking-wide uppercase";
11+
innerStyles = "text-xs text-black font-500 tracking-wide uppercase";
1312
break;
1413
case "current":
1514
outerStyles =
1615
"pl-4 py-2 flex flex-col border-l-4 border-orange-bitcoin md:pl-0 md:pt-4 md:pb-0 md:border-l-0 md:border-t-4";
17-
innerStyles =
18-
"text-xs text-orange-bitcoin font-semibold tracking-wide uppercase";
16+
innerStyles = "text-xs text-black font-bold tracking-wide uppercase";
1917
break;
2018
default:
2119
outerStyles =
2220
"group pl-4 py-2 flex flex-col border-l-4 border-gray-200 md:pl-0 md:pt-4 md:pb-0 md:border-l-0 md:border-t-4";
2321
innerStyles =
24-
"text-xs text-gray-500 font-semibold tracking-wide uppercase";
22+
"text-xs text-gray-500 font-normal tracking-wide uppercase";
2523
if (step.href) {
2624
outerStyles += " hover:border-gray-300";
2725
innerStyles += " group-hover:text-gray-700";

src/app/router/Welcome/Welcome.jsx

+5
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ function App() {
6464
return (
6565
<div>
6666
{process.env.NODE_ENV === "development" && <DevMenu />}
67+
6768
<div className="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
69+
<div className="text-center font-serif font-medium text-2xl pt-7 pb-3 ">
70+
<p>The power of lightning in your browser</p>
71+
</div>
72+
6873
<Steps steps={steps} />
6974
</div>
7075
<div className="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">

src/app/screens/Onboard/ChooseConnector/index.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ export default function ChooseConnector() {
4545
<Route
4646
path="/"
4747
element={
48-
<div className="relative mt-24 lg:grid lg:grid-cols-2 lg:gap-8">
48+
<div className="relative mt-14 lg:grid lg:gap-8 text-center">
4949
<div className="relative">
5050
<h1 className="text-3xl font-bold">
5151
Do you have a lightning wallet?
5252
</h1>
5353
<p className="text-gray-500 my-6">
5454
You need to first connect to a lightning wallet so that you can
55-
interact with your favorite websites that accept bitcoin
55+
interact with <br /> your favorite websites that accept bitcoin
5656
lightning payments!
5757
</p>
58-
<div className="space-y-4">
58+
<div className="grid grid-cols-4 gap-4">
5959
{connectors.map(({ to, title, description, logo }) => (
6060
<LinkButton
6161
key={to}

src/app/screens/Onboard/ConnectLnbits/index.tsx

+20-24
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ export default function ConnectLnbits() {
6363

6464
return (
6565
<form onSubmit={handleSubmit}>
66-
<div className="relative lg:flex mt-24">
66+
<div className="relative lg:flex mt-14 bg-white px-10 py-12">
6767
<div className="lg:w-1/2">
68-
<h1 className="text-3xl font-bold">Connect to LNbits</h1>
68+
<h1 className="text-2xl font-bold">Connect to LNbits</h1>
6969
<p className="text-gray-500 mt-6"></p>
7070
<div className="w-4/5">
7171
<div className="mt-6">
@@ -99,34 +99,30 @@ export default function ConnectLnbits() {
9999
</div>
100100
</div>
101101
</div>
102-
<div className="mt-8 flex space-x-4">
103-
<Button
104-
label="Back"
105-
onClick={(e) => {
106-
e.preventDefault();
107-
navigate(-1);
108-
return false;
109-
}}
110-
/>
111-
<Button
112-
type="submit"
113-
label="Continue"
114-
primary
115-
loading={loading}
116-
disabled={formData.adminkey === "" || formData.url === ""}
117-
/>
118-
</div>
119102
</div>
120103
<div className="mt-16 lg:mt-0 lg:w-1/2">
121104
<div className="lg:flex h-full justify-center items-center">
122-
<img
123-
src="assets/icons/satsymbol.svg"
124-
alt="sat"
125-
className="max-w-xs"
126-
/>
105+
<img src="assets/icons/satsymbol.svg" alt="sat" className="w-64" />
127106
</div>
128107
</div>
129108
</div>
109+
<div className="my-8 flex space-x-4 justify-center">
110+
<Button
111+
label="Back"
112+
onClick={(e) => {
113+
e.preventDefault();
114+
navigate(-1);
115+
return false;
116+
}}
117+
/>
118+
<Button
119+
type="submit"
120+
label="Continue"
121+
primary
122+
loading={loading}
123+
disabled={formData.adminkey === "" || formData.url === ""}
124+
/>
125+
</div>
130126
</form>
131127
);
132128
}

src/app/screens/Onboard/ConnectLnd/index.tsx

+79-78
Original file line numberDiff line numberDiff line change
@@ -107,99 +107,100 @@ export default function ConnectLnd() {
107107
}
108108

109109
return (
110-
<div className="relative mt-24 lg:flex space-x-8">
111-
<div className="lg:w-1/2">
112-
<h1 className="text-3xl font-bold">Connect to your LND node</h1>
113-
<p className="text-gray-500 mt-6">
114-
You will need to retrieve the node url and an admin macaroon.
115-
</p>
116-
<form onSubmit={handleSubmit}>
117-
<div className="w-4/5">
118-
<div className="mt-6">
119-
<label className="block font-medium text-gray-700">Address</label>
120-
<div className="mt-1">
121-
<Input
122-
name="url"
123-
placeholder="https://"
124-
onChange={handleChange}
125-
required
126-
/>
127-
</div>
128-
</div>
129-
<div className="mt-6">
130-
<div>
110+
<div>
111+
<div className="relative mt-14 lg:flex space-x-8 bg-white px-12 py-10">
112+
<div className="lg:w-1/2">
113+
<h1 className="text-2xl font-bold">Connect to your LND node</h1>
114+
<p className="text-gray-500 mt-6">
115+
You will need to retrieve the node url and an admin <br /> macaroon.
116+
</p>
117+
<form onSubmit={handleSubmit}>
118+
<div className="w-4/5">
119+
<div className="mt-6">
131120
<label className="block font-medium text-gray-700">
132-
Macaroon
121+
Address
133122
</label>
134123
<div className="mt-1">
135124
<Input
136-
name="macaroon"
137-
value={formData.macaroon}
125+
name="url"
126+
placeholder="https://"
138127
onChange={handleChange}
139128
required
140129
/>
141130
</div>
142131
</div>
143-
<p className="text-center my-4">OR</p>
144-
<div
145-
className={`cursor-pointer bg-white flex flex-col items-center p-4 py-10 border-dashed border-2 border-gray-300 bg-gray-50 rounded-md text-center transition duration-200 ${
146-
isDragging ? "border-blue-500 bg-blue-50" : ""
147-
}`}
148-
onDrop={dropHandler}
149-
onDragOver={dragOverHandler}
150-
onDragLeave={dragLeaveHandler}
151-
onClick={() => {
152-
if (hiddenFileInput?.current) hiddenFileInput.current.click();
153-
}}
154-
>
155-
<SendIcon className="mb-3 h-9 w-9 text-blue-500" />
156-
<p>
157-
Drag and drop your macaroon here or{" "}
158-
<span className="underline">browse</span>
159-
</p>
160-
<input
161-
ref={hiddenFileInput}
162-
onChange={(event) => {
163-
if (event.target.files) {
164-
const file = event.target.files[0];
165-
readFile(file);
166-
}
132+
<div className="mt-6">
133+
<div>
134+
<label className="block font-medium text-gray-700">
135+
Macaroon
136+
</label>
137+
<div className="mt-1">
138+
<Input
139+
name="macaroon"
140+
value={formData.macaroon}
141+
onChange={handleChange}
142+
required
143+
/>
144+
</div>
145+
</div>
146+
<p className="text-center my-4">OR</p>
147+
<div
148+
className={`cursor-pointer flex flex-col items-center p-4 py-10 border-dashed border-2 border-gray-300 bg-gray-50 rounded-md text-center transition duration-200 ${
149+
isDragging ? "border-blue-500 bg-blue-50" : ""
150+
}`}
151+
onDrop={dropHandler}
152+
onDragOver={dragOverHandler}
153+
onDragLeave={dragLeaveHandler}
154+
onClick={() => {
155+
if (hiddenFileInput?.current)
156+
hiddenFileInput.current.click();
167157
}}
168-
type="file"
169-
accept=".macaroon"
170-
hidden
171-
/>
158+
>
159+
<SendIcon className="mb-3 h-9 w-9 text-blue-500" />
160+
<p>
161+
Drag and drop your macaroon here or{" "}
162+
<span className="underline">browse</span>
163+
</p>
164+
<input
165+
ref={hiddenFileInput}
166+
onChange={(event) => {
167+
if (event.target.files) {
168+
const file = event.target.files[0];
169+
readFile(file);
170+
}
171+
}}
172+
type="file"
173+
accept=".macaroon"
174+
hidden
175+
/>
176+
</div>
172177
</div>
173178
</div>
179+
</form>
180+
</div>
181+
<div className="mt-16 lg:mt-0 lg:w-1/2">
182+
<div className="lg:flex h-full justify-center items-center">
183+
<img src="assets/icons/satsymbol.svg" alt="sat" className="w-64" />
174184
</div>
175-
<div className="mt-8 flex space-x-4">
176-
<Button
177-
label="Back"
178-
onClick={(e) => {
179-
e.preventDefault();
180-
navigate(-1);
181-
return false;
182-
}}
183-
/>
184-
<Button
185-
type="submit"
186-
label="Continue"
187-
primary
188-
loading={loading}
189-
disabled={formData.url === "" || formData.macaroon === ""}
190-
/>
191-
</div>
192-
</form>
193-
</div>
194-
<div className="mt-16 lg:mt-0 lg:w-1/2">
195-
<div className="lg:flex h-full justify-center items-center">
196-
<img
197-
src="assets/icons/satsymbol.svg"
198-
alt="sat"
199-
className="max-w-xs"
200-
/>
201185
</div>
202186
</div>
187+
<div className="my-8 flex space-x-4 justify-center">
188+
<Button
189+
label="Back"
190+
onClick={(e) => {
191+
e.preventDefault();
192+
navigate(-1);
193+
return false;
194+
}}
195+
/>
196+
<Button
197+
type="submit"
198+
label="Continue"
199+
primary
200+
loading={loading}
201+
disabled={formData.url === "" || formData.macaroon === ""}
202+
/>
203+
</div>
203204
</div>
204205
);
205206
}

0 commit comments

Comments
 (0)