Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/ctrls/ms-ctrls.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function($scope, $state, $stateParams, Auth, $window) {
// sets method and changes url param
$scope.switchMethod = function(method) {
$scope.method = Auth.loginMethod(method);
$scope.inValid = false;
//$state.go('main.home', {login: method});
}

Expand Down
12 changes: 8 additions & 4 deletions app/services/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ function($state, $http, config, $window) {

this.logout = function() {
$window.localStorage.removeItem('auth');
$state.transitionTo('main.home', {}, { reload: true, inherit: true, notify: false })
.then(function() {
$window.location.reload();
});

var to_url = window.location.protocol + '//' + window.location.host;
if ($state.current.name === 'main.home') {
$window.location.reload();
} else {
to_url = to_url + '/genomes/Plants';
$window.location.replace(to_url);
}
}

this.isAuthenticated = function() {
Expand Down
1 change: 0 additions & 1 deletion app/services/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ function($rootScope, $dialog, $window, $timeout, Auth, $stateParams) {
$s.method = Auth.loginMethod(method);
$stateParams.login = method;
$s.inValid = false;
$s.creds = {};
}

$s.ok = function(){
Expand Down
2 changes: 1 addition & 1 deletion app/views/dialogs/auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h3>Please sign in</h3>
<span flex></span>
<md-button class="md-icon-button" ng-click="cancel()" ui-sref="main.home" tabindex="1">
<md-icon class="material-icons" aria-label="Close signin dialog, go to homepage">close</md-icon>
<md-icon class="material-icons" aria-label="Close signIn dialog, go to homepage">close</md-icon>
</md-button>
</div>
</md-toolbar>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"jquery": "3.4.0",
"ng-context-menu": "github:talis/ng-context-menu#v1.0.1",
"papaparse": "4.1.2",
"showdown": "1.2.1"
"showdown": "1.9.1"
}
}