summaryrefslogtreecommitdiff
path: root/src/leap/bitmask_js/app/components/main_panel/email_section.js
blob: a6525d92d93bff7698ad1dfe7d35b3bd40a0686b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React from 'react'
//import { Button, Glyphicon, Alert } from 'react-bootstrap'
import SectionLayout from './section_layout'
import Account from 'models/account'
import Spinner from 'components/spinner'
import bitmask from 'lib/bitmask'

export default class EmailSection extends React.Component {

  static get defaultProps() {return{
    account: null
  }}

  constructor(props) {
    super(props)
    this.state = {
      status: null
    }
    this.openKeys  = this.openKeys.bind(this)
    this.openApp   = this.openApp.bind(this)
    this.openPrefs = this.openPrefs.bind(this)

    console.log('email constructor')
  }

  openKeys() {}
  openApp() {}
  openPrefs() {}

  render () {
    //let message = null
    //if (this.state.error) {
    //  // style may be: success, warning, danger, info
    //  message = (
    //    <Alert bsStyle="danger">{this.state.error}</Alert>
    //  )
    //}
    let button = null
    if (this.state.status == 'ready') {
      button = <Button onClick={this.openApp}>Open Email</Button>
    }
    return (
      <SectionLayout icon="envelope" status="on" button={button}>
        <h1>inbox: </h1>
      </SectionLayout>
    )
  }
}