eslint --fix: added missing semicolons
This commit is contained in:
@@ -15,8 +15,8 @@ export class PureCtrl {
|
||||
this.$timeout(() => {
|
||||
this.state = Object.freeze(Object.assign({}, this.state, state));
|
||||
resolve();
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
initProps(props) {
|
||||
|
||||
@@ -85,7 +85,7 @@ class EditorCtrl extends PureCtrl {
|
||||
editorDebounce: EDITOR_DEBOUNCE,
|
||||
isDesktop: isDesktopApplication(),
|
||||
spellcheck: true
|
||||
}
|
||||
};
|
||||
|
||||
this.leftResizeControl = {};
|
||||
this.rightResizeControl = {};
|
||||
@@ -223,7 +223,7 @@ class EditorCtrl extends PureCtrl {
|
||||
const editor = this.editorForNote(this.state.note);
|
||||
this.setState({
|
||||
selectedEditor: editor
|
||||
})
|
||||
});
|
||||
if (!editor) {
|
||||
this.reloadFont();
|
||||
}
|
||||
@@ -247,7 +247,7 @@ class EditorCtrl extends PureCtrl {
|
||||
/** if we're still dirty, don't change status, a sync is likely upcoming. */
|
||||
} else {
|
||||
const savedItem = data.savedItems.find((item) => {
|
||||
return item.uuid === this.state.note.uuid
|
||||
return item.uuid === this.state.note.uuid;
|
||||
});
|
||||
const isInErrorState = this.state.saveError;
|
||||
if (isInErrorState || savedItem) {
|
||||
@@ -276,9 +276,9 @@ class EditorCtrl extends PureCtrl {
|
||||
message: "Offline Saving Issue",
|
||||
desc: "Changes not saved"
|
||||
});
|
||||
}, 500)
|
||||
}, 500);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
editorForNote(note) {
|
||||
@@ -574,8 +574,8 @@ class EditorCtrl extends PureCtrl {
|
||||
this.appState.setSelectedNote(null);
|
||||
this.setMenuState('showOptionsMenu', false);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
const requiresPrivilege = await this.privilegesManager.actionRequiresPrivilege(
|
||||
PrivilegesManager.ActionDeleteNote
|
||||
);
|
||||
@@ -631,7 +631,7 @@ class EditorCtrl extends PureCtrl {
|
||||
this.modelManager.emptyTrash();
|
||||
this.syncManager.sync();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
togglePin() {
|
||||
@@ -755,7 +755,7 @@ class EditorCtrl extends PureCtrl {
|
||||
return string.length > 0;
|
||||
}).map((string) => {
|
||||
return string.trim();
|
||||
})
|
||||
});
|
||||
this.state.note.dummy = false;
|
||||
this.updateTags(strings);
|
||||
}
|
||||
@@ -862,16 +862,16 @@ class EditorCtrl extends PureCtrl {
|
||||
/** Allows textarea to reload */
|
||||
await this.setState({
|
||||
noteReady: false
|
||||
})
|
||||
});
|
||||
this.setState({
|
||||
noteReady: true
|
||||
})
|
||||
});
|
||||
this.reloadFont();
|
||||
} else if (key === PREF_EDITOR_RESIZERS_ENABLED && this[key] === true) {
|
||||
this.$timeout(() => {
|
||||
this.leftResizeControl.flash();
|
||||
this.rightResizeControl.flash();
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -961,7 +961,7 @@ class EditorCtrl extends PureCtrl {
|
||||
'style',
|
||||
`width: ${widthString}; height: ${heightString};`
|
||||
);
|
||||
}
|
||||
};
|
||||
if (data.type === 'container') {
|
||||
if (component.area === 'note-tags') {
|
||||
const container = document.getElementById(
|
||||
@@ -983,7 +983,7 @@ class EditorCtrl extends PureCtrl {
|
||||
}
|
||||
else if (action === 'save-items') {
|
||||
const includesNote = data.items.map((item) => {
|
||||
return item.uuid
|
||||
return item.uuid;
|
||||
}).includes(this.state.note.uuid);
|
||||
if (includesNote) {
|
||||
this.showSavingStatus();
|
||||
@@ -1001,7 +1001,7 @@ class EditorCtrl extends PureCtrl {
|
||||
|
||||
this.setState({
|
||||
state: components
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
reloadComponentContext() {
|
||||
@@ -1071,14 +1071,14 @@ class EditorCtrl extends PureCtrl {
|
||||
onKeyDown: () => {
|
||||
this.setState({
|
||||
altKeyDown: true
|
||||
})
|
||||
});
|
||||
},
|
||||
onKeyUp: () => {
|
||||
this.setState({
|
||||
altKeyDown: false
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
this.trashKeyObserver = this.keyboardManager.addKeyObserver({
|
||||
key: KeyboardManager.KeyBackspace,
|
||||
@@ -1090,7 +1090,7 @@ class EditorCtrl extends PureCtrl {
|
||||
onKeyDown: () => {
|
||||
this.deleteNote();
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
this.deleteKeyObserver = this.keyboardManager.addKeyObserver({
|
||||
key: KeyboardManager.KeyBackspace,
|
||||
@@ -1103,7 +1103,7 @@ class EditorCtrl extends PureCtrl {
|
||||
event.preventDefault();
|
||||
this.deleteNote(true);
|
||||
},
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
onSystemEditorLoad() {
|
||||
|
||||
@@ -127,7 +127,7 @@ class FooterCtrl {
|
||||
this.findErrors();
|
||||
this.updateOfflineStatus();
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ class FooterCtrl {
|
||||
'SN|Component',
|
||||
(allItems, validItems, deletedItems, source) => {
|
||||
this.rooms = this.modelManager.components.filter((candidate) => {
|
||||
return candidate.area === 'rooms' && !candidate.deleted
|
||||
return candidate.area === 'rooms' && !candidate.deleted;
|
||||
});
|
||||
if(this.queueExtReload) {
|
||||
this.queueExtReload = false;
|
||||
@@ -259,7 +259,7 @@ class FooterCtrl {
|
||||
}).then((response) => {
|
||||
this.$timeout(() => {
|
||||
this.isRefreshing = false;
|
||||
}, 200)
|
||||
}, 200);
|
||||
if(response && response.error) {
|
||||
this.alertManager.alert({
|
||||
text: STRING_GENERIC_SYNC_ERROR
|
||||
@@ -282,7 +282,7 @@ class FooterCtrl {
|
||||
this.newUpdateAvailable = false;
|
||||
this.alertManager.alert({
|
||||
text: STRING_NEW_UPDATE_READY
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
reloadDockShortcuts() {
|
||||
@@ -297,7 +297,7 @@ class FooterCtrl {
|
||||
name: name,
|
||||
component: theme,
|
||||
icon: icon
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
this.dockShortcuts = shortcuts.sort((a, b) => {
|
||||
@@ -341,8 +341,8 @@ class FooterCtrl {
|
||||
const run = () => {
|
||||
this.$timeout(() => {
|
||||
room.showRoom = !room.showRoom;
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if(!room.showRoom) {
|
||||
const requiresPrivilege = await this.privilegesManager.actionRequiresPrivilege(
|
||||
|
||||
@@ -44,7 +44,7 @@ class LockScreenCtrl {
|
||||
input.focus();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
submitPasscodeForm($event) {
|
||||
@@ -83,9 +83,9 @@ class LockScreenCtrl {
|
||||
onConfirm: () => {
|
||||
this.authManager.signout(true).then(() => {
|
||||
window.location.reload();
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export function filterAndSortNotes({
|
||||
notes: filtered,
|
||||
sortBy,
|
||||
reverse
|
||||
})
|
||||
});
|
||||
return sorted;
|
||||
}
|
||||
|
||||
@@ -143,10 +143,10 @@ export function sortNotes({
|
||||
if (aValue > bValue) { return -1 * vector; }
|
||||
else if (aValue < bValue) { return 1 * vector; }
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
const result = notes.sort(function (a, b) {
|
||||
return sortValueFn(a, b);
|
||||
})
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class NotesCtrl extends PureCtrl {
|
||||
panelTitle: null,
|
||||
mutable: { showMenu: false },
|
||||
noteFilter: { text: '' },
|
||||
}
|
||||
};
|
||||
|
||||
this.panelController = {};
|
||||
window.onresize = (event) => {
|
||||
@@ -124,7 +124,7 @@ class NotesCtrl extends PureCtrl {
|
||||
this.modelManager.removeItemLocally(this.state.selectedNote);
|
||||
this.selectNote(null).then(() => {
|
||||
this.reloadNotes();
|
||||
})
|
||||
});
|
||||
/**
|
||||
* We want to see if the user will download any items from the server.
|
||||
* If the next sync completes and our notes are still 0,
|
||||
@@ -133,7 +133,7 @@ class NotesCtrl extends PureCtrl {
|
||||
this.createDummyOnSynCompletionIfNoNotes = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
addSyncEventHandler() {
|
||||
@@ -270,7 +270,7 @@ class NotesCtrl extends PureCtrl {
|
||||
...this.state.mutable,
|
||||
showMenu: false
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async handleNoteSelection(note) {
|
||||
@@ -284,7 +284,7 @@ class NotesCtrl extends PureCtrl {
|
||||
}
|
||||
await this.setState({
|
||||
selectedNote: note
|
||||
})
|
||||
});
|
||||
if (!note) {
|
||||
return;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ class NotesCtrl extends PureCtrl {
|
||||
this.appState.panelDidResize({
|
||||
name: PANEL_NAME_NOTES,
|
||||
collapsed: this.panelController.isCollapsed()
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -391,14 +391,14 @@ class NotesCtrl extends PureCtrl {
|
||||
reloadPanelTitle() {
|
||||
let title;
|
||||
if (this.isFiltering()) {
|
||||
const resultCount = this.state.notes.length
|
||||
const resultCount = this.state.notes.length;
|
||||
title = `${resultCount} search results`;
|
||||
} else if (this.state.tag) {
|
||||
title = `${this.state.tag.title}`;
|
||||
}
|
||||
this.setState({
|
||||
panelTitle: title
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
optionsSubtitle() {
|
||||
@@ -411,13 +411,13 @@ class NotesCtrl extends PureCtrl {
|
||||
base += " Title";
|
||||
}
|
||||
if (this.state.showArchived) {
|
||||
base += " | + Archived"
|
||||
base += " | + Archived";
|
||||
}
|
||||
if (this.state.hidePinned) {
|
||||
base += " | – Pinned"
|
||||
base += " | – Pinned";
|
||||
}
|
||||
if (this.state.sortReverse) {
|
||||
base += " | Reversed"
|
||||
base += " | Reversed";
|
||||
}
|
||||
return base;
|
||||
}
|
||||
@@ -428,49 +428,49 @@ class NotesCtrl extends PureCtrl {
|
||||
flags.push({
|
||||
text: "Pinned",
|
||||
class: 'info'
|
||||
})
|
||||
});
|
||||
}
|
||||
if (note.archived) {
|
||||
flags.push({
|
||||
text: "Archived",
|
||||
class: 'warning'
|
||||
})
|
||||
});
|
||||
}
|
||||
if (note.content.protected) {
|
||||
flags.push({
|
||||
text: "Protected",
|
||||
class: 'success'
|
||||
})
|
||||
});
|
||||
}
|
||||
if (note.locked) {
|
||||
flags.push({
|
||||
text: "Locked",
|
||||
class: 'neutral'
|
||||
})
|
||||
});
|
||||
}
|
||||
if (note.content.trashed) {
|
||||
flags.push({
|
||||
text: "Deleted",
|
||||
class: 'danger'
|
||||
})
|
||||
});
|
||||
}
|
||||
if (note.content.conflict_of) {
|
||||
flags.push({
|
||||
text: "Conflicted Copy",
|
||||
class: 'danger'
|
||||
})
|
||||
});
|
||||
}
|
||||
if (note.errorDecrypting) {
|
||||
flags.push({
|
||||
text: "Missing Keys",
|
||||
class: 'danger'
|
||||
})
|
||||
});
|
||||
}
|
||||
if (note.deleted) {
|
||||
flags.push({
|
||||
text: "Deletion Pending Sync",
|
||||
class: 'danger'
|
||||
})
|
||||
});
|
||||
}
|
||||
note.flags = flags;
|
||||
return flags;
|
||||
@@ -566,7 +566,7 @@ class NotesCtrl extends PureCtrl {
|
||||
...this.state.noteFilter,
|
||||
text: text
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
async clearFilterText() {
|
||||
@@ -671,7 +671,7 @@ class NotesCtrl extends PureCtrl {
|
||||
event.preventDefault();
|
||||
this.createNewNote();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
this.nextNoteKeyObserver = this.keyboardManager.addKeyObserver({
|
||||
key: KeyboardManager.KeyDown,
|
||||
@@ -682,11 +682,11 @@ class NotesCtrl extends PureCtrl {
|
||||
onKeyDown: (event) => {
|
||||
const searchBar = this.getSearchBar();
|
||||
if (searchBar === document.activeElement) {
|
||||
searchBar.blur()
|
||||
searchBar.blur();
|
||||
}
|
||||
this.selectNextNote();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
this.nextNoteKeyObserver = this.keyboardManager.addKeyObserver({
|
||||
key: KeyboardManager.KeyUp,
|
||||
@@ -704,9 +704,9 @@ class NotesCtrl extends PureCtrl {
|
||||
],
|
||||
onKeyDown: (event) => {
|
||||
const searchBar = this.getSearchBar();
|
||||
if (searchBar) { searchBar.focus() };
|
||||
if (searchBar) { searchBar.focus(); };
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ class RootCtrl {
|
||||
if(this.tagsCollapsed) { appClass += " collapsed-tags"; }
|
||||
this.$scope.appClass = appClass;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
loadAfterUnlock() {
|
||||
@@ -143,13 +143,13 @@ class RootCtrl {
|
||||
this.syncManager.clearSyncToken();
|
||||
this.syncManager.sync();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
addSyncStatusObserver() {
|
||||
this.syncStatusObserver = this.syncManager.registerSyncStatusObserver((status) => {
|
||||
if(status.retrievedCount > 20) {
|
||||
const text = `Downloading ${status.retrievedCount} items. Keep app open.`
|
||||
const text = `Downloading ${status.retrievedCount} items. Keep app open.`;
|
||||
this.syncStatus = this.statusManager.replaceStatusWithString(
|
||||
this.syncStatus,
|
||||
text
|
||||
@@ -230,7 +230,7 @@ class RootCtrl {
|
||||
encryptionEnabled ? "Decrypting items..." : "Loading items..."
|
||||
);
|
||||
const incrementalCallback = (current, total) => {
|
||||
const notesString = `${current}/${total} items...`
|
||||
const notesString = `${current}/${total} items...`;
|
||||
const status = encryptionEnabled
|
||||
? `Decrypting ${notesString}`
|
||||
: `Loading ${notesString}`;
|
||||
@@ -238,7 +238,7 @@ class RootCtrl {
|
||||
this.syncStatus,
|
||||
status
|
||||
);
|
||||
}
|
||||
};
|
||||
this.syncManager.loadLocalItems({incrementalCallback}).then(() => {
|
||||
this.$timeout(() => {
|
||||
this.$rootScope.$broadcast("initial-data-loaded");
|
||||
@@ -250,7 +250,7 @@ class RootCtrl {
|
||||
performIntegrityCheck: true
|
||||
}).then(() => {
|
||||
this.syncStatus = this.statusManager.removeStatus(this.syncStatus);
|
||||
})
|
||||
});
|
||||
setInterval(() => {
|
||||
this.syncManager.sync();
|
||||
}, AUTO_SYNC_INTERVAL);
|
||||
@@ -321,9 +321,9 @@ class RootCtrl {
|
||||
{}
|
||||
).then((response) => {
|
||||
window.location.reload();
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if(urlParam('server')) {
|
||||
autoSignInFromParams();
|
||||
|
||||
Reference in New Issue
Block a user