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

Fix for contacts tab alignment bugs (#17171)

This commit is contained in:
aleksandar-mihajlovic 2023-01-17 22:36:33 +01:00 committed by GitHub
parent 7d616fa513
commit 082772fd08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 6 deletions

View File

@ -100,7 +100,7 @@ export default class EditContact extends PureComponent {
onChange={(e) => this.setState({ newAddress: e.target.value })} onChange={(e) => this.setState({ newAddress: e.target.value })}
fullWidth fullWidth
multiline multiline
rows={3} rows={4}
margin="dense" margin="dense"
classes={{ classes={{
inputMultiline: inputMultiline:
@ -169,6 +169,11 @@ export default class EditContact extends PureComponent {
history.push(`${viewRoute}/${address}`); history.push(`${viewRoute}/${address}`);
}} }}
submitText={this.context.t('save')} submitText={this.context.t('save')}
disabled={
this.state.newName === name &&
this.state.newAddress === address &&
this.state.newMemo === memo
}
/> />
</div> </div>
); );

View File

@ -16,6 +16,11 @@
} }
} }
&__header {
display: flex;
align-items: center;
}
&__header, &__header,
&__header--edit { &__header--edit {
&__name { &__name {
@ -102,7 +107,7 @@
} }
&__address { &__address {
height: 60px !important; height: 90px !important;
textarea { textarea {
padding-top: 10px !important; padding-top: 10px !important;
@ -119,7 +124,7 @@
@include H7; @include H7;
color: var(--color-text-alternative); color: var(--color-text-alternative);
margin-bottom: 0.25rem; margin-top: 0.75rem;
} }
&__label--capitalized { &__label--capitalized {

View File

@ -11,10 +11,10 @@ import { useI18nContext } from '../../../../hooks/useI18nContext';
import { useCopyToClipboard } from '../../../../hooks/useCopyToClipboard'; import { useCopyToClipboard } from '../../../../hooks/useCopyToClipboard';
function quadSplit(address) { function quadSplit(address) {
return `0x ${address return `0x${address
.slice(2) .slice(2)
.match(/.{1,4}/gu) .match(/.{1,4}/gu)
.join(' ')}`; .join('')}`;
} }
function ViewContact({ function ViewContact({
@ -38,7 +38,7 @@ function ViewContact({
<div className="settings-page__content-item"> <div className="settings-page__content-item">
<div className="settings-page__header address-book__header"> <div className="settings-page__header address-book__header">
<Identicon address={address} diameter={60} /> <Identicon address={address} diameter={60} />
<div className="address-book__header__name">{name}</div> <div className="address-book__header__name">{name || address}</div>
</div> </div>
<div className="address-book__view-contact__group"> <div className="address-book__view-contact__group">
<Button <Button

View File

@ -171,6 +171,11 @@
&__subheader--break { &__subheader--break {
margin-inline-start: 4px; margin-inline-start: 4px;
white-space: nowrap;
width: 100%;
max-width: calc(100% - 125px - 85px);
overflow: hidden;
text-overflow: ellipsis;
} }
&__sub-header { &__sub-header {