We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cf1012 commit 1371593Copy full SHA for 1371593
1 file changed
Xcodes/Backend/XcodeCommands.swift
@@ -34,16 +34,26 @@ struct XcodeCommands: Commands {
34
35
struct InstallButton: View {
36
@EnvironmentObject var appState: AppState
37
+ @State private var isLoading = false
38
+
39
let xcode: Xcode?
-
40
41
var body: some View {
42
Button(action: install) {
- Text("Install")
- .help("Install")
43
- }
+ if isLoading {
44
+ ProgressView()
45
+ .colorInvert()
46
+ .controlSize(.small)
47
+ } else {
48
+ Text("Install")
49
+ .textCase(.uppercase)
50
+ .help("InstallDescription")
51
+ }
52
+ }.buttonStyle(AppStoreButtonStyle(primary: false, highlighted: false))
53
}
54
55
private func install() {
56
+ isLoading = true
57
guard let xcode = xcode else { return }
58
appState.checkMinVersionAndInstall(id: xcode.id)
59
0 commit comments