import * as React from 'react'; import Container from './widgets/Container'; import ExternalLink from './widgets/ExternalLink'; import SyncGate from './SyncGate'; import LoginForm from './components/LoginForm'; import EncryptionLoginForm from './components/EncryptionLoginForm'; import { store, CredentialsType } from './store'; import { login, deriveKey } from './store/actions'; import * as C from './constants'; import SignedPagesBadge from './images/signed-pages-badge.svg'; class LoginGate extends React.Component { public props: { credentials: CredentialsType; }; constructor(props: any) { super(props); this.onFormSubmit = this.onFormSubmit.bind(this); this.onEncryptionFormSubmit = this.onEncryptionFormSubmit.bind(this); } public onFormSubmit(username: string, password: string, encryptionPassword: string, serviceApiUrl?: string) { serviceApiUrl = serviceApiUrl ? serviceApiUrl : C.serviceApiBase; store.dispatch(login(username, password, encryptionPassword, serviceApiUrl)); } public onEncryptionFormSubmit(encryptionPassword: string) { store.dispatch(deriveKey(this.props.credentials.value!.credentials.email, encryptionPassword)); } public render() { if (this.props.credentials.value === null) { const style = { isSafe: { textDecoration: 'none', display: 'block', }, divider: { margin: '30px 0', color: '#00000025', }, }; return (

Please Log In


  • The EteSync Website
  • Is the web client safe to use?
  • Source code
); } else if (this.props.credentials.value.encryptionKey === null) { return (

Encryption Password

You are logged in as {this.props.credentials.value.credentials.email}. Please enter your encryption password to continue, or log out from the side menu.

); } return ( ); } } export default LoginGate;