Skip to content

Commit a15e3a8

Browse files
committed
fix: spend mobile
1 parent 4271432 commit a15e3a8

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

src/components/spend.rs

+27-23
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub(crate) fn Spend() -> Element {
6262

6363
div { class: "sm:col-span-3",
6464
label {
65-
r#for: "npub1",
65+
r#for: "npub",
6666
class: "block text-sm font-medium text-gray-700",
6767
"Your Nostr Public Key (npub)"
6868
}
@@ -90,15 +90,15 @@ pub(crate) fn Spend() -> Element {
9090

9191
div { class: "sm:col-span-3",
9292
label {
93-
r#for: "txid",
93+
r#for: "escrow-txid",
9494
class: "block text-sm font-medium text-gray-700",
9595
"Escrow Resolution Transaction ID"
9696
}
9797
div { class: "mt-1",
9898
input {
9999
r#type: "text",
100-
name: "txid",
101-
id: "txid",
100+
name: "escrow-txid",
101+
id: "escrow-txid",
102102
class: "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md p-2 border",
103103
placeholder: "txid...",
104104
oninput: move |event| {
@@ -110,20 +110,18 @@ pub(crate) fn Spend() -> Element {
110110
}
111111
}
112112

113-
div { class: "sm: col-span-3",
113+
div { class: "sm:col-span-3",
114114
label {
115115
r#for: "destination-address",
116116
class: "block text-sm font-medium text-gray-700",
117117
"Your Destination Address"
118118
}
119119
div { class: "mt-1",
120120
input {
121-
id: "destination-address",
122121
r#type: "text",
123-
name: "txid",
124-
id: "txid",
122+
name: "destination-address",
123+
id: "destination-address",
125124
class: "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 rounded-md p-2 border",
126-
class: "mt-1 text-sm text-gray-900 break-all bg-gray-50 p-3 rounded",
127125
placeholder: "Enter your destination address...",
128126
oninput: move |event| {
129127
#[cfg(debug_assertions)]
@@ -185,18 +183,19 @@ pub(crate) fn Spend() -> Element {
185183
}
186184
}
187185
}
188-
div { class: "sm: col-span-3",
189-
dt { class: "text-sm font-medium text-gray-900",
186+
187+
div { class: "sm:col-span-3",
188+
label { class: "block text-sm font-medium text-gray-700",
190189
"Your Resolution Address"
191190
}
192-
dd {
193-
id: "buyer-address",
194-
class: "mt-1 text-sm text-gray-900 break-all bg-gray-50 p-3 rounded",
195-
{
196-
if derived_address.read().is_empty() {
197-
"bc1p...".to_string()
198-
} else {
199-
derived_address.read().clone()
191+
div { class: "mt-1",
192+
div { class: "text-sm text-gray-900 break-all bg-gray-50 p-3 rounded",
193+
{
194+
if derived_address.read().is_empty() {
195+
"bc1p...".to_string()
196+
} else {
197+
derived_address.read().clone()
198+
}
200199
}
201200
}
202201
}
@@ -290,23 +289,28 @@ pub(crate) fn Spend() -> Element {
290289
"Signed Transaction"
291290
}
292291

293-
div { class: "mt-4 grid grid-cols-3 gap-y-6 gap-x-4 sm:grid-cols-2",
294-
div { class: "col-span-3",
292+
div { class: "mt-5 border-t border-gray-200 pt-5",
293+
div { class: "sm:col-span-6",
294+
label {
295+
r#for: "signed-tx",
296+
class: "block text-sm font-medium text-gray-500",
297+
"Signed Transaction"
298+
}
295299
div { class: "mt-1",
296300
textarea {
297301
id: "signed-tx",
298302
readonly: "true",
299303
rows: "4",
300304
class: "shadow-sm block w-full sm:text-sm border-gray-300 rounded-md p-2 border bg-gray-50",
301-
placeholder: signed_tx_str,
305+
value: signed_tx_str,
302306
}
303307
}
304308
}
305309
}
306310

307311
div { class: "mt-5 flex flex-col space-y-3 sm:flex-row sm:space-y-0 sm:space-x-3",
308312
CopyButton {
309-
text: "Signature",
313+
text: "Transaction",
310314
clipboard_text: signed_tx_str,
311315
}
312316
ContinueButton {

0 commit comments

Comments
 (0)