mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 04:20:30 +00:00
Disable default script when advanced options off (#223)
This commit is contained in:
parent
41b280f7c7
commit
aaacd75432
2 changed files with 15 additions and 5 deletions
|
|
@ -303,7 +303,10 @@ struct HomeView: View {
|
|||
startJITInBackground(with: selectedBundle)
|
||||
}
|
||||
}
|
||||
.pipify(isPresented: $isProcessing) {
|
||||
.pipify(isPresented: Binding(
|
||||
get: { useDefaultScript && isProcessing },
|
||||
set: { newValue in isProcessing = newValue }
|
||||
)) {
|
||||
RunJSViewPiP(model: $jsModel)
|
||||
}
|
||||
.sheet(isPresented: $scriptViewShow) {
|
||||
|
|
|
|||
|
|
@ -272,16 +272,23 @@ struct SettingsView: View {
|
|||
.foregroundColor(.primary)
|
||||
.padding(.bottom, 4)
|
||||
|
||||
Toggle("Run Default Script After Connecting", isOn: $useDefaultScript)
|
||||
.foregroundColor(.primary)
|
||||
.padding(.vertical, 6)
|
||||
|
||||
Toggle("Enable Advanced Options", isOn: $enableAdvancedOptions)
|
||||
.foregroundColor(.primary)
|
||||
.padding(.vertical, 6)
|
||||
|
||||
if enableAdvancedOptions {
|
||||
Toggle("Run Default Script After Connecting", isOn: $useDefaultScript)
|
||||
.foregroundColor(.primary)
|
||||
.padding(.vertical, 6)
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 20)
|
||||
.padding(.horizontal, 16)
|
||||
.onChange(of: enableAdvancedOptions) { _, newValue in
|
||||
if !newValue {
|
||||
useDefaultScript = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// About section
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue