feat: add SQL library panel with folder/file management, rename, and sync support
This commit is contained in:
1 parent
d7a8f5d285
commit
9ffa4c41d9
26 files changed
+711
-352
No files matched your search
@@ -19,10 +19,6 @@ export type ActiveTabSidebarTarget =
|
||||
type: "etcd-root";
|
||||
connectionId: string;
|
||||
}
|
||||
| {
|
||||
type: "saved-sql-file";
|
||||
savedSqlId: string;
|
||||
}
|
||||
| {
|
||||
type: "query-context";
|
||||
connectionId: string;
|
||||
@@ -33,10 +29,6 @@ export type ActiveTabSidebarTarget =
|
||||
export function activeTabSidebarTarget(tab: QueryTab | undefined | null): ActiveTabSidebarTarget | null {
|
||||
if (!tab) return null;
|
||||
|
||||
if (tab.savedSqlId) {
|
||||
return { type: "saved-sql-file", savedSqlId: tab.savedSqlId };
|
||||
}
|
||||
|
||||
if (tab.mode === "data") {
|
||||
const tableName = tab.tableMeta?.tableName || tab.title;
|
||||
if (!tableName) return null;
|
||||
@@ -83,10 +75,6 @@ function schemaMatches(node: TreeNode, schema: string | undefined): boolean {
|
||||
}
|
||||
|
||||
export function matchesTarget(node: TreeNode, target: ActiveTabSidebarTarget): boolean {
|
||||
if (target.type === "saved-sql-file") {
|
||||
return node.type === "saved-sql-file" && node.savedSqlId === target.savedSqlId;
|
||||
}
|
||||
|
||||
if (target.type === "mongo-collection") {
|
||||
return (
|
||||
node.type === "mongo-collection" &&
|
||||
|
||||
Reference in new issue
Block a user