Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions addon/src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
"message": "Open \"Manage Groups\" in new tab",
"description": "Open \"Manage Groups\" in new tab"
},
"openGroupsInNewWindow": {
"message": "Always open groups in new window",
"description": "Always open groups in new window"
},
"showConfirmDialogBeforeGroupDelete": {
"message": "Show confirmation dialog before deleting the group",
"description": "Show confirmation dialog before deleting the group"
Expand Down
1 change: 1 addition & 0 deletions addon/src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export const DEFAULT_OPTIONS = Object.freeze({
alwaysAskNewGroupName: true,
createNewGroupWhenOpenNewWindow: false,
openManageGroupsInTab: true,
openGroupsInNewWindow: false,
showConfirmDialogBeforeGroupArchiving: true,
showConfirmDialogBeforeGroupDelete: true,
showNotificationAfterGroupDelete: true,
Expand Down
6 changes: 6 additions & 0 deletions addon/src/options/Options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,12 @@
<span v-text="lang('openManageGroupsInTab')"></span>
</label>
</div>
<div class ="field">
<label class="checkbox">
<input v-model="options.openGroupsInNewWindow" type="checkbox" />
<span v-text="lang('openGroupsInNewWindow')"></span>
</label>
</div>
<div class="field">
<label class="checkbox">
<input v-model="options.showConfirmDialogBeforeGroupDelete" type="checkbox" />
Expand Down
17 changes: 13 additions & 4 deletions addon/src/popup/Popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -952,10 +952,12 @@
} else {
this.someGroupAreLoading = true;

let loadGroupPromise = Messages.sendMessage('load-custom-group', {
groupId: group.id,
tabId: tab?.id,
});
// Open group in current window, or in new window if openGroupsInNewWindow (settings) is enabled
if (this.options.openGroupsInNewWindow) {
let loadGroupPromise = this.openGroupInNewWindow(group, tab);
} else {
let loadGroupPromise = this.openGroupInThisWindow(group, tab);
}

if (!isSidebar && this.options.closePopupAfterSelectTab && tab) {
this.someGroupAreLoading = false;
Expand Down Expand Up @@ -1038,6 +1040,13 @@
});
},

openGroupInThisWindow(group, tab) {
Messages.sendMessage('load-custom-group', {
groupId: group.id,
tabId: tab?.id,
});
},

openGroupSettings(group) {
this.groupToEdit = group;
},
Expand Down