mirror of
https://github.com/insidegui/VirtualBuddy.git
synced 2026-12-02 14:29:27 +08:00
21 lines
613 B
Swift
21 lines
613 B
Swift
import SwiftUI
|
|
import VirtualCore
|
|
|
|
struct RestoreImageURLInputView: View {
|
|
@EnvironmentObject var viewModel: VMInstallationViewModel
|
|
|
|
@FocusState
|
|
private var focused: Bool
|
|
|
|
var body: some View {
|
|
TextField("URL", text: $viewModel.data.customInstallImageRemoteURL, onCommit: viewModel.next)
|
|
.textFieldStyle(.roundedBorder)
|
|
.controlSize(.large)
|
|
.focused($focused)
|
|
.onAppear { focused = true }
|
|
.onChange(of: viewModel.data.customInstallImageRemoteURL) { _ in
|
|
viewModel.validateCustomRemoteURL()
|
|
}
|
|
}
|
|
}
|