summaryrefslogtreecommitdiff
path: root/ui/app/components/panel_switcher.js
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-12-30 17:12:21 -0800
committerRuben Pollan <meskio@sindominio.net>2017-01-10 19:12:29 +0100
commit8f992ee6e84d21c3e6306b27856e4ba90accc1f2 (patch)
treebe314682a3aac223fd7c6ba7c12f8e9d25d5c487 /ui/app/components/panel_switcher.js
parent7e86aa78721aa0a5a291bcf08fab2fb311cb8026 (diff)
[bug] For now, disable UI for supporting multiple accounts. It does not currently work with API tokens.
Diffstat (limited to 'ui/app/components/panel_switcher.js')
-rw-r--r--ui/app/components/panel_switcher.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/ui/app/components/panel_switcher.js b/ui/app/components/panel_switcher.js
index d707a602..9a06b49f 100644
--- a/ui/app/components/panel_switcher.js
+++ b/ui/app/components/panel_switcher.js
@@ -19,17 +19,31 @@ export default class PanelSwitcher extends React.Component {
this.state = {
panel: null,
panel_properties: null,
- debug: true
+ debug: true,
+ error: null
}
App.switcher = this
}
+ showError(error) {
+ this.setState({error: error})
+ }
+
+ hideError() {
+ this.setState({error: null})
+ }
+
show(component_name, properties={}) {
this.setState({panel: component_name, panel_properties: properties})
}
render() {
let elems = []
+ if (this.state.error) {
+ elems.push(
+ <ErrorPanel error={this.state.error} key="error" />
+ )
+ }
if (this.panelExist(this.state.panel)) {
elems.push(
this.panelRender(this.state.panel, this.state.panel_properties)