From 5ba120030a7641a0404252fb7d8b05fced8ede30 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 7 Nov 2016 22:23:42 -0800 Subject: ui: add initial addressbook panel --- ui/app/components/main_panel/email_section.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'ui/app/components/main_panel/email_section.js') diff --git a/ui/app/components/main_panel/email_section.js b/ui/app/components/main_panel/email_section.js index 2bb5865..c86188e 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 =

Mail

if (this.state.status == 'on') { - button = + // button = } if (this.state.status == 'disabled') { header =

Mail Disabled

} if (this.state.expanded) { body = ( - + + + + ) } return ( -- cgit v1.2.3