Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bb23750

Browse files
authoredOct 26, 2022
Merge pull request #315 from MyEtherWallet/devop/ignore-e
chore: run lint, ignore e on mew input type number
2 parents f62a576 + bf7ab3d commit bb23750

File tree

9 files changed

+80
-43
lines changed

9 files changed

+80
-43
lines changed
 

‎CHANGELOG.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
1+
### Release 1.3.8
2+
3+
### fix
4+
5+
- mew notification arrow on swap alignment [#319](https://github.com/MyEtherWallet/mew-components/pull/319)
6+
- address hook horizontal alignment [#317](https://github.com/MyEtherWallet/mew-components/pull/317)
7+
- token selector horizontal alignment [#316](https://github.com/MyEtherWallet/mew-components/pull/316)
8+
9+
### devop
10+
11+
- ignore e on mew-input type number [#315](https://github.com/MyEtherWallet/mew-components/pull/315)
12+
113
### Release 1.3.7
14+
215
### devop
16+
317
- remove dapp btn capitalization [#313](https://github.com/MyEtherWallet/mew-components/pull/313)
418
- swap notification arrow alignment [#312](https://github.com/MyEtherWallet/mew-components/pull/312)
519
- address selector showing invalid identicon [#311](https://github.com/MyEtherWallet/mew-components/pull/311)
620
- tooltip alignment [#304](https://github.com/MyEtherWallet/mew-components/pull/304)
721

8-
922
### Release 1.3.5
23+
1024
### devop
25+
1126
- Remove text capital style from mew button [#306](https://github.com/MyEtherWallet/mew-components/pull/306)
1227

1328
### fix
29+
1430
- use token container for notification swap tokens [#307](https://github.com/MyEtherWallet/mew-components/pull/307)
1531
- ledger back button [#308](https://github.com/MyEtherWallet/mew-components/pull/308)
1632
- token display on tablet view [#309](https://github.com/MyEtherWallet/mew-components/pull/309)
1733

18-
1934
### Release 1.3.4
35+
2036
### devop
37+
2138
- allow users to hide address select save icon [#302](https://github.com/MyEtherWallet/mew-components/pull/302)
2239
- fix persistent hint [#303](https://github.com/MyEtherWallet/mew-components/pull/303)
2340

@@ -34,6 +51,7 @@
3451
### fix
3552

3653
- mew-address-select showing wrong identicon bug [#296](https://github.com/MyEtherWallet/mew-components/pull/296)
54+
3755
### Release 1.1.0
3856

3957
### devop

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@myetherwallet/mew-components",
3-
"version": "1.3.7",
3+
"version": "1.3.8",
44
"description": "MEW Components",
55
"main": "dist/mew-components.umd.js",
66
"module": "dist/mew-components.esm.js",

‎src/components/MewAddressSelect/MewAddressSelect.vue

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<v-combobox
66
ref="mewAddressSelect"
77
v-model="addressValue"
8-
height="62"
98
class="address-select pa-0 rounded-lg"
109
color="primary"
1110
:items="items"
@@ -87,7 +86,9 @@
8786
class="dropdown-icon-container d-flex align-center justify-center cursor-pointer full-height"
8887
@click="toggle"
8988
>
90-
<v-icon class="mew-heading-1 mx-5"> mdi-chevron-down </v-icon>
89+
<v-icon class="mew-heading-1 mx-5">
90+
mdi-chevron-down
91+
</v-icon>
9192
</div>
9293
</template>
9394

@@ -113,7 +114,10 @@
113114
v-if="!item.resolvedAddr || item.resolvedAddr === ''"
114115
:hash="item.address"
115116
/>
116-
<span v-else class="mew-address">{{ item.address }}</span>
117+
<span
118+
v-else
119+
class="mew-address"
120+
>{{ item.address }}</span>
117121
</div>
118122
<div class="overline primary--text font-weight-medium ml-3">
119123
{{ item.nickname }}
@@ -344,6 +348,7 @@ export default {
344348
* Address select input.
345349
*/
346350
.address-select {
351+
min-height: 62px;
347352
&.v-text-field {
348353
input {
349354
font-family: 'PT Mono';

‎src/components/MewBlockie/MewBlockie.vue

+11-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,24 @@
1010
:src="blockieImg"
1111
alt="Blockie Image"
1212
style="display: block; border-radius: 50%"
13-
/>
13+
>
1414

1515
<!--
1616
=====================================================================
1717
Inset shadow on edge of blockie image
1818
=====================================================================
1919
-->
20-
<div v-if="!flat" class="inset-shadow" />
20+
<div
21+
v-if="!flat"
22+
class="inset-shadow"
23+
/>
2124
</div>
22-
<img v-if="currency" alt="icon" class="currency-icon" :src="currency" />
25+
<img
26+
v-if="currency"
27+
alt="icon"
28+
class="currency-icon"
29+
:src="currency"
30+
>
2331
</div>
2432
</template>
2533

‎src/components/MewInput/MewInput.vue

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
:append-icon="showPasswordIcon"
2525
:readonly="isReadOnly"
2626
@click:append="onPasswordIconClick"
27+
@keydown.native="preventCharE($event)"
2728
validate-on-blur
2829
height="62"
2930
>
@@ -328,6 +329,9 @@ export default {
328329
clear(val) {
329330
this.inputValue = val ? val : '';
330331
},
332+
preventCharE(e) {
333+
if (this.type === 'number' && e.key === 'e') e.preventDefault();
334+
},
331335
},
332336
};
333337
</script>

‎src/components/MewNotification/MewNotification.vue

+24-30
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class="px-2 py-0"
1919
:color="backgroundColor"
2020
>
21-
<v-container
21+
<v-container
2222
fluid
2323
class="px-0"
2424
>
@@ -32,9 +32,7 @@
3232
<!-- ===================================================================================== -->
3333
<div
3434
v-if="
35-
$vuetify.breakpoint.smAndUp &&
36-
!notification.read &&
37-
showIndicator
35+
$vuetify.breakpoint.smAndUp && !notification.read && showIndicator
3836
"
3937
:class="[
4038
getClasses(notification.status.value.toLowerCase()),
@@ -59,14 +57,16 @@
5957
<!-- ===================================================================================== -->
6058
<!-- Displays swap icons if it is a swap notification -->
6159
<!-- ===================================================================================== -->
62-
<div
60+
<div
6361
v-else
6462
class="d-flex flex-column currency-symbol ml-2"
6563
>
6664
<MewTokenContainer
67-
:img=" notification.fromObj.icon
68-
? notification.fromObj.icon
69-
: ethTokenPlaceholder"
65+
:img="
66+
notification.fromObj.icon
67+
? notification.fromObj.icon
68+
: ethTokenPlaceholder
69+
"
7070
token-border
7171
/>
7272
<MewTokenContainer
@@ -124,7 +124,7 @@
124124
</div>
125125
</div>
126126
</v-col>
127-
<v-col
127+
<v-col
128128
cols="4"
129129
class="text-right pr-2"
130130
>
@@ -143,17 +143,17 @@
143143
</v-expansion-panel-header>
144144

145145
<v-expansion-panel-content
146-
class="pa-0"
146+
class="pa-0"
147147
:color="backgroundColor"
148148
>
149149
<div class="expanded-container capitalize">
150150
<v-container>
151-
<v-row
151+
<v-row
152152
v-for="(detail, idx) in getDetails"
153153
:key="idx"
154154
>
155-
<v-col
156-
cols="6"
155+
<v-col
156+
cols="6"
157157
class="textPrimary--text"
158158
>
159159
{{ detail.string }}:
@@ -178,7 +178,7 @@
178178
top
179179
>
180180
<template #activator="{ on }">
181-
<a
181+
<a
182182
:href="detail.link"
183183
target="_blank"
184184
v-on="on"
@@ -205,7 +205,6 @@ import MewBadge from '@/components/MewBadge/MewBadge.vue';
205205
import MewBlockie from '@/components/MewBlockie/MewBlockie.vue';
206206
import MewTransformHash from '@/components/MewTransformHash/MewTransformHash.vue';
207207
import ethTokenPlaceholder from '@/assets/images/icons/eth.svg';
208-
209208
export default {
210209
name: 'MewNotification',
211210
components: {
@@ -287,6 +286,10 @@ export default {
287286
showIndicator: {
288287
type: Boolean,
289288
default: true
289+
},
290+
activeOnToggle: {
291+
type: Boolean,
292+
default: true
290293
}
291294
},
292295
data() {
@@ -341,6 +344,11 @@ export default {
341344
return this.notification.type.value.toLowerCase() === this.txTypes.swap;
342345
}
343346
},
347+
watch: {
348+
activeOnToggle() {
349+
this.onToggle();
350+
}
351+
},
344352
methods: {
345353
isHash(type) {
346354
return type === this.hashType;
@@ -397,74 +405,61 @@ export default {
397405
.primary {
398406
border-radius: 0 !important;
399407
}
400-
401408
.v-expansion-panel {
402409
overflow: hidden;
403410
}
404-
405411
.notification-container {
406412
.detail-container {
407413
max-width: 85%;
408-
409414
.detail-hash {
410415
max-width: 60%;
411416
}
412417
}
413-
414418
.indicator {
415419
border-radius: 50% !important;
416420
display: table;
417421
height: 6px;
418422
width: 6px;
419423
}
420-
421424
.expanded-container {
422425
.container {
423426
border-top: 1px solid var(--v-inputBorder-base);
424427
}
425428
}
426429
}
427-
428430
.success-type {
429431
//background-color: var(--v-superPrimary-base);
430432
border: 1px solid var(--v-primary-base);
431433
&.expanded {
432434
border: 1px solid var(--v-superPrimary-base);
433435
}
434-
435436
&.read {
436437
border: 1px solid var(--v-superPrimary-base);
437438
}
438439
}
439-
440440
.pending-type {
441441
//background-color: var(--v-warning-base);
442442
border: 1px solid var(--v-warning-darken1);
443443
&.expanded {
444444
border: 1px solid var(--v-warning-base);
445445
}
446-
447446
&.read {
448447
border: 1px solid var(--v-warning-base);
449448
}
450449
}
451-
452450
.failed-type {
453451
//background-color: var(--v-error-lighten1);
454452
border: 1px solid var(--v-error-base);
455453
&.expanded {
456454
border: 1px solid var(--v-error-lighten1);
457455
}
458-
459456
&.read {
460457
border: 1px solid var(--v-error-lighten1);
461458
}
462459
}
463-
464460
.currency-symbol {
465461
position: relative;
466462
width: 35px;
467-
468463
img {
469464
border-radius: 50%;
470465
}
@@ -473,8 +468,7 @@ export default {
473468
left: 15px;
474469
}
475470
}
476-
477471
.line-height-initial {
478472
line-height: initial;
479473
}
480-
</style>
474+
</style>

‎src/components/MewSelect/MewSelect.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
-->
77
<v-select
88
v-model="selectModel"
9-
height="62"
109
class="mew-select rounded-lg"
1110
color="primary"
1211
append-icon="mdi-chevron-down"
@@ -442,6 +441,7 @@ export default {
442441
* Mew Select styles
443442
*/
444443
.mew-select {
444+
height: 62px;
445445
.mdi-chevron-down {
446446
color: var(--v-titlePrimary-base);
447447
cursor: pointer;

‎src/components/MewTooltip/MewTooltip.vue

+10-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@
99
>
1010
<!-- Popover trigger -->
1111
<template #trigger>
12-
<v-icon v-if="!hideIcon" class="cursor-pointer" color="searchText" small>
12+
<v-icon
13+
v-if="!hideIcon"
14+
class="cursor-pointer"
15+
color="searchText"
16+
small
17+
>
1318
mdi-information
1419
</v-icon>
15-
<slot name="activatorSlot" class="d-flex" />
20+
<slot
21+
name="activatorSlot"
22+
class="d-flex"
23+
/>
1624
</template>
1725
<!-- Popover content -->
1826
<slot name="contentSlot" />