eslint --fix: added missing semicolons
This commit is contained in:
@@ -74,7 +74,7 @@ export class ActionsManager {
|
||||
if (response.actions) {
|
||||
extension.actions = response.actions.map((action) => {
|
||||
return new Action(action);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
extension.actions = [];
|
||||
}
|
||||
@@ -157,7 +157,7 @@ export class ActionsManager {
|
||||
const result = this.decryptResponse(response, keys);
|
||||
resolve(result);
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async handlePostAction(action, item, extension) {
|
||||
@@ -183,7 +183,7 @@ export class ActionsManager {
|
||||
text: "An issue occurred while processing this action. Please try again."
|
||||
});
|
||||
return { response: response };
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async handleShowAction(action) {
|
||||
@@ -216,20 +216,20 @@ export class ActionsManager {
|
||||
};
|
||||
}).catch((response) => {
|
||||
const error = (response && response.error)
|
||||
|| { message: "An issue occurred while processing this action. Please try again." }
|
||||
|| { message: "An issue occurred while processing this action. Please try again." };
|
||||
this.alertManager.alert({ text: error.message });
|
||||
action.error = true;
|
||||
return { error: error };
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
return new Promise((resolve, reject) => {
|
||||
this.alertManager.confirm({
|
||||
text: "Are you sure you want to replace the current note contents with this action's results?",
|
||||
onConfirm: () => {
|
||||
onConfirm().then(resolve)
|
||||
onConfirm().then(resolve);
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async handleRenderAction(action) {
|
||||
@@ -250,11 +250,11 @@ export class ActionsManager {
|
||||
};
|
||||
}).catch((response) => {
|
||||
const error = (response && response.error)
|
||||
|| { message: "An issue occurred while processing this action. Please try again." }
|
||||
|| { message: "An issue occurred while processing this action. Please try again." };
|
||||
this.alertManager.alert({ text: error.message });
|
||||
action.error = true;
|
||||
return { error: error };
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async outgoingParamsForItem(item, extension, decrypted = false) {
|
||||
|
||||
@@ -59,7 +59,7 @@ export class ArchiveManager {
|
||||
// Match up to the first parenthesis, i.e do not include '(Central Standard Time)'
|
||||
var matches = string.match(/^(.*?) \(/);
|
||||
if(matches.length >= 2) {
|
||||
return matches[1]
|
||||
return matches[1];
|
||||
}
|
||||
return string;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ export class ArchiveManager {
|
||||
const fileSuffix = `-${item.uuid.split("-")[0]}.txt`;
|
||||
// Standard max filename length is 255. Slice the note name down to allow filenameEnd
|
||||
filePrefix = filePrefix.slice(0, (255 - fileSuffix.length));
|
||||
const fileName = `${item.content_type}/${filePrefix}${fileSuffix}`
|
||||
const fileName = `${item.content_type}/${filePrefix}${fileSuffix}`;
|
||||
zipWriter.add(fileName, new zip.BlobReader(blob), () => {
|
||||
index++;
|
||||
if(index < items.length) {
|
||||
|
||||
@@ -72,7 +72,7 @@ export class AuthManager extends SFAuthManager {
|
||||
}
|
||||
|
||||
return response;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async register(url, email, password, ephemeral) {
|
||||
@@ -81,7 +81,7 @@ export class AuthManager extends SFAuthManager {
|
||||
this.setEphemeral(ephemeral);
|
||||
}
|
||||
return response;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async changePassword(url, email, current_server_pw, newKeys, newAuthParams) {
|
||||
@@ -90,7 +90,7 @@ export class AuthManager extends SFAuthManager {
|
||||
this.checkForSecurityUpdate();
|
||||
}
|
||||
return response;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async handleAuthResponse(response, email, url, authParams, keys) {
|
||||
|
||||
@@ -41,13 +41,13 @@ export class DBManager {
|
||||
};
|
||||
db.onerror = function(errorEvent) {
|
||||
console.error("Database error: " + errorEvent.target.errorCode);
|
||||
}
|
||||
};
|
||||
resolve(db);
|
||||
};
|
||||
|
||||
request.onblocked = (event) => {
|
||||
console.error("Request blocked error:", event.target.errorCode);
|
||||
}
|
||||
};
|
||||
|
||||
request.onupgradeneeded = (event) => {
|
||||
const db = event.target.result;
|
||||
@@ -65,7 +65,7 @@ export class DBManager {
|
||||
}
|
||||
};
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async getAllModels() {
|
||||
@@ -82,7 +82,7 @@ export class DBManager {
|
||||
resolve(items);
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async saveModel(item) {
|
||||
@@ -92,7 +92,7 @@ export class DBManager {
|
||||
async saveModels(items) {
|
||||
const showGenericError = (error) => {
|
||||
this.alertManager.alert({text: `Unable to save changes locally due to an unknown system issue. Issue Code: ${error.code} Issue Name: ${error.name}.`});
|
||||
}
|
||||
};
|
||||
|
||||
return new Promise(async (resolve, reject) => {
|
||||
if(items.length === 0) {
|
||||
@@ -130,17 +130,17 @@ export class DBManager {
|
||||
request.onerror = (event) => {
|
||||
console.error("DB put error:", event.target.error);
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
request.onsuccess = resolve;
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
for(const item of items) {
|
||||
await putItem(item);
|
||||
}
|
||||
|
||||
resolve();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async deleteModel(item) {
|
||||
@@ -149,11 +149,11 @@ export class DBManager {
|
||||
const request = db.transaction("items", "readwrite").objectStore("items").delete(item.uuid);
|
||||
request.onsuccess = (event) => {
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
request.onerror = (event) => {
|
||||
reject();
|
||||
}
|
||||
})
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async clearAllModels() {
|
||||
@@ -171,9 +171,9 @@ export class DBManager {
|
||||
|
||||
deleteRequest.onblocked = function(event) {
|
||||
console.error("Delete request blocked");
|
||||
this.alertManager.alert({text: "Your browser is blocking Standard Notes from deleting the local database. Make sure there are no other open windows of this app and try again. If the issue persists, please manually delete app data to sign out."})
|
||||
this.alertManager.alert({text: "Your browser is blocking Standard Notes from deleting the local database. Make sure there are no other open windows of this app and try again. If the issue persists, please manually delete app data to sign out."});
|
||||
resolve();
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export class DesktopManager {
|
||||
if(this.majorDataChangeHandler) {
|
||||
this.majorDataChangeHandler();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
saveBackup() {
|
||||
@@ -73,7 +73,7 @@ export class DesktopManager {
|
||||
return this.convertComponentForTransmission(component);
|
||||
})).then((data) => {
|
||||
this.installationSyncHandler(data);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async installComponent(component) {
|
||||
@@ -216,7 +216,7 @@ export class DesktopManager {
|
||||
nullOnEmpty
|
||||
).then((data) => {
|
||||
callback(data);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
desktop_setMajorDataChangeHandler(handler) {
|
||||
|
||||
@@ -22,7 +22,7 @@ export class KeyboardManager {
|
||||
KeyboardManager.KeyModifierCtrl,
|
||||
KeyboardManager.KeyModifierMeta,
|
||||
KeyboardManager.KeyModifierAlt
|
||||
]
|
||||
];
|
||||
|
||||
window.addEventListener('keydown', this.handleKeyDown.bind(this));
|
||||
window.addEventListener('keyup', this.handleKeyUp.bind(this));
|
||||
@@ -37,10 +37,10 @@ export class KeyboardManager {
|
||||
((event.metaKey || event.key == KeyboardManager.KeyModifierMeta) && modifier === KeyboardManager.KeyModifierMeta) ||
|
||||
((event.altKey || event.key == KeyboardManager.KeyModifierAlt) && modifier === KeyboardManager.KeyModifierAlt) ||
|
||||
((event.shiftKey || event.key == KeyboardManager.KeyModifierShift) && modifier === KeyboardManager.KeyModifierShift)
|
||||
)
|
||||
);
|
||||
|
||||
return matches;
|
||||
})
|
||||
});
|
||||
|
||||
return eventModifiers;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export class MigrationManager extends SFMigrationManager {
|
||||
name: editor.name,
|
||||
area: "editor-editor"
|
||||
}
|
||||
})
|
||||
});
|
||||
component.setAppDataItem("data", editor.data);
|
||||
this.modelManager.addItem(component);
|
||||
this.modelManager.setItemDirty(component, true);
|
||||
@@ -62,7 +62,7 @@ export class MigrationManager extends SFMigrationManager {
|
||||
|
||||
this.syncManager.sync();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -99,7 +99,7 @@ export class MigrationManager extends SFMigrationManager {
|
||||
this.syncManager.sync();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +167,6 @@ export class MigrationManager extends SFMigrationManager {
|
||||
this.statusManager.removeStatus(status);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export class ModelManager extends SFModelManager {
|
||||
if(!_.find(this.tags, {uuid: item.uuid})) {
|
||||
this.tags.splice(_.sortedIndexBy(this.tags, item, function(item){
|
||||
if (item.title) return item.title.toLowerCase();
|
||||
else return ''
|
||||
else return '';
|
||||
}), 0, item);
|
||||
}
|
||||
} else if(item.content_type == "Note") {
|
||||
@@ -78,7 +78,7 @@ export class ModelManager extends SFModelManager {
|
||||
_.pull(this.tags, tag);
|
||||
this.tags.splice(_.sortedIndexBy(this.tags, tag, function(tag){
|
||||
if (tag.title) return tag.title.toLowerCase();
|
||||
else return ''
|
||||
else return '';
|
||||
}), 0, tag);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ export class NativeExtManager {
|
||||
let packageInfo = {
|
||||
name: "Extensions",
|
||||
identifier: this.extManagerId
|
||||
}
|
||||
};
|
||||
|
||||
var item = {
|
||||
content_type: "SN|Component",
|
||||
@@ -84,7 +84,7 @@ export class NativeExtManager {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if(isDesktopApplication()) {
|
||||
item.content.local_url = window._extensions_manager_location;
|
||||
@@ -141,7 +141,7 @@ export class NativeExtManager {
|
||||
let packageInfo = {
|
||||
name: "Batch Manager",
|
||||
identifier: this.batchManagerId
|
||||
}
|
||||
};
|
||||
|
||||
var item = {
|
||||
content_type: "SN|Component",
|
||||
@@ -161,7 +161,7 @@ export class NativeExtManager {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if(isDesktopApplication()) {
|
||||
item.content.local_url = window._batch_manager_location;
|
||||
|
||||
@@ -94,7 +94,7 @@ export class PasscodeManager {
|
||||
} else {
|
||||
resolve(true);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
unlock(passcode, callback) {
|
||||
@@ -110,7 +110,7 @@ export class PasscodeManager {
|
||||
this.decryptLocalStorage(keys, params).then(() => {
|
||||
this._locked = false;
|
||||
callback(true);
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -183,10 +183,10 @@ export class PasscodeManager {
|
||||
// desktop only
|
||||
this.$rootScope.$on("window-lost-focus", () => {
|
||||
this.documentVisibilityChanged(false);
|
||||
})
|
||||
});
|
||||
this.$rootScope.$on("window-gained-focus", () => {
|
||||
this.documentVisibilityChanged(true);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
// tab visibility listener, web only
|
||||
document.addEventListener('visibilitychange', (e) => {
|
||||
@@ -233,7 +233,7 @@ export class PasscodeManager {
|
||||
value: PasscodeManager.AutoLockIntervalOneHour,
|
||||
label: "1h"
|
||||
}
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
documentVisibilityChanged(visible) {
|
||||
@@ -268,7 +268,7 @@ export class PasscodeManager {
|
||||
let date = new Date();
|
||||
date.setSeconds(date.getSeconds() + seconds);
|
||||
return date;
|
||||
}
|
||||
};
|
||||
|
||||
this.lockAfterDate = addToNow(interval / MillisecondsPerSecond);
|
||||
this.lockTimeout = setTimeout(() => {
|
||||
|
||||
@@ -50,11 +50,11 @@ export class PrivilegesManager extends SFPrivilegesManager {
|
||||
const customSuccess = async () => {
|
||||
onSuccess && await onSuccess();
|
||||
this.currentAuthenticationElement = null;
|
||||
}
|
||||
};
|
||||
const customCancel = async () => {
|
||||
onCancel && await onCancel();
|
||||
this.currentAuthenticationElement = null;
|
||||
}
|
||||
};
|
||||
|
||||
const scope = this.$rootScope.$new(true);
|
||||
scope.action = action;
|
||||
|
||||
@@ -12,13 +12,13 @@ export class SessionHistory extends SFSessionHistoryManager {
|
||||
) {
|
||||
SFItemHistory.HistoryEntryClassMapping = {
|
||||
"Note" : NoteHistoryEntry
|
||||
}
|
||||
};
|
||||
|
||||
// Session History can be encrypted with passcode keys. If it changes, we need to resave session
|
||||
// history with the new keys.
|
||||
passcodeManager.addPasscodeChangeObserver(() => {
|
||||
this.saveToDisk();
|
||||
})
|
||||
});
|
||||
|
||||
var keyRequestHandler = async () => {
|
||||
let offline = authManager.offline();
|
||||
@@ -29,8 +29,8 @@ export class SessionHistory extends SFSessionHistoryManager {
|
||||
keys: keys,
|
||||
offline: offline,
|
||||
auth_params: auth_params
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var contentTypes = ["Note"];
|
||||
super(
|
||||
|
||||
@@ -43,7 +43,7 @@ export class StatusManager {
|
||||
result += " ";
|
||||
}
|
||||
result += status.string;
|
||||
})
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ export class StorageManager extends SFStorageManager {
|
||||
var length = this.storage.length;
|
||||
for(var i = 0; i < length; i++) {
|
||||
var key = this.storage.key(i);
|
||||
hash[key] = this.storage.getItem(key)
|
||||
hash[key] = this.storage.getItem(key);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -29,14 +29,14 @@ export class ThemeManager {
|
||||
// so that it's readable without authentication.
|
||||
passcodeManager.addPasscodeChangeObserver(() => {
|
||||
this.cacheThemes();
|
||||
})
|
||||
});
|
||||
|
||||
if (desktopManager.isDesktop) {
|
||||
appState.addObserver((eventName, data) => {
|
||||
if (eventName === APP_STATE_EVENT_DESKTOP_EXTS_READY) {
|
||||
this.activateCachedThemes();
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.activateCachedThemes();
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export class ThemeManager {
|
||||
this.activateTheme(component);
|
||||
}, 10);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
this.componentManager.registerHandler({
|
||||
identifier: "themeManager",
|
||||
|
||||
Reference in New Issue
Block a user