import React from 'react' import { Button, Glyphicon, Alert } from 'react-bootstrap' import SectionLayout from './section_layout' import Spinner from 'components/spinner' import bitmask from 'lib/bitmask' export default class VPNSection extends React.Component { static get defaultProps() {return{ account: null }} constructor(props) { super(props) this.state = { error: null, expanded: false, vpn: "down", } this.expand = this.expand.bind(this) this.connect = this.connect.bind(this) this.disconnect = this.disconnect.bind(this) this.cancel = this.cancel.bind(this) this.unblock = this.unblock.bind(this) this.location = this.location.bind(this) } expand() { this.setState({expanded: !this.state.expanded}) } connect() { this.setState({vpn: "up"}) } disconnect() { this.setState({vpn: "down"}) } cancel() { } unblock() { } location() { } render () { let message = null let body = null let button = null let icon = null let header =

VPN

if (this.state.error) { // style may be: success, warning, danger, info message = ( {this.state.error} ) } if (this.state.expanded) { body =
traffic details go here
} switch(this.state.vpn) { case "down": button = icon = "disabled" break case "up": button = icon = "on" break case "connecting": button = icon = "wait" break case "disconnecting": button = icon = "wait" break case "failed": button =
icon = "off" break } return ( ) } }