From 0d0c99fd28b782c7daf02fb5cc48d3eb252e705d Mon Sep 17 00:00:00 2001 From: Joris Date: Fri, 1 Jan 2016 14:39:40 +0100 Subject: Simplify persona usage --- public/javascripts/main.js | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 public/javascripts/main.js (limited to 'public/javascripts') diff --git a/public/javascripts/main.js b/public/javascripts/main.js deleted file mode 100644 index 12593e6..0000000 --- a/public/javascripts/main.js +++ /dev/null @@ -1,28 +0,0 @@ -var app = Elm.fullscreen(Elm.Main, { - initialTime: new Date().getTime(), - translations: document.getElementById('messages').innerHTML, - config: document.getElementById('config').innerHTML, - sign: null -}); - -navigator.id.watch({ - loggedInUser: null, - onlogin: function(assertion) { - app.ports.sign.send({ - operation: 'SignIn', - assertion: assertion - }); - }, - onlogout: function() {} -}); - -app.ports.persona.subscribe(function(communication) { - if(communication === 'SignIn') { - navigator.id.request(); - } else if(communication === 'SignOut') { - navigator.id.logout(); - app.ports.sign.send({ - operation: 'SignOut' - }); - } -}); -- cgit v1.2.3