Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devop: use mew-tooltip and fix overlap #326

Merged
merged 26 commits into from
Dec 2, 2022
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2b1e573
devop: add new mew light table
NewCodeOnDaBlock Oct 13, 2022
26c6f7b
chore: add mew light table vue component
NewCodeOnDaBlock Oct 17, 2022
15abd3b
chore: update props
NewCodeOnDaBlock Oct 17, 2022
8390d61
fix: prevent save password popup from chrom browser
hsurf22 Oct 26, 2022
b1ea1fb
devop: update color pallets
hsurf22 Nov 5, 2022
5b7cf53
fix: mew-overlay double scrollbar bug
hsurf22 Nov 18, 2022
362e845
devop: restore original mew-input
hsurf22 Nov 21, 2022
07ce5d5
devop: add MewLightTable component and doc
Abyscuit Nov 23, 2022
2fcb294
chore: update package-lock
Abyscuit Nov 23, 2022
8fa45da
fix: mobile headers
Abyscuit Nov 23, 2022
fca8647
devop: replace v-tooltip with mew-tooltip
Abyscuit Nov 24, 2022
e24394e
chore: update package-lock
Abyscuit Nov 24, 2022
36c28f0
fix: mew-tooltip render issues
Abyscuit Nov 24, 2022
035de97
devop: use MewButton and fix formatting
Abyscuit Nov 29, 2022
65d21aa
chore: run lint
Abyscuit Nov 29, 2022
4370b02
devop: use mew-tooltip and fix overlap
Abyscuit Dec 1, 2022
2f87a98
devop: update light table
hsurf22 Dec 1, 2022
8c202a6
devop: revert lint configs
hsurf22 Dec 1, 2022
e4664d3
devop: rever eslint config
hsurf22 Dec 1, 2022
2db82bb
Merge branch 'devop/add-new-mew-light-table' of github.com:MyEtherWal…
gamalielhere Dec 2, 2022
a2e1eb8
Merge branch 'fix/prevent-save-password-popup-from-chrome' of github.…
gamalielhere Dec 2, 2022
afd55ee
Merge branch 'fix/mew-overlay-double-scrollbar-bug' of github.com:MyE…
gamalielhere Dec 2, 2022
53d2dc4
Merge branch 'devop/update-colors' of github.com:MyEtherWallet/mew-co…
gamalielhere Dec 2, 2022
d6eaa68
chore: update changelog
gamalielhere Dec 2, 2022
9b01ce5
chore: update package, add changelog
gamalielhere Dec 2, 2022
0cfa263
chore: lint, update version
gamalielhere Dec 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
devop: use mew-tooltip and fix overlap
Abyscuit committed Dec 1, 2022

Verified

