Skip to content

Commit

Permalink
macOS: disable changing removable drive when suspended
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Nov 26, 2020
1 parent 4cec2ca commit 9a0c5c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Platform/Shared/VMRemovableDrivesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ struct VMRemovableDrivesView: View {
Text(sessionConfig.sharedDirectoryPath ?? "").truncationMode(.head)
Button(action: clearShareDirectory, label: {
Text("Clear")
})
}).disabled(vm.viewState.suspended)
Button(action: { shareDirectoryFileImportPresented.toggle() }, label: {
Text("Browse")
})
}).disabled(vm.viewState.suspended)
}.fileImporter(isPresented: $shareDirectoryFileImportPresented, allowedContentTypes: [.folder], onCompletion: selectShareDirectory)
}
ForEach(vm.drives) { drive in
Expand All @@ -62,13 +62,13 @@ struct VMRemovableDrivesView: View {
.truncationMode(.head)
Button(action: { clearRemovableImage(forDrive: drive) }, label: {
Text("Clear")
})
}).disabled(vm.viewState.suspended)
Button(action: {
currentDrive = drive
diskImageFileImportPresented.toggle()
}, label: {
Text("Browse")
})
}).disabled(vm.viewState.suspended)
}
}
}.fileImporter(isPresented: $diskImageFileImportPresented, allowedContentTypes: [.data]) { result in
Expand Down

0 comments on commit 9a0c5c2

Please sign in to comment.