mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-08 19:40:01 +02:00
- Add master toggle to enable/disable Python scripts feature entirely (IsPythonScriptsEnabled in settings model, ViewModel, and runtime) - Button shows 'Load scripts' initially, changes to 'Refresh scripts' after first load - Edit dialog 'Apply changes' button is greyed out until a field changes (tracks initial snapshot vs current values for all fields) - Runtime BuildPythonScriptFormats respects IsPythonScriptsEnabled Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
30 lines
988 B
C#
30 lines
988 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System.Collections.Generic;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library;
|
|
|
|
public sealed class AdvancedPastePythonScriptSettings
|
|
{
|
|
[JsonPropertyName("isEnabled")]
|
|
public bool IsEnabled { get; set; }
|
|
|
|
[JsonPropertyName("scriptsFolder")]
|
|
public string ScriptsFolder { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("pythonExecutablePath")]
|
|
public string PythonExecutablePath { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("timeoutSeconds")]
|
|
public int TimeoutSeconds { get; set; } = 30;
|
|
|
|
[JsonPropertyName("value")]
|
|
public List<AdvancedPastePythonScriptAction> Value { get; set; } = [];
|
|
|
|
[JsonPropertyName("trustedScriptHashes")]
|
|
public Dictionary<string, string> TrustedScriptHashes { get; set; } = [];
|
|
}
|