delete ext option, full screen padding

This commit is contained in:
Mo Bitar
2017-01-07 00:10:54 -06:00
parent 71b6e666b4
commit 73edae57a2
8 changed files with 288 additions and 165 deletions

View File

@@ -44,7 +44,13 @@ angular.module('app.frontend')
}
this.submitNewExtensionForm = function() {
extensionManager.addExtension(this.newExtensionData.url)
if(this.newExtensionData.url) {
extensionManager.addExtension(this.newExtensionData.url, function(response){
if(!response) {
alert("Unable to register this extension. Make sure the link is valid and try again.");
}
})
}
}
this.selectedAction = function(action, extension) {
@@ -55,6 +61,12 @@ angular.module('app.frontend')
})
}
this.deleteExtension = function(extension) {
if(confirm("Are you sure you want to delete this extension?")) {
extensionManager.deleteExtension(extension);
}
}
this.reloadExtensionsPressed = function() {
if(confirm("For your security, reloading extensions will disable any currently enabled repeat actions.")) {
extensionManager.refreshExtensionsFromServer();
@@ -149,18 +161,6 @@ angular.module('app.frontend')
}.bind(this))
}
this.forgotPasswordSubmit = function() {
// $auth.requestPasswordReset(this.resetData)
// .then(function(resp) {
// this.resetData.response = "Success";
// // handle success response
// }.bind(this))
// .catch(function(resp) {
// // handle error response
// this.resetData.response = "Error";
// }.bind(this));
}
this.encryptionStatusForNotes = function() {
var allNotes = modelManager.filteredNotes;
var countEncrypted = 0;
@@ -173,10 +173,12 @@ angular.module('app.frontend')
return countEncrypted + "/" + allNotes.length + " notes encrypted";
}
this.archiveEncryptionFormat = {encrypted: true};
this.downloadDataArchive = function() {
var link = document.createElement('a');
link.setAttribute('download', 'notes.json');
link.href = apiController.itemsDataFile();
link.href = apiController.itemsDataFile(this.archiveEncryptionFormat.encrypted);
link.click();
}