mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
feat: Sidebar host click should focus existing tab instead of opening a new connection (#1289)
https://github.com/Termix-SSH/Support/issues/1289
This commit is contained in:
1 parent
f8a8139031
commit
afae2889cb
9 files changed
+109
-12
No files matched your search
@@ -51,6 +51,8 @@ export interface HostSidebarDisplayPreferences {
|
||||
openOnDoubleClick: boolean;
|
||||
/** When false, nested folders hide the parent-path breadcrumb before their name. */
|
||||
showFolderPaths: boolean;
|
||||
/** When true, clicking a host with an already-open tab focuses it instead of opening a new one. */
|
||||
focusExistingTab: boolean;
|
||||
}
|
||||
|
||||
export interface HostSidebarPreferences {
|
||||
@@ -133,6 +135,7 @@ export function defaultHostSidebarPreferences(): HostSidebarPreferences {
|
||||
statusColorScheme: "accent",
|
||||
openOnDoubleClick: false,
|
||||
showFolderPaths: true,
|
||||
focusExistingTab: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -210,6 +213,10 @@ export function sanitizeHostSidebarPreferences(
|
||||
typeof displayObj.showFolderPaths === "boolean"
|
||||
? displayObj.showFolderPaths
|
||||
: defaults.display.showFolderPaths,
|
||||
focusExistingTab:
|
||||
typeof displayObj.focusExistingTab === "boolean"
|
||||
? displayObj.focusExistingTab
|
||||
: defaults.display.focusExistingTab,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user