Redo connection manager: Stacks, More options, drag & drop, WinSCP import
Folders become Stacks (connections.json v2, no v1 migration): collapsible stack-first list, open-stack-in-tabs (first reuses a pristine tab), drag connections between stacks. More... reveals a per-connection Local directory applied to the other panel when local and untouched. Import reads a WinSCP.ini export incl. deobfuscated passwords. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+8
-3
@@ -1,6 +1,5 @@
|
||||
import type {
|
||||
AppSettings,
|
||||
ConnFolder,
|
||||
ConnectionConfig,
|
||||
ConnectionsFile,
|
||||
EntryType,
|
||||
@@ -8,6 +7,7 @@ import type {
|
||||
Result,
|
||||
SavedConnection,
|
||||
SshConfigHost,
|
||||
Stack,
|
||||
TransferSnapshot,
|
||||
} from "./types";
|
||||
|
||||
@@ -67,8 +67,13 @@ export type AppRPC = {
|
||||
response: Result<{ id: string }>;
|
||||
};
|
||||
deleteConnection: { params: { id: string }; response: Result };
|
||||
upsertFolder: { params: { folder: ConnFolder }; response: Result<{ id: string }> };
|
||||
deleteFolder: { params: { id: string }; response: Result };
|
||||
upsertStack: { params: { stack: Stack }; response: Result<{ id: string }> };
|
||||
deleteStack: { params: { id: string }; response: Result };
|
||||
/** Native file picker + parse of a WinSCP.ini export into the store. */
|
||||
importWinScp: {
|
||||
params: Record<string, never>;
|
||||
response: Result<{ connections: number; stacks: number; skipped: number }>;
|
||||
};
|
||||
getSshConfigHosts: {
|
||||
params: Record<string, never>;
|
||||
response: Result<{ hosts: SshConfigHost[] }>;
|
||||
|
||||
+9
-4
@@ -27,13 +27,18 @@ export interface ConnectionConfig {
|
||||
|
||||
export interface SavedConnection extends ConnectionConfig {
|
||||
id: string;
|
||||
folderId: string | null;
|
||||
stackId: string | null;
|
||||
name: string;
|
||||
/** Other-panel local dir applied when that panel is local and untouched. */
|
||||
localDir?: string | null;
|
||||
}
|
||||
|
||||
export interface ConnFolder {
|
||||
/** A named group of connections that can be opened together as tabs. */
|
||||
export interface Stack {
|
||||
id: string;
|
||||
name: string;
|
||||
/** Collapsed in the connection-manager list (UI state, persisted). */
|
||||
collapsed?: boolean;
|
||||
}
|
||||
|
||||
/** A concrete host alias resolved from ~/.ssh/config (read-only). */
|
||||
@@ -47,8 +52,8 @@ export interface SshConfigHost {
|
||||
}
|
||||
|
||||
export interface ConnectionsFile {
|
||||
version: 1;
|
||||
folders: ConnFolder[];
|
||||
version: 2;
|
||||
stacks: Stack[];
|
||||
connections: SavedConnection[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user