From 74b81877a969a0c1d677ef45b144289ff0e6eec8 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Sun, 6 Jul 2025 19:44:25 +0100 Subject: [PATCH] moved .toolbar to contentview to fix the 4x plus button --- ShhShell/Views/ContentView.swift | 13 +++++++++++++ ShhShell/Views/Hosts/HostsView.swift | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ShhShell/Views/ContentView.swift b/ShhShell/Views/ContentView.swift index 3da16c7..c5846b9 100644 --- a/ShhShell/Views/ContentView.swift +++ b/ShhShell/Views/ContentView.swift @@ -57,6 +57,19 @@ struct ContentView: View { } .scrollContentBackground(.hidden) } + .toolbar { + ToolbarItem(placement: .confirmationAction) { + NavigationLink { + ConnectionView( + handler: SSHHandler(host: Host.blank, keyManager: keyManager), + hostsManager: hostsManager, + keyManager: keyManager + ) + } label: { + Label("Add", systemImage: "plus") + } + } + } } } } diff --git a/ShhShell/Views/Hosts/HostsView.swift b/ShhShell/Views/Hosts/HostsView.swift index 8dd035f..6c2c49a 100644 --- a/ShhShell/Views/Hosts/HostsView.swift +++ b/ShhShell/Views/Hosts/HostsView.swift @@ -53,19 +53,6 @@ struct HostsView: View { } .transition(.opacity) .navigationTitle("ShhShell") - .toolbar { - ToolbarItem(placement: .confirmationAction) { - NavigationLink { - ConnectionView( - handler: SSHHandler(host: Host.blank, keyManager: keyManager), - hostsManager: hostsManager, - keyManager: keyManager - ) - } label: { - Label("Add", systemImage: "plus") - } - } - } } }