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 +++++++++++++++++--------- ui/app/components/main_panel/main_panel.less | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) (limited to 'ui/app/components/main_panel') 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 =

Mail

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

Mail Disabled

} if (this.state.expanded) { body = ( - + + + + ) } 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 { -- cgit v1.2.3