diff options
author | elijah <elijah@riseup.net> | 2016-11-07 22:23:42 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-11-07 22:23:42 -0800 |
commit | 5ba120030a7641a0404252fb7d8b05fced8ede30 (patch) | |
tree | fceda496b0b4d0fa0758bf41163d26d3e1f9a0bd /ui/app/components/main_panel | |
parent | 7169b2c38d517834e867be987cf62e7466b6f241 (diff) |
ui: add initial addressbook panel
Diffstat (limited to 'ui/app/components/main_panel')
-rw-r--r-- | ui/app/components/main_panel/email_section.js | 26 | ||||
-rw-r--r-- | ui/app/components/main_panel/main_panel.less | 1 |
2 files changed, 18 insertions, 9 deletions
diff --git a/ui/app/components/main_panel/email_section.js b/ui/app/components/main_panel/email_section.js index 2bb5865d..c86188eb 100644 --- a/ui/app/components/main_panel/email_section.js +++ b/ui/app/components/main_panel/email_section.js @@ -1,5 +1,5 @@ import React from 'react' -import { Button, Glyphicon, Alert } from 'react-bootstrap' +import { Button, Glyphicon, Alert, ButtonToolbar } from 'react-bootstrap' import SectionLayout from './section_layout' import IMAPButton from './imap_button' @@ -7,6 +7,7 @@ import IMAPButton from './imap_button' import Account from 'models/account' import Spinner from 'components/spinner' import bitmask from 'lib/bitmask' +import App from 'app' const GENERAL_NOTICES = [ "KEYMANAGER_KEY_FOUND", // (address) @@ -66,17 +67,17 @@ export default class EmailSection extends React.Component { expanded: true } this.expand = this.expand.bind(this) - this.openKeys = this.openKeys.bind(this) + this.openKeys = this.openKeys.bind(this) this.openApp = this.openApp.bind(this) this.openPrefs = this.openPrefs.bind(this) this.logEvent = this.logEvent.bind(this) } componentWillMount() { - let events = [].concat(GENERAL_NOTICES, ACCOUNT_NOTICES, STATUSES, STATUS_ERRORS) - for (let event of events) { - bitmask.events.register(event, this.logEvent) - } + //let events = [].concat(GENERAL_NOTICES, ACCOUNT_NOTICES, STATUSES, STATUS_ERRORS) + //for (let event of events) { + // bitmask.events.register(event, this.logEvent) + //} bitmask.mail.status().then(status => { // either 'running' or 'disabled' let newstatus = 'error' @@ -93,8 +94,12 @@ export default class EmailSection extends React.Component { console.log("EVENT: " + event, msg) } - openKeys() {} + openKeys() { + App.show('addressbook', {account: this.props.account}) + } + openApp() {} + openPrefs() {} expand() { @@ -113,14 +118,17 @@ export default class EmailSection extends React.Component { let body = null let header = <h1>Mail</h1> if (this.state.status == 'on') { - button = <Button onClick={this.openApp}>Open Email</Button> + // button = <Button onClick={this.openKeys}>Addressbook</Button> } if (this.state.status == 'disabled') { header = <h1>Mail Disabled</h1> } if (this.state.expanded) { body = ( - <IMAPButton account={this.props.account} /> + <ButtonToolbar> + <IMAPButton account={this.props.account} /> + <Button onClick={this.openKeys}>Addressbook</Button> + </ButtonToolbar> ) } return ( diff --git a/ui/app/components/main_panel/main_panel.less b/ui/app/components/main_panel/main_panel.less index 7383a6c8..2f4156a0 100644 --- a/ui/app/components/main_panel/main_panel.less +++ b/ui/app/components/main_panel/main_panel.less @@ -241,6 +241,7 @@ padding: 0; font-size: @icon-size - 10; line-height: @icon-size; + word-break: break-all; } } .buttons { |