From f6cfeb4328e9661255e8d238a219bd2e8ff84d84 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 17 Nov 2016 16:05:00 -0800 Subject: [PATCH] Some smaller fixes --- app/sync/index.js | 4 - app/ui/components/modals/LoginModal.js | 137 +++++++++--------- .../modals/PaymentNotificationModal.js | 6 +- app/ui/components/modals/SettingsModal.js | 2 +- 4 files changed, 73 insertions(+), 76 deletions(-) diff --git a/app/sync/index.js b/app/sync/index.js index b34d17f1f0..d8453043d9 100644 --- a/app/sync/index.js +++ b/app/sync/index.js @@ -59,7 +59,6 @@ export async function init () { setTimeout(pull, START_PULL_DELAY); setTimeout(pushActiveDirtyResources, START_PUSH_DELAY); - setInterval(pull, FULL_SYNC_INTERVAL); isInitialized = true; logger.debug('Initialized'); } @@ -75,9 +74,6 @@ export function doInitialSync () { // they already exist on the server. await pull(null, false); - // Make sure all other resources were created - await _getOrCreateAllActiveResources(); - // Make sure sync is on (start the timers) await init(); }); diff --git a/app/ui/components/modals/LoginModal.js b/app/ui/components/modals/LoginModal.js index edf05b5dfb..9b83173393 100644 --- a/app/ui/components/modals/LoginModal.js +++ b/app/ui/components/modals/LoginModal.js @@ -61,76 +61,79 @@ class LoginModal extends Component { render () { const {step, title, message} = this.state; + let inner; if (step === 1) { - return ( -
- this.modal = m} {...this.props}> - {title || "Login to Your Account"} - - {message ? ( -

{message}

- ) : null} - -
- this._emailInput = n}/> -
- -
- this._passwordInput = n}/> -
- {this.state.error ? ( -
** {this.state.error}
- ) : null} -
- -
- Don't have an account yet? - {" "} - Signup -
- -
-
-
- ) + inner = [ + {title || "Login to Your Account"}, + + {message ? ( +

{message}

+ ) : null} + +
+ this._emailInput = n}/> +
+ +
+ this._passwordInput = n}/> +
+ {this.state.error ? ( +
** {this.state.error}
+ ) : null} +
, + +
+ Don't have an account yet? + {" "} + Signup +
+ +
+ ] } else { - return ( - this.modal = m} {...this.props}> - Login Success - -

Enjoy your stay!

-

- If you have any questions or concerns, send you email to - {" "} - - support@insomnia.rest - -

-
- - - -
- ) + inner = [ + Login Success, + +

Enjoy your stay!

+

+ If you have any questions or concerns, send you email to + {" "} + + support@insomnia.rest + +

+
, + + + + ] } + + return ( +
+ this.modal = m} {...this.props}> + {inner} + +
+ ) } } diff --git a/app/ui/components/modals/PaymentNotificationModal.js b/app/ui/components/modals/PaymentNotificationModal.js index 194f7fa102..dc8ea84840 100644 --- a/app/ui/components/modals/PaymentNotificationModal.js +++ b/app/ui/components/modals/PaymentNotificationModal.js @@ -19,13 +19,11 @@ class PaymentNotificationModal extends Component { } hidePaymentNotificationUntilNextLaunch = true; - this.modal.show(); } hide () { trackEvent('Billing', 'Trial Ended', 'Cancel'); - this.modal.hide(); } @@ -39,8 +37,8 @@ class PaymentNotificationModal extends Component { Hi {session.getFirstName()},

- Your free trial has ended. please enter your billing information to - continue using Insomnia Plus. + Your Insomnia Plus trial has ended. please enter your billing information to + continue using your account.


diff --git a/app/ui/components/modals/SettingsModal.js b/app/ui/components/modals/SettingsModal.js index 819f0f6bd1..2ab80428b1 100644 --- a/app/ui/components/modals/SettingsModal.js +++ b/app/ui/components/modals/SettingsModal.js @@ -50,7 +50,7 @@ class SettingsModal extends Component { trackEvent('Sync', 'Reset'); await sync.resetRemoteData(); await sync.resetLocalData(); - await session.logout(); + await sync.logout(); } render () {