mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-11-01 08:05:23 +00:00
feat: option to hide the sidebar after opening a host (#1652)
This commit is contained in:
1 parent
f20d64b4f2
commit
7324982f47
7 files changed
+36
-1
No files matched your search
@@ -88,6 +88,8 @@ export interface HostSidebarDisplayPreferences extends HostRowFields {
|
||||
/** When false, nested folders hide the parent-path breadcrumb before their name. */
|
||||
showFolderPaths: boolean;
|
||||
hostClickBehavior: HostClickBehavior;
|
||||
/** When true, the sidebar closes after a host is opened from it. */
|
||||
closeOnOpen: boolean;
|
||||
/**
|
||||
* Host action id to whether it shows in the row's connect bar. An action
|
||||
* missing here follows its own default. Every action stays in the menu.
|
||||
@@ -163,6 +165,7 @@ export function defaultHostSidebarPreferences(): HostSidebarPreferences {
|
||||
openOnDoubleClick: false,
|
||||
showFolderPaths: true,
|
||||
hostClickBehavior: "newTab",
|
||||
closeOnOpen: false,
|
||||
barActions: {},
|
||||
...defaultHostRowFields(),
|
||||
},
|
||||
@@ -274,6 +277,10 @@ export function sanitizeHostSidebarPreferences(
|
||||
)
|
||||
? (displayObj.hostClickBehavior as HostClickBehavior)
|
||||
: defaults.display.hostClickBehavior,
|
||||
closeOnOpen:
|
||||
typeof displayObj.closeOnOpen === "boolean"
|
||||
? displayObj.closeOnOpen
|
||||
: defaults.display.closeOnOpen,
|
||||
barActions: sanitizeBarActions(displayObj.barActions),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user