Skip to content

Commit

Permalink
Ana/3199 mobile close button signin (#3238)
Browse files Browse the repository at this point in the history
* add close x to signin

* add close button for signin good

* update snapshots

* changelog

* add user box class to closing button

* add close button for mobile

* adjust margins

* update snapshot

* update test and snap

* simplify. no desktop logic. media queries

* update snapshots

* fix lint error
  • Loading branch information
Bitcoinera authored and faboweb committed Dec 3, 2019
1 parent b3b9817 commit 8a2915a
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 30 deletions.
1 change: 1 addition & 0 deletions changes/ana_3199-mobile-close-button-signin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Added] [#3199](https://github.com/cosmos/lunie/issues/3199) Now there is a close button also for mobile screen during the sign in flow @Bitcoinera
17 changes: 11 additions & 6 deletions src/components/common/SessionFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@
<slot></slot>
</div>
</div>
<TmBtn
class="session-close"
value="Back to Lunie"
color="secondary"
@click.native="$router.push(`/`)"
/>
<div class="session-close">
<TmBtn
class="session-close-button"
value="Back to Lunie"
color="secondary"
@click.native="$router.push(`/`)"
/>
<a class="user-box" @click="goBack">
<i class="material-icons">close</i>
</a>
</div>
</div>
</transition>
</template>
Expand Down
3 changes: 3 additions & 0 deletions src/components/common/TmSessionWelcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
alt="a small spinning circle to display loading"
/>
</router-link>
<router-link to="/" class="session-close-mobile user-box">
<i class="material-icons">close</i>
</router-link>

<h2 class="session-title welcome">
Welcome to Lunie
Expand Down
45 changes: 44 additions & 1 deletion src/styles/session.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,28 @@
padding: 0 1rem;
}

.user-box {
font-size: 12px;
margin-right: 1rem;
border-radius: 0.25rem;
display: flex;
justify-content: space-between;
align-items: center;
}

.user-box i {
display: flex;
align-items: center;
padding: 0.5rem;
border-radius: 50%;
background: var(--bc-dim);
}

.user-box i:hover {
background: var(--bc);
cursor: pointer;
}

.session .material-icons.circle.back {
background: var(--app-fg);
color: var(--dim);
Expand All @@ -158,6 +180,10 @@
display: none;
}

.session-close-mobile {
display: none;
}

.session-paragraph {
display: none;
}
Expand Down Expand Up @@ -194,10 +220,27 @@
.session-footer button {
width: 100%;
}

.session-close-mobile {
display: block;
position: absolute;
right: 1rem;
top: 2.5rem;
}

.session-close {
display: none;
}
}

@media screen and (max-width: 1023px) {
.session-frame .session-close {
.session-close .session-close-button {
display: none;
}
}

@media screen and (min-width: 1024px) {
.session-close .user-box {
display: none;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,24 @@ exports[`SessionFrame shows an overview of all wallets to sign in with from the
</div>
</div>
<tmbtn-stub
<div
class="session-close"
color="secondary"
value="Back to Lunie"
/>
>
<tmbtn-stub
class="session-close-button"
color="secondary"
value="Back to Lunie"
/>
<a
class="user-box"
>
<i
class="material-icons"
>
close
</i>
</a>
</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ exports[`TmSessionHardware should show a state indicator for different states of
</div>
</div>
</div>
</div> <button class="button session-close" color="secondary">
Back to Lunie
</button>
</div>
<div class="session-close"><button class="button session-close-button" color="secondary">
Back to Lunie
</button> <a class="user-box"><i class="material-icons">close</i></a></div>
</div>
`;
Expand Down Expand Up @@ -58,9 +59,10 @@ exports[`TmSessionHardware should show a state indicator for different states of
</div>
</div>
</div>
</div> <button class="button session-close" color="secondary">
Back to Lunie
</button>
</div>
<div class="session-close"><button class="button session-close-button" color="secondary">
Back to Lunie
</button> <a class="user-box"><i class="material-icons">close</i></a></div>
</div>
`;
Expand All @@ -86,9 +88,10 @@ exports[`TmSessionHardware should show a state indicator for different states of
</div>
</div>
</div>
</div> <button class="button session-close" color="secondary">
Back to Lunie
</button>
</div>
<div class="session-close"><button class="button session-close-button" color="secondary">
Back to Lunie
</button> <a class="user-box"><i class="material-icons">close</i></a></div>
</div>
`;
Expand Down Expand Up @@ -180,14 +183,28 @@ exports[`TmSessionHardware shows the ledger conection view when there're errors
</div>
</div>
<button
class="button session-close"
color="secondary"
<div
class="session-close"
>
<button
class="button session-close-button"
color="secondary"
>
Back to Lunie
</button>
</button>
<a
class="user-box"
>
<i
class="material-icons"
>
close
</i>
</a>
</div>
</div>
`;
Expand Down Expand Up @@ -273,13 +290,27 @@ exports[`TmSessionHardware shows the ledger conection view with no errors 1`] =
</div>
</div>
<button
class="button session-close"
color="secondary"
<div
class="session-close"
>
<button
class="button session-close-button"
color="secondary"
>
Back to Lunie
</button>
</button>
<a
class="user-box"
>
<i
class="material-icons"
>
close
</i>
</a>
</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ exports[`TmSessionWelcome has the expected html structure 1`] = `
/>
</router-link-stub>
<router-link-stub
class="session-close-mobile user-box"
to="/"
>
<i
class="material-icons"
>
close
</i>
</router-link-stub>
<h2
class="session-title welcome"
>
Expand Down Expand Up @@ -99,6 +110,17 @@ exports[`TmSessionWelcome has the expected html structure when on mobile 1`] = `
/>
</router-link-stub>
<router-link-stub
class="session-close-mobile user-box"
to="/"
>
<i
class="material-icons"
>
close
</i>
</router-link-stub>
<h2
class="session-title welcome"
>
Expand Down

0 comments on commit 8a2915a

Please sign in to comment.