feat(projects): support pinning and unpinning of tabs

This commit is contained in:
hooke
2025-12-03 07:25:46 -07:00
committed by Soybean
parent 605173a1cc
commit b8a767d704
6 changed files with 88 additions and 4 deletions

View File

@@ -198,6 +198,18 @@ export function getFixedTabIds(tabs: App.Global.Tab[]) {
return fixedTabs.map(tab => tab.id);
}
/**
* Reorder fixed tabs fixedIndex
*
* @param tabs
*/
export function reorderFixedTabs(tabs: App.Global.Tab[]) {
const fixedTabs = getFixedTabs(tabs);
fixedTabs.forEach((t, i) => {
t.fixedIndex = i;
});
}
/**
* Update tabs label
*