Skip to content

Commit

Permalink
Merge pull request #83 from subutai-io/issue-74
Browse files Browse the repository at this point in the history
Issue 74
  • Loading branch information
crownIk authored Jan 28, 2019
2 parents 72c7f51 + 5f52042 commit d4822ee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
18 changes: 9 additions & 9 deletions common/lib/controller/pwd.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ define(function(require, exports, module) {
that.resolve(that.options);
})
.catch(function(err) {
if (err.message == 'Wrong password') {
that.ports.pwdDialog.postMessage({event: 'wrong-password'});
} else {
if (that.ports.dDialog) {
that.ports.dDialog.postMessage({event: 'error-message', error: err.message});
}
that.closePopup();
that.reject(err);
if (err.code == 'WRONG_PASSWORD') {
that.ports.pwdDialog.postMessage({event: 'wrong-password'});
} else {
if (that.ports.dDialog) {
that.ports.dDialog.postMessage({event: 'error-message', error: err.message});
}
});
// that.closePopup();
// that.reject(err);
}
});
break;
case 'pwd-user-input':
uiLog.push(msg.source, msg.type);
Expand Down
3 changes: 3 additions & 0 deletions common/ui/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ var options = options || null;
initRebirthUI();
$('body').on('change', '#protectkey', function() {
$(".js-passwd-hide").toggleClass("js-passwd-show");
$("#password").val("");
$("#password-confirm").val("");

console.log('toggle passwd');
});

Expand Down
5 changes: 2 additions & 3 deletions common/ui/modal/_popup-enter-key-password.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
c0,0.5-0.4,0.8-0.8,0.8h-10c-0.5,0-0.8-0.4-0.8-0.8v-6.7C1.7,10.4,2,10,2.5,10h10c0.5,0,0.8,0.4,0.8,0.8V17.5z"/>
</svg>

<div class="b-popup-body_white-bg g-padding">
<div class="b-popup-body_white-bg g-padding changed">
<h6 class="b-form-label_h2" style="font-size: 10px"><span id="userId"></span> - <span
id="keyId"></span></h6>
<label class="b-form-label">To sign with your key, provide the password.</label>
<input type="password" class="b-form-input b-form-input_full" id="password">
<span class="label label-danger hide noUi-marker-normal b-form-hint b-form-hint_red" data-l10n-id="pwd_dialog_wrong_pwd"></span>

<p class="label label-danger hide noUi-marker-normal b-form-hint b-form-hint_red" data-l10n-id="pwd_dialog_wrong_pwd"></p>
<input type="checkbox" id="remember" class="b-form-checkbox">
<label for="remember" class="b-form-label" data-l10n-id="pwd_dialog_cache_pwd">Keep me logged
in</label>
Expand Down

0 comments on commit d4822ee

Please sign in to comment.