Skip to content

Commit

Permalink
chore: remove ui elements for account recovery mode (PROJQUAY-970) (#853
Browse files Browse the repository at this point in the history
)

Remove ui elements for account recovery mode.
  • Loading branch information
kleesc committed Jul 29, 2021
1 parent 7d7eb75 commit 47a1fdd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion static/directives/signin-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h4 quay-show="!Features.DIRECT_LOGIN && EXTERNAL_LOGINS.length > 2">
Login via service
</h4>

<div class="external-logins" quay-show="EXTERNAL_LOGINS.length">
<div class="external-logins" quay-show="EXTERNAL_LOGINS.length && !inAccountRecoveryMode">
<div class="external-login-button" provider="provider" redirect-url="redirectUrl"
sign-in-started="markStarted()" ng-repeat="provider in EXTERNAL_LOGINS" is-link="true"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion static/directives/user-setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<div class="user-footer-links">
<a ng-click="setView('createAccount')"
quay-show="!inReadOnlyMode && Features.USER_CREATION && Config.AUTHENTICATION_TYPE == 'Database' && Features.DIRECT_LOGIN && !Features.INVITE_ONLY_USER_CREATION"
quay-show="!inReadOnlyMode && Features.USER_CREATION && Config.AUTHENTICATION_TYPE == 'Database' && Features.DIRECT_LOGIN && !Features.INVITE_ONLY_USER_CREATION && !inAccountRecoveryMode"
ng-if="currentView != 'createAccount'">Create Account</a>
<span quay-show="Features.USER_CREATION && Config.AUTHENTICATION_TYPE == 'Database' && Features.DIRECT_LOGIN && Features.INVITE_ONLY_USER_CREATION"
ng-if="currentView != 'createAccount'">Invitation required to sign up</span>
Expand Down
3 changes: 2 additions & 1 deletion static/js/directives/ui/signin-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ angular.module('quay').directive('signinForm', function () {
'signInStarted': '&signInStarted',
'signedIn': '&signedIn'
},
controller: function($scope, $location, $timeout, $interval, ApiService, KeyService, UserService, CookieService, Features, Config, ExternalLoginService) {
controller: function($scope, $location, $timeout, $interval, ApiService, KeyService, UserService, CookieService, Features, Config, ExternalLoginService, StateService) {
$scope.tryAgainSoon = 0;
$scope.tryAgainInterval = null;
$scope.signingIn = false;
$scope.EXTERNAL_LOGINS = ExternalLoginService.EXTERNAL_LOGINS;
$scope.Features = Features;
$scope.signInUser = {};
$scope.inAccountRecoveryMode = StateService.inAccountRecoveryMode();

$scope.markStarted = function() {
$scope.signingIn = true;
Expand Down
1 change: 1 addition & 0 deletions static/js/directives/ui/user-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ angular.module('quay').directive('userSetup', function () {
$scope.Features = Features;
$scope.currentView = 'signin';
$scope.inReadOnlyMode = StateService.inReadOnlyMode();
$scope.inAccountRecoveryMode = StateService.inAccountRecoveryMode();

$scope.setView = function(view) {
$scope.currentView = view;
Expand Down

0 comments on commit 47a1fdd

Please sign in to comment.