File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,8 @@ struct ApplicationSettingsView: View {
162162 @AppStorage ( " NoQuitConfirmation " ) var isNoQuitConfirmation = false
163163 @AppStorage ( " NoUsbPrompt " ) var isNoUsbPrompt = false
164164
165+ @State private var isConfirmResetAutoConnect = false
166+
165167 var body : some View {
166168 Form {
167169 Toggle ( isOn: $isKeepRunningAfterLastWindowClosed, label: {
@@ -191,6 +193,14 @@ struct ApplicationSettingsView: View {
191193 Toggle ( isOn: $isNoUsbPrompt, label: {
192194 Text ( " Do not show prompt when USB device is plugged in " )
193195 } )
196+ Button ( " Reset auto connect devices… " ) {
197+ isConfirmResetAutoConnect. toggle ( )
198+ } . help ( " Clears all saved USB devices. " )
199+ . alert ( isPresented: $isConfirmResetAutoConnect) {
200+ Alert ( title: Text ( " Do you wish to reset all saved USB devices? " ) , primaryButton: . cancel( ) , secondaryButton: . destructive( Text ( " Reset " ) ) {
201+ UTMUSBManager . shared. usbDevices. removeAll ( )
202+ } )
203+ }
194204 }
195205 }
196206 }
You can’t perform that action at this time.
0 commit comments