mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-25 16:19:20 -04:00
Some smaller fixes
This commit is contained in:
1 parent
3cbc43de6b
commit
f6cfeb4328
4 files changed
+73
-76
No files matched your search
@@ -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();
|
||||
});
|
||||
|
||||
@@ -61,76 +61,79 @@ class LoginModal extends Component {
|
||||
|
||||
render () {
|
||||
const {step, title, message} = this.state;
|
||||
let inner;
|
||||
if (step === 1) {
|
||||
return (
|
||||
<form onSubmit={this._handleLogin.bind(this)}>
|
||||
<Modal ref={m => this.modal = m} {...this.props}>
|
||||
<ModalHeader>{title || "Login to Your Account"}</ModalHeader>
|
||||
<ModalBody className="pad">
|
||||
{message ? (
|
||||
<p className="notice info">{message}</p>
|
||||
) : null}
|
||||
<label htmlFor="login-email">Email</label>
|
||||
<div className="form-control form-control--outlined">
|
||||
<input type="email"
|
||||
required="required"
|
||||
id="login-email"
|
||||
name="login-email"
|
||||
placeholder="me@mydomain.com"
|
||||
ref={n => this._emailInput = n}/>
|
||||
</div>
|
||||
<label htmlFor="login-password">Password</label>
|
||||
<div className="form-control form-control--outlined">
|
||||
<input type="password"
|
||||
required="required"
|
||||
id="login-password"
|
||||
name="login-password"
|
||||
placeholder="•••••••••••••••••"
|
||||
ref={n => this._passwordInput = n}/>
|
||||
</div>
|
||||
{this.state.error ? (
|
||||
<div className="danger pad-top">** {this.state.error}</div>
|
||||
) : null}
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<div className="margin-left">
|
||||
Don't have an account yet?
|
||||
{" "}
|
||||
<a href="#" onClick={this._handleSignup.bind(this)}>Signup</a>
|
||||
</div>
|
||||
<button type="submit" className="btn">
|
||||
{this.state.loading ? <i
|
||||
className="fa fa-spin fa-refresh margin-right-sm"></i> : null}
|
||||
Login
|
||||
</button>
|
||||
</ModalFooter>
|
||||
</Modal>
|
||||
</form>
|
||||
)
|
||||
inner = [
|
||||
<ModalHeader key="header">{title || "Login to Your Account"}</ModalHeader>,
|
||||
<ModalBody key="body" className="pad">
|
||||
{message ? (
|
||||
<p className="notice info">{message}</p>
|
||||
) : null}
|
||||
<label htmlFor="login-email">Email</label>
|
||||
<div className="form-control form-control--outlined">
|
||||
<input type="email"
|
||||
required="required"
|
||||
id="login-email"
|
||||
name="login-email"
|
||||
placeholder="me@mydomain.com"
|
||||
ref={n => this._emailInput = n}/>
|
||||
</div>
|
||||
<label htmlFor="login-password">Password</label>
|
||||
<div className="form-control form-control--outlined">
|
||||
<input type="password"
|
||||
required="required"
|
||||
id="login-password"
|
||||
name="login-password"
|
||||
placeholder="•••••••••••••••••"
|
||||
ref={n => this._passwordInput = n}/>
|
||||
</div>
|
||||
{this.state.error ? (
|
||||
<div className="danger pad-top">** {this.state.error}</div>
|
||||
) : null}
|
||||
</ModalBody>,
|
||||
<ModalFooter key="footer">
|
||||
<div className="margin-left">
|
||||
Don't have an account yet?
|
||||
{" "}
|
||||
<a href="#" onClick={this._handleSignup.bind(this)}>Signup</a>
|
||||
</div>
|
||||
<button type="submit" className="btn">
|
||||
{this.state.loading ? <i
|
||||
className="fa fa-spin fa-refresh margin-right-sm"></i> : null}
|
||||
Login
|
||||
</button>
|
||||
</ModalFooter>
|
||||
]
|
||||
} else {
|
||||
return (
|
||||
<Modal ref={m => this.modal = m} {...this.props}>
|
||||
<ModalHeader>Login Success</ModalHeader>
|
||||
<ModalBody className="pad">
|
||||
<h1>Enjoy your stay!</h1>
|
||||
<p>
|
||||
If you have any questions or concerns, send you email to
|
||||
{" "}
|
||||
<Link href="mailto:support@insomnia.rest">
|
||||
support@insomnia.rest
|
||||
</Link>
|
||||
</p>
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<button type="submit"
|
||||
className="btn"
|
||||
onClick={e => this.modal.hide()}>
|
||||
Close
|
||||
</button>
|
||||
</ModalFooter>
|
||||
</Modal>
|
||||
)
|
||||
inner = [
|
||||
<ModalHeader key="header">Login Success</ModalHeader>,
|
||||
<ModalBody key="body" className="pad">
|
||||
<h1>Enjoy your stay!</h1>
|
||||
<p>
|
||||
If you have any questions or concerns, send you email to
|
||||
{" "}
|
||||
<Link href="mailto:support@insomnia.rest">
|
||||
support@insomnia.rest
|
||||
</Link>
|
||||
</p>
|
||||
</ModalBody>,
|
||||
<ModalFooter key="footer">
|
||||
<button type="submit"
|
||||
className="btn"
|
||||
onClick={e => this.modal.hide()}>
|
||||
Close
|
||||
</button>
|
||||
</ModalFooter>
|
||||
]
|
||||
}
|
||||
|
||||
return (
|
||||
<form onSubmit={this._handleLogin.bind(this)}>
|
||||
<Modal ref={m => this.modal = m} {...this.props}>
|
||||
{inner}
|
||||
</Modal>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()},
|
||||
</h1>
|
||||
<p style={{maxWidth: '30rem', margin: 'auto'}}>
|
||||
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.
|
||||
</p>
|
||||
<br/>
|
||||
<p className="pad-top">
|
||||
|
||||
@@ -50,7 +50,7 @@ class SettingsModal extends Component {
|
||||
trackEvent('Sync', 'Reset');
|
||||
await sync.resetRemoteData();
|
||||
await sync.resetLocalData();
|
||||
await session.logout();
|
||||
await sync.logout();
|
||||
}
|
||||
|
||||
render () {
|
||||
|
||||
Reference in new issue
Block a user