diff --git a/server/app/index.html b/server/app/index.html index 6e97fe66..f6d51842 100644 --- a/server/app/index.html +++ b/server/app/index.html @@ -43,6 +43,7 @@ + diff --git a/server/app/scripts/app.js b/server/app/scripts/app.js index 90b9f278..5334513c 100644 --- a/server/app/scripts/app.js +++ b/server/app/scripts/app.js @@ -41,7 +41,12 @@ app.config(['$routeProvider', '$locationProvider', '$httpProvider', function($ro .when('/login', { templateUrl: '/static/views/login.html', controller: 'LoginController', - title: 'Login', + title: 'Login' + }) + .when('/logout', { + templateUrl: '/static/views/logout.html', + controller: 'LogoutController', + title: 'Logout' }) .when('/gitlab', { templateUrl: '/static/views/login_gitlab.html', diff --git a/server/app/scripts/controllers/logout.js b/server/app/scripts/controllers/logout.js new file mode 100644 index 00000000..6004ef63 --- /dev/null +++ b/server/app/scripts/controllers/logout.js @@ -0,0 +1,7 @@ +'use strict'; + +angular.module('app').controller("LogoutController", function() { + console.log("logging out") + localStorage.removeItem("access_token"); + window.location.href = "/login"; +}); \ No newline at end of file diff --git a/server/app/views/drawer.html b/server/app/views/drawer.html index a756c22e..a7332e70 100644 --- a/server/app/views/drawer.html +++ b/server/app/views/drawer.html @@ -7,5 +7,5 @@
  • Users
  • Settings
  • - Signout + Signout \ No newline at end of file diff --git a/server/app/views/logout.html b/server/app/views/logout.html new file mode 100644 index 00000000..e69de29b