mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 15:45: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
@@ -223,6 +223,20 @@ export function CustomizeSidebarPanel({
|
||||
}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow
|
||||
label={t("hosts.closeOnOpen")}
|
||||
description={t("hosts.closeOnOpenDesc")}
|
||||
>
|
||||
<FakeSwitch
|
||||
checked={preferences.display.closeOnOpen}
|
||||
onChange={(v) =>
|
||||
update((prev) => ({
|
||||
...prev,
|
||||
display: { ...prev.display, closeOnOpen: v },
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingRow
|
||||
label={t("newUi.sidebar.userProfile.statusColors")}
|
||||
description={t("newUi.sidebar.userProfile.statusColorsDesc")}
|
||||
|
||||
@@ -201,6 +201,7 @@ export function HostsPanel({
|
||||
hostTree,
|
||||
loading,
|
||||
active = true,
|
||||
onCloseSidebar,
|
||||
}: {
|
||||
onOpenTab: (
|
||||
host: Host,
|
||||
@@ -217,6 +218,7 @@ export function HostsPanel({
|
||||
/** Unused since editing moved to the Manage tab. */
|
||||
onEditingChange?: (editing: boolean) => void;
|
||||
active?: boolean;
|
||||
onCloseSidebar?: () => void;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const { statuses, getStatus } = useServerStatus();
|
||||
@@ -1044,7 +1046,10 @@ export function HostsPanel({
|
||||
).children
|
||||
: []
|
||||
}
|
||||
onOpenTab={onOpenTab}
|
||||
onOpenTab={(host, type, options) => {
|
||||
onOpenTab(host, type, options);
|
||||
if (sidebarPrefs.display.closeOnOpen) onCloseSidebar?.();
|
||||
}}
|
||||
onEditHost={onEditHost}
|
||||
onShareHost={(host) => setShareModalHost(host)}
|
||||
query={hostSearch.trim().toLowerCase()}
|
||||
|
||||
Reference in new issue
Block a user