Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.selectEntryView.on('show-open-files', () => {
this.selectEntryView.hide();
Events.emit('open-file');
});
},
setFilter(filter) {
this.filter = this.prepareFilter(filter);
this.filter.subGroups = this.settings.expandGroups;
if (!this.filter.advanced && this.advancedSearch) {
this.filter.advanced = this.advancedSearch;
}
const entries = this.getEntries();
if (!this.activeEntryId || !entries.get(this.activeEntryId)) {
const firstEntry = entries[0];
this.activeEntryId = firstEntry ? firstEntry.id : null;
}
Events.emit('filter', { filter: this.filter, sort: this.sort, entries });
Events.emit('entry-selected', entries.get(this.activeEntryId));
}
windowResize() {
Events.emit('page-geometry', { source: 'window' });
}
Events.on('launcher-minimize', () => setTimeout(() => Events.emit('app-minimized'), 0));
Events.on('launcher-started-minimized', () => setTimeout(() => Launcher.minimizeApp(), 0));
toggleHelp() {
Events.emit('toggle-settings', 'help');
}
removeKeyFile() {
this.db.credentials.keyFileHash = null;
const changed = !!this.oldKeyFileHash;
if (!changed && this.db.credentials.passwordHash === this.oldPasswordHash) {
this.db.meta.keyChanged = this.oldKeyChangeDate;
}
this.set({ keyFileName: '', keyFilePath: '', keyFileChanged: changed });
Events.emit('unset-keyfile', this.id);
this.setModified();
}
file.on('change', () => Events.emit('file-changed', file));
return true;
returnToApp() {
Events.emit('edit-group');
}
}
autoType() {
Events.emit('auto-type', { entry: this.model });
}