mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-30 03:32:26 +08:00
commit
faeefc75ba
@ -551,7 +551,7 @@ export default class TabManager extends Component {
|
|||||||
await this.removeNoteContext(ntxIdToRemove);
|
await this.removeNoteContext(ntxIdToRemove);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async closeOtherTabsCommand({ntxId}) {
|
async closeOtherTabsCommand({ntxId}) {
|
||||||
for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) {
|
for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) {
|
||||||
if (ntxIdToRemove !== ntxId) {
|
if (ntxIdToRemove !== ntxId) {
|
||||||
@ -560,6 +560,18 @@ export default class TabManager extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async closeRightTabsCommand({ntxId}) {
|
||||||
|
const ntxIds = this.mainNoteContexts.map(nc => nc.ntxId);
|
||||||
|
const index = ntxIds.indexOf(ntxId);
|
||||||
|
|
||||||
|
if (index !== -1) {
|
||||||
|
const idsToRemove = ntxIds.slice(index + 1);
|
||||||
|
for (const ntxIdToRemove of idsToRemove) {
|
||||||
|
await this.removeNoteContext(ntxIdToRemove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async closeTabCommand({ntxId}) {
|
async closeTabCommand({ntxId}) {
|
||||||
await this.removeNoteContext(ntxId);
|
await this.removeNoteContext(ntxId);
|
||||||
}
|
}
|
||||||
|
@ -260,8 +260,10 @@ export default class TabRowWidget extends BasicWidget {
|
|||||||
y: e.pageY,
|
y: e.pageY,
|
||||||
items: [
|
items: [
|
||||||
{title: t('tab_row.close'), command: "closeTab", uiIcon: "bx bx-x"},
|
{title: t('tab_row.close'), command: "closeTab", uiIcon: "bx bx-x"},
|
||||||
{title: t('tab_row.close_other_tabs'), command: "closeOtherTabs", uiIcon: "bx bx-x"},
|
{title: t('tab_row.close_other_tabs'), command: "closeOtherTabs", uiIcon: "bx bx-empty", enabled: appContext.tabManager.noteContexts.length !== 1},
|
||||||
{title: t('tab_row.close_all_tabs'), command: "closeAllTabs", uiIcon: "bx bx-x"},
|
{title: t('tab_row.close_right_tabs'), command: "closeRightTabs", uiIcon: "bx bx-empty", enabled: appContext.tabManager.noteContexts.at(-1).ntxId !== ntxId},
|
||||||
|
{title: t('tab_row.close_all_tabs'), command: "closeAllTabs", uiIcon: "bx bx-empty"},
|
||||||
|
{ title: "----" },
|
||||||
{title: t('tab_row.move_tab_to_new_window'), command: "moveTabToNewWindow", uiIcon: "bx bx-window-open"}
|
{title: t('tab_row.move_tab_to_new_window'), command: "moveTabToNewWindow", uiIcon: "bx bx-window-open"}
|
||||||
],
|
],
|
||||||
selectMenuItemHandler: ({command}) => {
|
selectMenuItemHandler: ({command}) => {
|
||||||
|
@ -1434,6 +1434,7 @@
|
|||||||
"add_new_tab": "Add new tab",
|
"add_new_tab": "Add new tab",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"close_other_tabs": "Close other tabs",
|
"close_other_tabs": "Close other tabs",
|
||||||
|
"close_right_tabs": "Close tabs to the right",
|
||||||
"close_all_tabs": "Close all tabs",
|
"close_all_tabs": "Close all tabs",
|
||||||
"move_tab_to_new_window": "Move this tab to a new window",
|
"move_tab_to_new_window": "Move this tab to a new window",
|
||||||
"new_tab": "New tab"
|
"new_tab": "New tab"
|
||||||
|
@ -1439,7 +1439,8 @@
|
|||||||
"close_other_tabs": "Închide celelalte taburi",
|
"close_other_tabs": "Închide celelalte taburi",
|
||||||
"close_tab": "Închide tab",
|
"close_tab": "Închide tab",
|
||||||
"move_tab_to_new_window": "Mută acest tab în altă fereastră",
|
"move_tab_to_new_window": "Mută acest tab în altă fereastră",
|
||||||
"new_tab": "Tab nou"
|
"new_tab": "Tab nou",
|
||||||
|
"close_right_tabs": "Închide taburile din dreapta"
|
||||||
},
|
},
|
||||||
"toc": {
|
"toc": {
|
||||||
"options": "Setări",
|
"options": "Setări",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user