1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Fix connection modal style issues (#8433)

Resolves three different style issues due to overflow of content
and addresses an issue where UI was being squished due to available
screen real estate.

- On the choose account modal, when a user has enough accounts to need
to scroll within the account chooser, the last-connected data column
was squished. This is resolved by using a tooltip and icon for this data
rather than text printed in column.
- On the connection permission result screen where it shows the Dapp icon ->
Metamask icon, the bottom of the logos and dropshadows were being cut off
this was resolved by removing the height set on this element and allowing
it to fill the available space.
- On the confirmation screen the content appeared off center due to the scrollbar being overlayed instead of auto. This was resolved by removing some of the setting of manual overflow controls on the body element.
This commit is contained in:
Brad Decker 2020-05-04 10:04:41 -05:00 committed by GitHub
parent 786e82791e
commit eaa9f759f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 31 deletions

View File

@ -1,14 +1,10 @@
<!doctype html> <!doctype html>
<html style="height:600px;"> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8"> <meta charset="utf-8">
<title>MetaMask Notification</title> <title>MetaMask Notification</title>
<style> <style>
body {
overflow: hidden;
}
#app-content { #app-content {
display: flex; display: flex;
flex-flow: column; flex-flow: column;
@ -31,7 +27,7 @@
<link rel="stylesheet" type="text/css" href="./index.css" title="ltr"> <link rel="stylesheet" type="text/css" href="./index.css" title="ltr">
<link rel="stylesheet" type="text/css" href="./index-rtl.css" title="rtl" disabled> <link rel="stylesheet" type="text/css" href="./index-rtl.css" title="rtl" disabled>
</head> </head>
<body class="notification" style="height:600px;"> <body class="notification">
<div id="app-content"> <div id="app-content">
<img id="loading__logo" src="./images/logo/metamask-fox.svg" /> <img id="loading__logo" src="./images/logo/metamask-fox.svg" />
<img id="loading__spinner" src="./images/spinner.gif" /> <img id="loading__spinner" src="./images/spinner.gif" />

View File

@ -52,6 +52,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
padding-top: 8px; padding-top: 8px;
height: 144px;
} }
a, a:hover { a, a:hover {
@ -156,7 +157,6 @@
align-items: center; align-items: center;
text-align: center; text-align: center;
color: $Black-100; color: $Black-100;
height: 114px;
&__icons { &__icons {
display: flex; display: flex;

View File

@ -18,10 +18,7 @@ body {
margin: 0; margin: 0;
padding: 0; padding: 0;
font-size: 16px; font-size: 16px;
overflow: auto;
@media screen and (max-width: $break-small) {
overflow-y: overlay;
}
} }
html { html {

View File

@ -110,10 +110,9 @@ export default class ChooseAccount extends Component {
</div> </div>
{ addressLastConnectedMap[address] { addressLastConnectedMap[address]
? ( ? (
<div className="permissions-connect-choose-account__account__last-connected"> <Tooltip title={`${this.context.t('lastConnected')} ${addressLastConnectedMap[address]}`}>
<span>{ this.context.t('lastConnected') }</span> <i className="fa fa-info-circle" />
{ addressLastConnectedMap[address] } </Tooltip>
</div>
) )
: null : null
} }

View File

@ -7,6 +7,17 @@
margin-right: auto; margin-right: auto;
height: 100%; height: 100%;
.fa-info-circle {
color: $Grey-200;
cursor: pointer;
margin-left: 8px;
font-size: 0.9rem;
}
.fa-info-circle:hover {
color: $Grey-300;
}
@media screen and (min-width: 576px) { @media screen and (min-width: 576px) {
width: 426px; width: 426px;
} }
@ -60,6 +71,7 @@
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
min-width:0;
} }
&__list-check-box { &__list-check-box {
@ -78,21 +90,6 @@
display: flex; display: flex;
margin-left: 16px; margin-left: 16px;
align-items: center; align-items: center;
.fa-info-circle, .fa-info-circle:hover {
color: $silver;
cursor: pointer;
margin-left: 8px;
font-size: 0.9rem;
}
.fa-info-circle {
cursor: pointer;
}
.fa-info-circle:hover {
color: $mid-gray;
}
} }
&__account { &__account {
@ -115,11 +112,15 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: 16px; margin-left: 16px;
min-width: 0;
} }
&__label { &__label {
@extend %content-text; @extend %content-text;
color: $Black-100; color: $Black-100;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
} }
&__balance { &__balance {
@ -184,4 +185,4 @@
} }
} }
} }