aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Settings.js')
-rw-r--r--vnext/src/ui/Settings.js38
1 files changed, 18 insertions, 20 deletions
diff --git a/vnext/src/ui/Settings.js b/vnext/src/ui/Settings.js
index 6e9d4f36..380d8ff6 100644
--- a/vnext/src/ui/Settings.js
+++ b/vnext/src/ui/Settings.js
@@ -32,16 +32,14 @@ function ChangeAvatarForm({ onChange }) {
if (preview) {
previewUser = { ...visitor, avatar: preview, uname: '<preview>' };
}
- let onSubmitAvatar = (event) => {
+ let onSubmitAvatar = async (event) => {
if (event.preventDefault) {
event.preventDefault();
}
- updateAvatar(avatarInput.current.files[0]).then(() => {
- avatarChanged('');
- me().then(visitor => {
- onChange(visitor);
- }).catch(console.error);
- }).catch(console.error);
+ await updateAvatar(avatarInput.current.files[0]);
+ avatarChanged('');
+ let visitor = await me();
+ onChange(visitor);
};
return (
<form>
@@ -124,20 +122,20 @@ export default function Settings({ onChange }) {
{visitor.telegramName ? (
<form>
<div>Telegram: <b> {visitor.telegramName} </b> &mdash;
- <Button onClick={disableTelegram}>Disable</Button>
+ <Button onClick={disableTelegram}>Disable</Button>
</div>
</form>
) : (
- <p>To connect Telegram account: send any text message to <a href="https://telegram.me/Juick_bot">@Juick_bot</a>
- </p>
- )}
+ <p>To connect Telegram account: send any text message to <a href="https://telegram.me/Juick_bot">@Juick_bot</a>
+ </p>
+ )}
</fieldset>
{
visitor.jids && (
<form>
<fieldset>
<legend>XMPP accounts
- </legend>
+ </legend>
<p>Your accounts:</p>
<p>
{
@@ -205,7 +203,7 @@ export default function Settings({ onChange }) {
{/** /email_off */}
<p>&nbsp;</p>
<p>You can post to Juick via e-mail. Send your <u>plain text</u> messages to <a href="mailto:juick@juick.com">juick@juick.com</a>.
- You can attach one photo or video file.</p>
+ You can attach one photo or video file.</p>
</>
}
</fieldset>
@@ -228,19 +226,19 @@ export default function Settings({ onChange }) {
</div>
</form>
) : (
- <p>Cross-posting to Facebook:
- <a href="/_fblogin">
- <img src="//static.juick.com/facebook-connect.png" alt="Connect to Facebook" />
- </a>
- </p>
- )}
+ <p>Cross-posting to Facebook:
+ <a href="/_fblogin">
+ <img src="//static.juick.com/facebook-connect.png" alt="Connect to Facebook" />
+ </a>
+ </p>
+ )}
</fieldset>
<fieldset>
<legend><Icon name="ei-sc-twitter" size="m" />Twitter</legend>
{visitor.twitterName ?
<form action="/settings" method="post">
<div>Twitter: <b>{visitor.twitterName}</b>&mdash;
- <input type="hidden" name="page" value="twitter-del" />
+ <input type="hidden" name="page" value="twitter-del" />
<Button onClick={disableTwitter}>Disable</Button>
</div>
</form>