Skip to content

Commit

Permalink
Merge pull request #341 from MyEtherWallet/bug/top-nav-issue
Browse files Browse the repository at this point in the history
bug/top-nav-issue
  • Loading branch information
gamalielhere authored Jan 5, 2019
2 parents 6e41297 + c53e01d commit 6353965
Show file tree
Hide file tree
Showing 33 changed files with 185 additions and 88 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Bug

- Fix front interface bugs [#344](https://github.com/MyEtherWallet/MyEtherWallet/pull/344)
- Hide header on getting start [#341](https://github.com/MyEtherWallet/MyEtherWallet/pull/341)
- Only show security button on specific pages [#334](https://github.com/MyEtherWallet/MyEtherWallet/pull/334)
- Fix/replace apple qr code [#323](https://github.com/MyEtherWallet/MyEtherWallet/pull/323)
- Fix ENS resolver/error placement [#324](https://github.com/MyEtherWallet/MyEtherWallet/pull/324)
Expand Down
2 changes: 1 addition & 1 deletion src/builds/web/app.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div id="app">
<header-container />
<header-container v-show="$route.fullPath !== '/getting-started'" />
<router-view />
<footer-container />
<confirmation-container v-if="wallet !== null" />
Expand Down
4 changes: 3 additions & 1 deletion src/components/ScrollUpButton/ScrollUpButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
</template>

<script>
import Misc from '@/helpers/misc';
export default {
data() {
return {};
},
methods: {
scrollToTop: function() {
window.scrollTo(0, 0);
Misc.scrollToTop(500);
}
}
};
Expand Down
5 changes: 5 additions & 0 deletions src/components/UserReminderButton/UserReminderButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}

.popup-box {
display: none;
position: absolute;
left: -3px;
top: -29px;
Expand All @@ -18,6 +19,10 @@
border-radius: 4px;
box-shadow: 0 0 25px rgba(0, 0, 0, 0.18);

&:hover {
display: block;
}

&::after {
border-color: $white transparent transparent transparent;
content: '';
Expand Down
5 changes: 0 additions & 5 deletions src/containers/AboutContainer/AboutContainer-desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
background-position: right top;
background-repeat: no-repeat;
background-size: 55%;

@media all and (max-width: $tablet-width) {
background-position: center 300px;
background-size: 140%;
}
}

.content {
Expand Down
4 changes: 2 additions & 2 deletions src/containers/AboutContainer/AboutContainer-mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

.star-background {
background-image: url('~@/assets/images/home/stars.svg');
background-position: right top;
background-position: center;
background-repeat: no-repeat;
background-size: 55%;
background-size: 100%;
}

.content {
Expand Down
9 changes: 2 additions & 7 deletions src/containers/AboutContainer/AboutContainer-tablet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@

.star-background {
background-image: url('~@/assets/images/home/stars.svg');
background-position: right top;
background-position: center;
background-repeat: no-repeat;
background-size: 55%;

@media all and (max-width: $tablet-width) {
background-position: center 300px;
background-size: 140%;
}
background-size: 100%;
}

.content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@
padding: 25px;
}
}

.modal-content-block {
padding: 40px 0;
}

.button-container {
margin-bottom: 0 !important;
margin-top: 20px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@
centered
hide-footer
hide-header
class="bootstrap-modal"
class="bootstrap-modal no-padding"
>
<div class="d-block text-center">
<i class="check-icon fa fa-check" aria-hidden="true" />
<h2 class="title">{{ $t('confirmation.success') }}</h2>
<p>{{ message }}</p>
</div>
<div class="button-container">
<b-btn
class="mid-round-button-green-filled close-button"
@click="hideModal"
>
{{ linkMessage === '' ? 'Ok' : linkMessage }}
</b-btn>
<div class="modal-content-block">
<div class="d-block text-center">
<i class="check-icon fa fa-check" aria-hidden="true" />
<h2 class="title">{{ $t('confirmation.success') }}</h2>
<p>{{ message }}</p>
</div>
<div class="button-container">
<div
class="mid-round-button-green-filled close-button"
@click="hideModal"
>
{{ linkMessage === '' ? 'Ok' : linkMessage }}
</div>
</div>
</div>
<!-- .modal-content-block -->
</b-modal>
</template>

Expand Down
6 changes: 6 additions & 0 deletions src/containers/HeaderContainer/HeaderContainer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
}
}

.page-container {
@media all and (max-width: $tablet-width) {
padding: 0;
}
}

.scrollup-container {
opacity: 0;
pointer-events: none;
Expand Down
10 changes: 7 additions & 3 deletions src/containers/HeaderContainer/HeaderContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@
}}</a>
</li>
<li>
<a href="/#faqs" @click="isMobileMenuOpen = false">{{
$t('common.faqs')
}}</a>
<a
href="https://kb.myetherwallet.com"
target="_blank"
@click="isMobileMenuOpen = false"
>
Help Center
</a>
</li>
<li>
<div class="mobile-language-menu-container">
Expand Down
20 changes: 19 additions & 1 deletion src/helpers/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ const sanitizeHex = hex => {
return '0x' + padLeftEven(hex);
};

const scrollToTop = (scrollDuration) => {
const scrollHeight = window.scrollY,
scrollStep = Math.PI / (scrollDuration / 15),
cosParameter = scrollHeight / 2;

let scrollCount = 0;
let scrollMargin;
const scrollInterval = setInterval(function() {
if (window.scrollY != 0) {
scrollCount = scrollCount + 1;
scrollMargin =
cosParameter - cosParameter * Math.cos(scrollCount * scrollStep);
window.scrollTo(0, scrollHeight - scrollMargin);
} else clearInterval(scrollInterval);
}, 15);
}

const validateHexString = str => {
if (str == '') return true;
str =
Expand All @@ -79,5 +96,6 @@ export default {
isValidENSAddress,
isValidETHAddress,
sanitizeHex,
validateHexString
validateHexString,
scrollToTop
};
4 changes: 2 additions & 2 deletions src/layouts/CreateWalletLayout/CreateWalletLayout-mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
text-align: center;
margin-bottom: 13px;
img {
height: 30px;
height: 38px;
margin: 0 3px;
}
}
Expand All @@ -58,7 +58,7 @@
width: 78%;
}
}
}
} // .mew-connect-block

