Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Milen Pivchev <[email protected]>
  • Loading branch information
mpivchev committed May 28, 2024
1 parent 768970f commit e6e9734
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions iOSClient/Login/NCLoginPoll.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,26 @@ struct NCLoginPoll: View {
var body: some View {
VStack {
Text("Please continue in your browser")
.foregroundStyle(.white)

HStack {
Button("Cancel") {
dismiss()
}
.disabled(loginManager.isLoading || cancelButtonDisabled)
.buttonStyle(.bordered)
.tint(.white)

Button("Retry") {
loginManager.openLoginInBrowser()
}
.buttonStyle(.borderedProminent)
.foregroundStyle(Color(NCBrandColor.shared.customer))
.tint(.white)
}
.padding()
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.onChange(of: loginManager.pollFinished) { value in
if value {
let window = UIApplication.shared.firstWindow
Expand All @@ -56,10 +61,11 @@ struct NCLoginPoll: View {
}
}
}
.onAppear {
loginManager.configure(loginFlowV2Token: loginFlowV2Token, loginFlowV2Endpoint: loginFlowV2Endpoint, loginFlowV2Login: loginFlowV2Login)
loginManager.openLoginInBrowser()
}
.background(Color(NCBrandColor.shared.customer))
// .onAppear {
// loginManager.configure(loginFlowV2Token: loginFlowV2Token, loginFlowV2Endpoint: loginFlowV2Endpoint, loginFlowV2Login: loginFlowV2Login)
// loginManager.openLoginInBrowser()
// }
.interactiveDismissDisabled()
}
}
Expand Down

0 comments on commit e6e9734

Please sign in to comment.