From ed7ed758dbfed8fedca9768d8343927e0b2f957c Mon Sep 17 00:00:00 2001 From: Kaede Akino Date: Sun, 18 Oct 2026 20:46:45 +0800 Subject: [PATCH] feat: add deliver to jumphosts --- TFI/Features/HostEditor/MobileHostEditor.swift | 6 +++++- TFM/Features/HostEditor/HostEditorView.swift | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/TFI/Features/HostEditor/MobileHostEditor.swift b/TFI/Features/HostEditor/MobileHostEditor.swift index 60135274..d8a5c36f 100644 --- a/TFI/Features/HostEditor/MobileHostEditor.swift +++ b/TFI/Features/HostEditor/MobileHostEditor.swift @@ -141,8 +141,12 @@ struct MobileHostEditor: View { HostTransportSection(host: $draft) Section(AppStrings.Vault.routing.swiftUIKey) { Picker(AppStrings.Vault.jumpHost.swiftUIKey, selection: $draft.jumpHostID) { + let jumpHosts = library.hosts.filter { $0.id != draft.id && $0.sshEnabled } Text(AppStrings.Common.none).tag(UUID?.none) - ForEach(library.hosts.filter { $0.id != draft.id && $0.sshEnabled }) { + if !jumpHosts.isEmpty { + Divider() + } + ForEach(jumpHosts) { Text($0.name).tag(Optional($0.id)) } } diff --git a/TFM/Features/HostEditor/HostEditorView.swift b/TFM/Features/HostEditor/HostEditorView.swift index 14db978a..99d73b38 100644 --- a/TFM/Features/HostEditor/HostEditorView.swift +++ b/TFM/Features/HostEditor/HostEditorView.swift @@ -260,7 +260,9 @@ struct HostEditorView: View { Section(AppStrings.Vault.routing.swiftUIKey) { Picker(AppStrings.Vault.jumpHost.swiftUIKey, selection: $draft.jumpHostID) { Text(AppStrings.Common.none).tag(Host.ID?.none) - Divider() + if !jumpHostSections.isEmpty { + Divider() + } ForEach(jumpHostSections) { section in Section(section.title) { ForEach(section.hosts) { host in