diff options
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/debug_panel.js | 4 | ||||
-rw-r--r-- | ui/app/components/greeter_panel.js | 2 | ||||
-rw-r--r-- | ui/app/components/main_panel/user_section.js | 2 | ||||
-rw-r--r-- | ui/app/lib/bitmask.js | 12 |
4 files changed, 9 insertions, 11 deletions
diff --git a/ui/app/components/debug_panel.js b/ui/app/components/debug_panel.js index 7515ba84..5ffd4051 100644 --- a/ui/app/components/debug_panel.js +++ b/ui/app/components/debug_panel.js @@ -10,11 +10,11 @@ class DebugPanel extends React.Component { } componentDidMount() { - this.click(window.location.hash.replace('#', '')) + //this.click(window.location.hash.replace('#', '')) } click(panel_name) { - window.location.hash = panel_name + //window.location.hash = panel_name App.show(panel_name) } diff --git a/ui/app/components/greeter_panel.js b/ui/app/components/greeter_panel.js index acaf0d57..31403573 100644 --- a/ui/app/components/greeter_panel.js +++ b/ui/app/components/greeter_panel.js @@ -31,7 +31,7 @@ export default class GreeterPanel extends React.Component { <Area position="bottom" type="dark" className="greeter"> <Glyphicon glyph="user" /> - <a href="#" onClick={this.newAccount.bind(this)}>Create a new account...</a> + <a href="javascript:void(0)" onClick={this.newAccount.bind(this)}>Create a new account...</a> </Area> </Center> </div> diff --git a/ui/app/components/main_panel/user_section.js b/ui/app/components/main_panel/user_section.js index b792bb43..17e492d7 100644 --- a/ui/app/components/main_panel/user_section.js +++ b/ui/app/components/main_panel/user_section.js @@ -97,7 +97,7 @@ export default class UserSection extends React.Component { /> <br /> <Glyphicon glyph="user" /> - <a href="#" onClick={App.show.bind(App, 'wizard')}>Create a new account...</a> + <a href="javascript:void(0)" onClick={App.show.bind(App, 'wizard')}>Create a new account...</a> </div> ) return ( diff --git a/ui/app/lib/bitmask.js b/ui/app/lib/bitmask.js index 94912acc..0a628ee3 100644 --- a/ui/app/lib/bitmask.js +++ b/ui/app/lib/bitmask.js @@ -44,21 +44,20 @@ var bitmask = function(){ if (window.location.protocol === "file:") { api_url = 'http://localhost:7070/API/'; } + if (window.location.hash) { + api_token = window.location.hash.replace('#', '') + } function call(command) { var url = api_url + command.slice(0, 3).join('/'); var data = JSON.stringify(command.slice(3)); - var auth_header = null - if (api_token) { - auth_header = "Token " + btoa(last_uid + ":" + api_token) - } return new Promise(function(resolve, reject) { var req = new XMLHttpRequest(); req.open('POST', url); - if (auth_header) { - req.setRequestHeader("Authorization", auth_header) + if (api_token) { + req.setRequestHeader("X-Bitmask-Auth", api_token) } req.onload = function() { @@ -168,7 +167,6 @@ var bitmask = function(){ autoconf = false; } return call(['bonafide', 'user', 'authenticate', uid, password, autoconf]).then(function(response) { - api_token = response.lcl_token last_uuid = response.uuid last_uid = uid return response; |