Skip to content

Commit 8ada02e

Browse files
committed
refactor: enhance UI components for send transaction flow
- Updated styles for send-contacts-list, send-fee-select, send-from-contacts-list, send-header, send-input-amount, send-nft-select, send-address-input, send-alert, and send-token-select components. - Improved layout responsiveness and visual consistency with new padding, margin, and border adjustments. - Enhanced hover and active states for better user interaction feedback. - Applied scoped styles to prevent style leakage and ensure component encapsulation. - Introduced animations for dropdowns and alerts to improve user experience. - Adjusted font sizes, weights, and colors for better readability and aesthetics.
1 parent f90f8c9 commit 8ada02e

File tree

11 files changed

+578
-279
lines changed

11 files changed

+578
-279
lines changed

packages/extension/src/providers/common/ui/send-transaction/send-address-item.vue

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ defineProps({
5454
});
5555
</script>
5656

57-
<style lang="less">
57+
<style lang="less" scoped>
5858
@import '@action/styles/theme.less';
5959
6060
.send-address-item {
@@ -63,19 +63,21 @@ defineProps({
6363
align-items: center;
6464
flex-direction: row;
6565
width: 100%;
66-
height: 56px;
66+
height: 52px;
6767
cursor: pointer;
6868
text-decoration: none;
69-
transition: background 300ms ease-in-out;
70-
border-radius: 10px;
69+
transition: all 200ms ease-in-out;
70+
border-radius: 12px;
71+
padding: 0 4px;
72+
box-sizing: border-box;
7173
7274
&:hover {
73-
background: @black007;
75+
background: rgba(98, 126, 234, 0.08);
7476
}
7577
7678
&__number {
7779
font-style: normal;
78-
font-weight: 400;
80+
font-weight: 500;
7981
font-size: 12px;
8082
line-height: 16px;
8183
letter-spacing: 0.5px;
@@ -88,40 +90,46 @@ defineProps({
8890
justify-content: flex-start;
8991
align-items: center;
9092
flex-direction: row;
91-
height: 56px;
93+
height: 52px;
94+
flex: 1;
95+
min-width: 0;
9296
9397
img {
9498
width: 32px;
9599
height: 32px;
96-
margin-right: 16px;
97-
margin-left: 8px;
98-
border-radius: 100%;
100+
margin-right: 12px;
101+
margin-left: 4px;
102+
border-radius: 10px;
103+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
99104
}
100105
}
101106
102107
&__name {
108+
flex: 1;
109+
min-width: 0;
110+
103111
h4 {
104112
font-style: normal;
105-
font-weight: 400;
113+
font-weight: 600;
106114
font-size: 14px;
107-
line-height: 20px;
108-
letter-spacing: 0.25px;
115+
line-height: 18px;
116+
letter-spacing: 0.1px;
109117
color: @primaryLabel;
110-
margin: 0;
118+
margin: 0 0 2px 0;
111119
white-space: nowrap;
112-
width: 270px;
113120
text-overflow: ellipsis;
114121
overflow: hidden;
115122
}
116123
117124
p {
118125
font-style: normal;
119126
font-weight: 400;
120-
font-size: 14px;
121-
line-height: 20px;
122-
letter-spacing: 0.25px;
127+
font-size: 13px;
128+
line-height: 18px;
129+
letter-spacing: 0.2px;
123130
color: @secondaryLabel;
124131
margin: 0 !important;
132+
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
125133
126134
span {
127135
font-variant: small-caps;
@@ -143,7 +151,8 @@ defineProps({
143151
}
144152
145153
&__checked {
146-
margin-right: 12px;
154+
margin-right: 8px;
155+
color: @primary;
147156
}
148157
}
149158
</style>

packages/extension/src/providers/common/ui/send-transaction/send-contacts-list.vue

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -202,29 +202,32 @@ const pasteFromClipboard = () => {
202202
203203
&__wrap {
204204
position: absolute;
205-
width: 396px;
205+
width: calc(100% - 48px);
206206
height: auto;
207207
max-height: 530px;
208-
left: 32px;
208+
left: 24px;
209209
top: 221px;
210-
background: #ffffff;
210+
background: @white;
211211
box-shadow:
212-
0px 3px 6px rgba(0, 0, 0, 0.039),
213-
0px 7px 24px rgba(0, 0, 0, 0.19);
214-
border-radius: 12px;
212+
0px 8px 24px rgba(0, 0, 0, 0.12),
213+
0px 2px 8px rgba(0, 0, 0, 0.08);
214+
border-radius: 16px;
215215
z-index: 103;
216216
overflow: hidden;
217217
padding: 16px 0 8px 0;
218218
box-sizing: border-box;
219219
opacity: 0;
220220
visibility: hidden;
221221
transition:
222-
opacity 0.3s,
223-
visibility 0s ease-in-out 0.3s;
222+
opacity 200ms ease-out,
223+
transform 200ms ease-out,
224+
visibility 0s ease-in-out 200ms;
225+
transform: translateY(-8px);
224226
225227
&.show {
226228
opacity: 1;
227229
visibility: visible;
230+
transform: translateY(0);
228231
transition-delay: 0s;
229232
}
230233
@@ -242,13 +245,13 @@ const pasteFromClipboard = () => {
242245
243246
h3 {
244247
font-style: normal;
245-
font-weight: 500;
246-
font-size: 12px;
247-
line-height: 16px;
248-
letter-spacing: 2px;
248+
font-weight: 600;
249+
font-size: 11px;
250+
line-height: 14px;
251+
letter-spacing: 1.5px;
249252
text-transform: uppercase;
250253
color: @secondaryLabel;
251-
margin: 24px 0 0 16px;
254+
margin: 20px 0 8px 16px;
252255
}
253256
254257
&__list {
@@ -261,41 +264,46 @@ const pasteFromClipboard = () => {
261264
flex-direction: row;
262265
justify-content: space-between;
263266
align-items: center;
267+
gap: 12px;
264268
265269
a {
266270
font-style: normal;
267271
font-weight: 500;
268272
font-size: 12px;
269273
line-height: 32px;
270-
letter-spacing: 0.8px;
274+
letter-spacing: 0.5px;
271275
272276
&:first-child {
273-
width: 144px;
274-
height: 32px;
277+
flex: 1;
278+
height: 36px;
275279
}
276280
}
277281
278282
&-paste {
279283
display: flex;
280284
flex-direction: row;
281-
justify-content: space-between;
285+
justify-content: center;
282286
align-items: center;
283-
padding: 8px 12px 8px 8px;
284-
background: rgba(0, 0, 0, 0.02);
285-
border-radius: 8px;
287+
padding: 8px 14px;
288+
background: rgba(98, 126, 234, 0.08);
289+
border-radius: 10px;
286290
font-style: normal;
287-
font-weight: 500;
291+
font-weight: 600;
288292
font-size: 12px;
289293
line-height: 16px !important;
290-
letter-spacing: 0.8px;
291-
color: @primaryLabel;
294+
letter-spacing: 0.5px;
295+
color: @primary;
292296
box-sizing: border-box;
293-
width: 78px !important;
294297
cursor: pointer;
295-
transition: background 300ms ease-in-out;
298+
transition: all 200ms ease-in-out;
299+
gap: 6px;
300+
301+
svg {
302+
color: @primary;
303+
}
296304
297305
&:hover {
298-
background: @black007;
306+
background: rgba(98, 126, 234, 0.15);
299307
}
300308
}
301309
}
@@ -304,15 +312,20 @@ const pasteFromClipboard = () => {
304312
&-header {
305313
width: 100%;
306314
height: 56px;
307-
background: @white;
315+
background: linear-gradient(
316+
135deg,
317+
rgba(98, 126, 234, 0.08) 0%,
318+
rgba(138, 100, 220, 0.05) 100%
319+
);
308320
box-sizing: border-box;
309-
padding: 14px 56px 14px 56px;
321+
padding: 14px 56px;
310322
margin-bottom: 8px;
323+
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
311324
312325
h4 {
313326
font-style: normal;
314-
font-weight: bold;
315-
font-size: 20px;
327+
font-weight: 700;
328+
font-size: 18px;
316329
line-height: 28px;
317330
margin: 0;
318331
color: @primaryLabel;
@@ -322,16 +335,17 @@ const pasteFromClipboard = () => {
322335
323336
&-back {
324337
position: absolute;
325-
top: 8px;
326-
left: 0;
327-
border-radius: 8px;
338+
top: 10px;
339+
left: 8px;
340+
border-radius: 10px;
328341
cursor: pointer;
329342
padding: 8px;
330343
font-size: 0;
331-
transition: background 300ms ease-in-out;
344+
transition: all 200ms ease-in-out;
332345
333346
&:hover {
334-
background: @black007;
347+
background: rgba(0, 0, 0, 0.06);
348+
transform: translateX(-2px);
335349
}
336350
}
337351
}

0 commit comments

Comments
 (0)