mirror of https://github.com/keeweb/keeweb
switching to the open view on request
parent
1a8aff0594
commit
e0d47a474d
|
@ -1434,6 +1434,7 @@ class AppModel {
|
|||
|
||||
unlockAnyFile(unlockRes, timeout) {
|
||||
this.rejectPendingFileUnlockPromise('Replaced with a new operation');
|
||||
Events.emit('show-open-view');
|
||||
return new Promise((resolve, reject) => {
|
||||
this.fileUnlockPromise = { resolve, reject, unlockRes };
|
||||
if (timeout) {
|
||||
|
|
|
@ -82,6 +82,7 @@ class AppView extends View {
|
|||
this.listenTo(Events, 'toggle-settings', this.toggleSettings);
|
||||
this.listenTo(Events, 'toggle-menu', this.toggleMenu);
|
||||
this.listenTo(Events, 'toggle-details', this.toggleDetails);
|
||||
this.listenTo(Events, 'show-open-view', this.showOpenIfNotThere);
|
||||
this.listenTo(Events, 'edit-group', this.editGroup);
|
||||
this.listenTo(Events, 'edit-tag', this.editTag);
|
||||
this.listenTo(Events, 'edit-generator-presets', this.editGeneratorPresets);
|
||||
|
@ -724,6 +725,12 @@ class AppView extends View {
|
|||
this.views.menu.switchVisibility(false);
|
||||
}
|
||||
|
||||
showOpenIfNotThere() {
|
||||
if (!this.views.open) {
|
||||
this.showLastOpenFile();
|
||||
}
|
||||
}
|
||||
|
||||
editGroup(group) {
|
||||
if (group && !(this.views.panel instanceof GrpView)) {
|
||||
this.showEditGroup(group);
|
||||
|
|
Loading…
Reference in New Issue