Skip to content

Commit dcf4049

Browse files
committed
Show toast for dangerous config upon selection in native client
1 parent a96af29 commit dcf4049

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

OpenBullet2.Native/Views/Pages/Configs.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,14 @@ private void EditConfig()
232232
}
233233

234234
vm.SelectedConfig = HoveredItem;
235+
236+
if (obSettingsService.Settings.GeneralSettings.WarnDangerousConfig
237+
&& HoveredItem.Config.HasCSharpCode())
238+
{
239+
Alert.ToastWarning("Potentially dangerous config", "The config you selected might have some C# code in it" +
240+
" (or blocks that call external programs). Do not run it unless you trust the source.");
241+
}
242+
235243
debuggerViewModel.ClearLog();
236244
NavigateToConfigSection();
237245
}

0 commit comments

Comments
 (0)