mirror of
https://github.com/evilsocket/arc.git
synced 2024-05-26 22:37:37 +03:00
new: saving a secret doesn't close the dialog
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -505,6 +505,7 @@ ul li.placeholder:before {
|
||||
|
||||
#loader_modal {
|
||||
margin-top: 5%;
|
||||
z-index: 9001;
|
||||
}
|
||||
|
||||
.loader {
|
||||
|
||||
@@ -298,6 +298,10 @@ app.controller('PMController', ['$scope', function (scope) {
|
||||
.text( percentage + '%' );
|
||||
};
|
||||
|
||||
scope.blinkMeta = function() {
|
||||
$('#secret_meta').fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
|
||||
};
|
||||
|
||||
scope.showLoader = function(message, callback) {
|
||||
$('#loader_message').text(message);
|
||||
if( !scope.isLoading() ) {
|
||||
@@ -682,8 +686,6 @@ app.controller('PMController', ['$scope', function (scope) {
|
||||
scope.onAdd = function() {
|
||||
scope.setStatus("Adding secret ...");
|
||||
|
||||
$('#secret_modal').modal('hide');
|
||||
|
||||
scope.showLoader("Encrypting record ...", function(){
|
||||
// Execute asynchronously to not block the ui.
|
||||
setTimeout( function() {
|
||||
@@ -705,7 +707,11 @@ app.controller('PMController', ['$scope', function (scope) {
|
||||
};
|
||||
|
||||
scope.arc.AddRecord( r, data, function(record) {
|
||||
scope.getStore(function() {});
|
||||
scope.hideLoader();
|
||||
scope.onShowStore(scope.store_id, function(){
|
||||
scope.onShowSecret(record.id);
|
||||
scope.blinkMeta();
|
||||
});;
|
||||
},
|
||||
scope.errorHandler ).uploadProgress(scope.trackProgress);
|
||||
});
|
||||
@@ -779,8 +785,6 @@ app.controller('PMController', ['$scope', function (scope) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#secret_modal').modal('hide');
|
||||
|
||||
scope.showLoader("Encrypting record ...", function(){
|
||||
var [ expire_at, prune, pinned, record ] = scope.buildRecord();
|
||||
record.Encrypt(scope.key).then(function(data){
|
||||
@@ -799,9 +803,11 @@ app.controller('PMController', ['$scope', function (scope) {
|
||||
'size': size
|
||||
};
|
||||
scope.arc.UpdateRecord( r, data, function() {
|
||||
scope.setSecret(null);
|
||||
scope.setError(null);
|
||||
scope.getStore(function(){});
|
||||
scope.hideLoader();
|
||||
scope.onShowStore(scope.store_id, function(){
|
||||
scope.onShowSecret(scope.secret.id);
|
||||
scope.blinkMeta();
|
||||
});
|
||||
},
|
||||
scope.errorHandler ).uploadProgress(scope.trackProgress);
|
||||
});
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
This will be the only plaintext information in the arc.
|
||||
</small>
|
||||
|
||||
<div class="alert alert-success" role="alert" id="secret_status" style="display: none"></div>
|
||||
</div>
|
||||
|
||||
<ul class="form-group" id="secret_entry_list"></ul>
|
||||
|
||||
Reference in New Issue
Block a user