From 81af31760ea7ae9480a4574fd2e560bf9153dbae Mon Sep 17 00:00:00 2001 From: qzzhang Date: Tue, 4 Aug 2020 12:50:56 -0500 Subject: [PATCH 1/3] log out from anywhere including User Data/Build Model redirected to Reference Data/Plants tab; signin on RAST on User Data/Build Model stay where it is --- app/services/auth.js | 3 ++- app/services/dialogs.js | 1 - app/views/dialogs/auth.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/auth.js b/app/services/auth.js index 45b850f0..100b44ba 100644 --- a/app/services/auth.js +++ b/app/services/auth.js @@ -90,7 +90,8 @@ function($state, $http, config, $window) { $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+'/genomes/Plants'; + $window.location.replace(to_url); }); } diff --git a/app/services/dialogs.js b/app/services/dialogs.js index 4416e949..4fbc2ab3 100644 --- a/app/services/dialogs.js +++ b/app/services/dialogs.js @@ -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(){ diff --git a/app/views/dialogs/auth.html b/app/views/dialogs/auth.html index 89529077..2bf35dcb 100644 --- a/app/views/dialogs/auth.html +++ b/app/views/dialogs/auth.html @@ -5,7 +5,7 @@

Please sign in

- close + close From f48ad4dd0461261bfb301a0c6e469c8b9d9f537d Mon Sep 17 00:00:00 2001 From: qzzhang Date: Tue, 4 Aug 2020 13:51:01 -0500 Subject: [PATCH 2/3] fixed the home page login behavior --- app/ctrls/ms-ctrls.js | 1 + app/services/auth.js | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/ctrls/ms-ctrls.js b/app/ctrls/ms-ctrls.js index 34d04017..73b03905 100755 --- a/app/ctrls/ms-ctrls.js +++ b/app/ctrls/ms-ctrls.js @@ -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}); } diff --git a/app/services/auth.js b/app/services/auth.js index 100b44ba..7c5ab914 100644 --- a/app/services/auth.js +++ b/app/services/auth.js @@ -88,11 +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() { - var to_url = window.location.protocol + '//' + window.location.host+'/genomes/Plants'; - $window.location.replace(to_url); - }); + + 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() { From 30a490fd7c4b2c8cc43773b78a050532de08344e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Sep 2020 05:56:27 +0000 Subject: [PATCH 3/3] Bump showdown from 1.2.1 to 1.9.1 Bumps [showdown](https://github.com/showdownjs/showdown) from 1.2.1 to 1.9.1. - [Release notes](https://github.com/showdownjs/showdown/releases) - [Changelog](https://github.com/showdownjs/showdown/blob/1.9.1/CHANGELOG.md) - [Commits](https://github.com/showdownjs/showdown/compare/1.2.1...1.9.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb44d194..2c3fa177 100644 --- a/package.json +++ b/package.json @@ -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" } }