mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-20 15:19:16 +00:00
15 lines
545 B
TypeScript
15 lines
545 B
TypeScript
/** Tab ids targeted by keyboard tab navigation shortcuts. */
|
|
export function buildNumberShortcutTabTargets(params: {
|
|
showSftpTab: boolean;
|
|
shellOnlyTabNumberShortcuts: boolean;
|
|
orderedTabs: readonly string[];
|
|
editorTabIds: readonly string[];
|
|
}): string[] {
|
|
const workTabs = [...new Set([...params.orderedTabs, ...params.editorTabIds])];
|
|
if (params.shellOnlyTabNumberShortcuts) {
|
|
return workTabs;
|
|
}
|
|
const pinnedTabs = params.showSftpTab ? ['vault', 'sftp'] : ['vault'];
|
|
return [...new Set([...pinnedTabs, ...workTabs])];
|
|
}
|