Browse Source

fix(contacts-form): show loading spinner next to manual form when there are loading channels so the user has some feedback from the manual form

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
674d21b3e0
  1. 9
      app/components/Contacts/ContactsForm.js
  2. 8
      app/components/Contacts/ContactsForm.scss

9
app/components/Contacts/ContactsForm.js

@ -174,6 +174,15 @@ class ContactsForm extends React.Component {
onChange={event => this.setState({ manualFormInput: event.target.value })}
/>
<div className={styles.submit} onClick={manualFormSubmit}>Submit</div>
{
loadingChannelPubkeys.length > 0 &&
<div className={styles.manualFormSpinner}>
<div className={styles.loading}>
<div className={styles.spinner} />
</div>
</div>
}
</section>
</div>
}

8
app/components/Contacts/ContactsForm.scss

@ -120,6 +120,7 @@
}
.manualForm {
position: relative;
background: $lightgrey;
color: $darkestgrey;
padding: 30px 15px;
@ -151,6 +152,13 @@
color: $main;
}
}
.manualFormSpinner {
position: absolute;
right: 0;
top: 50%;
padding: 0 10px;
}
}
.footer {

Loading…
Cancel
Save