This commit was signed with the committer’s verified signature.
Abyscuit Marcus E
commit 4370b029d4b0687830cb26a1201f34fb18000824
96 changes: 48 additions & 48 deletions package-lock.json
104 changes: 64 additions & 40 deletions src/components/MewNotification/MewNotification.vue
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
class="px-2 py-0"
:color="backgroundColor"
>
<v-container
<v-container
fluid
class="px-0"
>
@@ -32,7 +32,9 @@
<!-- ===================================================================================== -->
<div
v-if="
$vuetify.breakpoint.smAndUp && !notification.read && showIndicator
$vuetify.breakpoint.smAndUp &&
!notification.read &&
showIndicator
"
:class="[
getClasses(notification.status.value.toLowerCase()),
@@ -57,7 +59,7 @@
<!-- ===================================================================================== -->
<!-- Displays swap icons if it is a swap notification -->
<!-- ===================================================================================== -->
<div
<div
v-else
class="d-flex flex-column currency-symbol ml-2"
>
@@ -104,27 +106,31 @@
class="ml-1 detail-hash"
/>
</div>
<div class="caption mew-heading-2 d-flex align-center">
<div class="mr-1 line-height-initial">
{{ notification.fromObj.amount }}
<span class="textPrimary--text">{{
<div class="caption mew-heading-2 mr-3 align-center">
<div
class="mr-1 line-height-initial d-flex amount-font"
>
{{ fromAmount }}
<span class="textPrimary--text ml-1">{{
notification.fromObj.currency
}}</span>
</div>
<v-icon class="subtitle-1 mr-1">
mdi-arrow-right
</v-icon>
<div class="mr-3 line-height-initial">
{{ notification.toObj.amount }}
<span class="textPrimary--text">{{
<div
class="amount-container amount-font mr-3 d-flex line-height-initial"
>
<v-icon class="subtitle-1 mr-1">
mdi-arrow-right
</v-icon>
{{ toAmount }}
<span class="textPrimary--text ml-1">{{
notification.toObj.currency
}}</span>
</div>
</div>
</div>
</div>
</v-col>
<v-col
<v-col
cols="4"
class="text-right pr-2"
>
@@ -143,17 +149,17 @@
</v-expansion-panel-header>

<v-expansion-panel-content
class="pa-0"
class="pa-0"
:color="backgroundColor"
>
<div class="expanded-container capitalize">
<v-container>
<v-row
<v-row
v-for="(detail, idx) in getDetails"
:key="idx"
>
<v-col
cols="6"
<v-col
cols="6"
class="textPrimary--text"
>
{{ detail.string }}:
@@ -170,14 +176,13 @@
cols="6"
class="text-right"
>
<v-tooltip
eager
open-on-hover
<mew-tooltip
content-class="tooltip-inner"
color="titlePrimary--text"
top
max-width="550px"
hide-icon
>
<template #activator="{ on }">
<template #activatorSlot="{ on }">
<a
:href="detail.link"
target="_blank"
@@ -186,8 +191,10 @@
<mew-transform-hash :hash="detail.value" />
</a>
</template>
<span>{{ detail.value }}</span>
</v-tooltip>
<template #contentSlot>
<span>{{ detail.value }}</span>
</template>
</mew-tooltip>
</v-col>
</v-row>
</v-container>
@@ -205,13 +212,16 @@ import MewBadge from '@/components/MewBadge/MewBadge.vue';
import MewBlockie from '@/components/MewBlockie/MewBlockie.vue';
import MewTransformHash from '@/components/MewTransformHash/MewTransformHash.vue';
import ethTokenPlaceholder from '@/assets/images/icons/eth.svg';
import MewTooltip from '@/components/MewTooltip/MewTooltip.vue';
export default {
name: 'MewNotification',
components: {
MewTokenContainer,
MewBadge,
MewBlockie,
MewTransformHash
MewTransformHash,
MewTooltip
},
props: {
/**
@@ -286,16 +296,11 @@ export default {
showIndicator: {
type: Boolean,
default: true
},
activeOnToggle: {
type: Boolean,
default: true
}
},
data() {
return {
ethTokenPlaceholder: ethTokenPlaceholder,
expanded: false,
txTypes: {
in: 'txIn',
out: 'txOut',
@@ -310,6 +315,16 @@ export default {
};
},
computed: {
fromAmount() {
return this.notification.fromObj.amount.length > 10
? this.notification.fromObj.amount.slice(0, 9 - 1) + '...'
: this.notification.fromObj.amount;
},
toAmount() {
return this.notification.toObj.amount.length > 10
? this.notification.toObj.amount.slice(0, 9 - 1) + '...'
: this.notification.toObj.amount;
},
backgroundColor() {
if (this.notification.status.value == this.txStatusOptions.pending) {
return 'warning';
@@ -344,11 +359,6 @@ export default {
return this.notification.type.value.toLowerCase() === this.txTypes.swap;
}
},
watch: {
activeOnToggle() {
this.onToggle();
}
},
methods: {
isHash(type) {
return type === this.hashType;
@@ -383,9 +393,6 @@ export default {
}
return 'failed-type';
}
},
onToggle() {
this.expanded = !this.expanded;
}
}
};
@@ -400,66 +407,82 @@ export default {
</style>

<style lang="scss" scoped>
.amount-font {
font-size: 12px;
}
.warning,
.error,
.primary {
border-radius: 0 !important;
}
.v-expansion-panel {
overflow: hidden;
}
.notification-container {
.detail-container {
max-width: 85%;
.detail-hash {
max-width: 60%;
}
}
.indicator {
border-radius: 50% !important;
display: table;
height: 6px;
width: 6px;
}
.expanded-container {
.container {
border-top: 1px solid var(--v-inputBorder-base);
}
}
}
.success-type {
//background-color: var(--v-superPrimary-base);
border: 1px solid var(--v-primary-base);
&.expanded {
border: 1px solid var(--v-superPrimary-base);
}
&.read {
border: 1px solid var(--v-superPrimary-base);
}
}
.pending-type {
//background-color: var(--v-warning-base);
border: 1px solid var(--v-warning-darken1);
&.expanded {
border: 1px solid var(--v-warning-base);
}
&.read {
border: 1px solid var(--v-warning-base);
}
}
.failed-type {
//background-color: var(--v-error-lighten1);
border: 1px solid var(--v-error-base);
&.expanded {
border: 1px solid var(--v-error-lighten1);
}
&.read {
border: 1px solid var(--v-error-lighten1);
}
}
.currency-symbol {
position: relative;
width: 35px;
img {
border-radius: 50%;
}
@@ -468,7 +491,8 @@ export default {
left: 15px;
}
}
.line-height-initial {
line-height: initial;
}
</style>
</style>