Merge branch 'master' of github.com:standardnotes/web into ivs

This commit is contained in:
Mo Bitar
2017-03-18 15:48:42 -05:00
20 changed files with 179 additions and 130 deletions

View File

@@ -98,11 +98,17 @@ class AccountMenu {
}
$scope.submitRegistrationForm = function() {
var confirmation = prompt("Please confirm your password. Note that because your notes are encrypted using your password, Standard Notes does not have a password reset option. You cannot forget your password.")
$scope.formData.confirmPassword = true;
}
$scope.submitPasswordConfirmation = function() {
let confirmation = $scope.formData.pw_confirmation;
if(confirmation !== $scope.formData.user_password) {
alert("The two passwords you entered do not match. Please try again.");
return;
}
$scope.formData.confirmPassword = false;
$scope.formData.status = "Generating Account Keys...";
$timeout(function(){

View File

@@ -92,6 +92,10 @@ class ExtensionManager {
*/
retrieveExtensionFromServer(url, callback) {
this.httpManager.getAbsolute(url, {}, function(response){
if(typeof response !== 'object') {
callback(null);
return;
}
var ext = this.handleExtensionLoadExternalResponseItem(url, response);
if(callback) {
callback(ext);

View File

@@ -28,7 +28,9 @@ class HttpManager {
if (xmlhttp.readyState == 4) {
var response = xmlhttp.responseText;
if(response) {
response = JSON.parse(response);
try {
response = JSON.parse(response);
} catch(e) {}
}
if(xmlhttp.status >= 200 && xmlhttp.status <= 299){

View File

@@ -10,7 +10,7 @@ class SyncManager {
}
get serverURL() {
return localStorage.getItem("server") || "https://n3.standardnotes.org";
return localStorage.getItem("server") || window._default_sf_server;
}
get masterKey() {