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