Fix sidebar and tab overflow navigation

This commit is contained in:
vrustx
2026-05-31 02:41:43 +08:00
parent c24e3a5086
commit e94de447c9
13 changed files with 486 additions and 138 deletions
@@ -13,10 +13,16 @@ const leafTypes: Set<TreeNodeType> = new Set([
"saved-sql-file",
]);
const fullWidthLabelTypes: Set<TreeNodeType> = new Set(["table", "view", "mongo-collection"]);
export function treeItemPaddingLeft(depth: number): string {
return `${depth * 16 + 8}px`;
}
export function usesFullWidthTreeLabel(type: TreeNodeType): boolean {
return fullWidthLabelTypes.has(type);
}
export function canTreeNodeExpand(type: TreeNodeType): boolean {
return !leafTypes.has(type);
}