From 022c548290768cd4444917bc84a67bf6004b5866 Mon Sep 17 00:00:00 2001 From: Ken Chung Date: Tue, 3 May 2022 23:06:54 +0800 Subject: [PATCH] Remove unsupported features when using remote --- CodeApp/UI/main/tabBar.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CodeApp/UI/main/tabBar.swift b/CodeApp/UI/main/tabBar.swift index 66e15270..694c2d65 100644 --- a/CodeApp/UI/main/tabBar.swift +++ b/CodeApp/UI/main/tabBar.swift @@ -46,7 +46,7 @@ struct tabBar: View { .onTapGesture { App.compileManager.stopRunning() } - } else { + } else if !App.workSpaceStorage.remoteConnected { Button(action: { if !App.currentURL().contains("index{default}.md{code-preview}") { if App.currentURL().components(separatedBy: "/").last?.components( @@ -155,8 +155,10 @@ struct tabBar: View { Button(action: { App.closeAllEditors() }) { Label("Close All", systemImage: "xmark") } - Button(action: { self.showSafari.toggle() }) { - Label("Preview in Safari", systemImage: "safari") + if !App.workSpaceStorage.remoteConnected { + Button(action: { self.showSafari.toggle() }) { + Label("Preview in Safari", systemImage: "safari") + } } } Divider()