.nav-tab-user-input-box {
background-color: $background-color-white;
Expand Down
21 changes: 14 additions & 7 deletions src/layouts/CreateWalletLayout/CreateWalletLayout-tablet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@

.title-block {
margin-bottom: 40px;
display: flex;
display: block;

p {
text-align: center;
}

.title-popover {
margin: 0 auto;
display: flex;
align-items: center;
text-align: center;
margin-bottom: 10px;
justify-content: center;

h3 {
max-width: 320px;
line-height: 28px;
Expand All @@ -27,9 +34,9 @@
.appstores {
.icons {
text-align: center;
margin-bottom: 25px;
margin-bottom: 13px;
img {
height: 40px;
height: 38px;
margin: 0 3px;
}
}
Expand All @@ -48,10 +55,10 @@
margin-top: 50px;
text-align: center;
img {
width: 60%;
width: 78%;
}
}
}
} // .mew-connect-block

.nav-tab-user-input-box {
background-color: $background-color-white;
Expand All @@ -73,8 +80,8 @@
}

.tab-pane {
min-height: 500px;
padding: 50px;
min-height: 420px;
padding: 35px 25px;
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/layouts/CreateWalletLayout/CreateWalletLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ import CreateWalletInputFooter from './components/CreateWalletInputFooter';
import PageFooter from './components/PageFooter';
import PageTitle from './components/PageTitle';
import store from 'store';
import Misc from '@/helpers/misc';
export default {
components: {
Expand Down Expand Up @@ -137,6 +138,7 @@ export default {
},
methods: {
switcher(by) {
Misc.scrollToTop(1000);
if (by === 'Json') {
this.byJson = true;
this.byMnemonic = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<!-- === MEW custom form ======================================== -->
<button
:class="[
param === 'Json' && (errors.has('password') || value.length === 0)
param === 'Json' && (errors.has('password') || value.length === 0 || strengthClass !== 'strong')
? 'disabled'
: '',
'large-round-button-green-filled next-button'
Expand Down Expand Up @@ -95,8 +95,8 @@ export default {
this.strengthClass = 'weak';
break;
case 3:
this.strength = 'Weak';
this.strengthClass = 'weak';
this.strength = 'Good';
this.strengthClass = 'strong';
break;
case 4:
this.strength = 'Strong';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import '~@/scss/GlobalVariables';

.footer-text {
text-align: center;
p {
span {
color: $text-color-5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
cursor: pointer;
display: block;
margin: 0 auto;
width: 280px;
text-decoration: none;
text-align: center;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
cursor: pointer;
display: block;
margin: 0 auto;
width: 280px;
min-width: 200px;
text-decoration: none;
text-align: center;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
:class="[
{ disable: !downloadable },
'next-button',
'large-round-button-green-filled'
'large-round-button-green-filled',
'nopadding'
]"
:download="name"
@click="downloadDone()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
display: grid;
grid-column-gap: 20px;
grid-row-gap: 20px;
grid-template-columns: 1fr 1fr 1fr;
grid-template-columns: 1fr 1fr;
margin-bottom: 20px;

li {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@
padding: 25px;
}
}

.modal-container-block {
padding: 30px;
}

.button-container {
margin-bottom: 0 !important;
margin-top: 30px;
}
Loading

0 comments on commit 6353965

Please sign in to comment.