From 1e262e239aedbf315552da736641fab5a3326b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Fri, 6 Oct 2023 15:24:02 +0800 Subject: [PATCH] Fix add profile button removed by mistake --- ApplicationLibrary/Views/Profile/ProfileView.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ApplicationLibrary/Views/Profile/ProfileView.swift b/ApplicationLibrary/Views/Profile/ProfileView.swift index 283bf12..a70b42e 100644 --- a/ApplicationLibrary/Views/Profile/ProfileView.swift +++ b/ApplicationLibrary/Views/Profile/ProfileView.swift @@ -139,7 +139,17 @@ public struct ProfileView: View { // await doReload() // } } - #if os(iOS) + #if os(macOS) + .toolbar { + ToolbarItem { + Button { + openWindow(id: NewProfileView.windowID) + } label: { + Label("New Profile", systemImage: "plus.square.fill") + } + } + } + #elseif os(iOS) .toolbar { ToolbarItem(placement: .navigationBarTrailing) { EditButton().disabled(profileList.isEmpty)