From ccb12351b3d7ae784c8b12cd87031710034e2196 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Sun, 3 May 2026 09:53:19 +0100 Subject: [PATCH] tiny change --- ShhShell/Views/Keys/KeyDetailView.swift | 34 +++++++++++++------------ SwiftTerm | 2 +- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ShhShell/Views/Keys/KeyDetailView.swift b/ShhShell/Views/Keys/KeyDetailView.swift index 6631918..673914e 100644 --- a/ShhShell/Views/Keys/KeyDetailView.swift +++ b/ShhShell/Views/Keys/KeyDetailView.swift @@ -46,24 +46,26 @@ struct KeyDetailView: View { .buttonStyle(.plain) } } - Menu() { - ForEach(hostsManager.hostsNotUsing(key: keypair)) { host in - Button() { - hostsManager.set(keypair: keypair, onHost: host) - } label: { - host.symbol.image - .resizable().scaledToFit() - .foregroundStyle(.blue) - .frame(width: 20, height: 20) - Text(host.description) - .foregroundStyle(.blue) + if !hostsManager.hosts.isEmpty { + Menu() { + ForEach(hostsManager.hostsNotUsing(key: keypair)) { host in + Button() { + hostsManager.set(keypair: keypair, onHost: host) + } label: { + host.symbol.image + .resizable().scaledToFit() + .foregroundStyle(.blue) + .frame(width: 20, height: 20) + Text(host.description) + .foregroundStyle(.blue) + } } + } label: { + Image(systemName: "plus.circle.fill") + .symbolRenderingMode(.multicolor) + Text("Add") + .foregroundStyle(.green) } - } label: { - Image(systemName: "plus.circle.fill") - .symbolRenderingMode(.multicolor) - Text("Add") - .foregroundStyle(.green) } } diff --git a/SwiftTerm b/SwiftTerm index cdace6f..3ed94f8 160000 --- a/SwiftTerm +++ b/SwiftTerm @@ -1 +1 @@ -Subproject commit cdace6f038967c93f31a2bfe9107f96818c4ec17 +Subproject commit 3ed94f81172c3df013444f39668bd857f8dccfb6