diff --git a/BeeSwift.xcodeproj/project.pbxproj b/BeeSwift.xcodeproj/project.pbxproj index bd3591ca..5448af84 100644 --- a/BeeSwift.xcodeproj/project.pbxproj +++ b/BeeSwift.xcodeproj/project.pbxproj @@ -7,8 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 9B65F2322CFA6427009674A7 /* DeeplinkGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B65F2312CFA6418009674A7 /* DeeplinkGenerator.swift */; }; 9B2488422D030E5100E610E0 /* SignInView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B2488412D030E5100E610E0 /* SignInView.swift */; }; + 9B65F2322CFA6427009674A7 /* DeeplinkGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B65F2312CFA6418009674A7 /* DeeplinkGenerator.swift */; }; + 9B6F0CE82D2011F00077D37D /* SignInButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6F0CE72D2011F00077D37D /* SignInButton.swift */; }; 9B8CA57D24B120CA009C86C2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9B8CA57C24B120CA009C86C2 /* LaunchScreen.storyboard */; }; A10D4E931B07948500A72D29 /* DatapointsTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A10D4E921B07948500A72D29 /* DatapointsTableView.swift */; }; A10DC2DF207BFCBA00FB7B3A /* RemoveHKMetricViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A10DC2DE207BFCBA00FB7B3A /* RemoveHKMetricViewController.swift */; }; @@ -218,8 +219,9 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 9B65F2312CFA6418009674A7 /* DeeplinkGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeeplinkGenerator.swift; sourceTree = ""; }; 9B2488412D030E5100E610E0 /* SignInView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInView.swift; sourceTree = ""; }; + 9B65F2312CFA6418009674A7 /* DeeplinkGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeeplinkGenerator.swift; sourceTree = ""; }; + 9B6F0CE72D2011F00077D37D /* SignInButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInButton.swift; sourceTree = ""; }; 9B8CA57C24B120CA009C86C2 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; A10D4E921B07948500A72D29 /* DatapointsTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatapointsTableView.swift; sourceTree = ""; }; A10DC2DE207BFCBA00FB7B3A /* RemoveHKMetricViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoveHKMetricViewController.swift; sourceTree = ""; }; @@ -478,6 +480,7 @@ A196CB161AE4142E00B90A3E /* BeeSwift */ = { isa = PBXGroup; children = ( + 9B6F0CE72D2011F00077D37D /* SignInButton.swift */, 9B65F2312CFA6418009674A7 /* DeeplinkGenerator.swift */, A1E618E51E79E01900D8ED93 /* Cells */, E46071002B43DA7100305DB4 /* Gallery */, @@ -1017,6 +1020,7 @@ E43BEA842A036A9C00FC3A38 /* LogReader.swift in Sources */, 9B65F2322CFA6427009674A7 /* DeeplinkGenerator.swift in Sources */, A196CB1F1AE4142F00B90A3E /* GalleryViewController.swift in Sources */, + 9B6F0CE82D2011F00077D37D /* SignInButton.swift in Sources */, A1BE73AA1E8B45BF00DEC4DB /* ChooseHKMetricViewController.swift in Sources */, A149147B1BE79FD50060600A /* EditNotificationsViewController.swift in Sources */, E4015D9F2D10DC4D00F58D94 /* SceneDelegate.swift in Sources */, diff --git a/BeeSwift/SignInButton.swift b/BeeSwift/SignInButton.swift index 195aa83c..532dc1b4 100644 --- a/BeeSwift/SignInButton.swift +++ b/BeeSwift/SignInButton.swift @@ -1,3 +1,5 @@ +import SwiftUI + struct SignInButton: View { @Environment(\.colorScheme) private var colorScheme let action: () -> Void diff --git a/BeeSwift/SignInView.swift b/BeeSwift/SignInView.swift index 422badf8..34a065c7 100644 --- a/BeeSwift/SignInView.swift +++ b/BeeSwift/SignInView.swift @@ -40,16 +40,8 @@ struct SignInView: View { .textInputAutocapitalization(.never) .submitLabel(.done) - Button(action: signIn) { - Text("Sign In") - .font(.system(size: 20)) - .foregroundColor(.white) - .frame(maxWidth: .infinity) - .frame(height: 44) - } - .background(Color.gray) - .cornerRadius(8) - .disabled(viewModel.isLoading) + SignInButton(action: signIn, + isDisabled: viewModel.isLoading) } .frame(maxWidth: .infinity) .padding(.horizontal, 40)