-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Implement a modal dialog that warns the user about potential risks when enabling a Python script for the first time or re-enabling it. This forces a deliberate confirmation step.
- Create a new
ActivationWarningModal.ts
component extendingModal
. - Modal should display a clear, translated warning message (using
t()
) about execution risks (file access, network, etc.) and link to the security section in the README. - Modal should have a prominent "Activate Anyway" button (text via
t()
) and a way to cancel (e.g., close button, Esc). - Modify
PythonBridgeSettingTab.ts
:- In the
onChange
handler for the "Script Enabled" toggle:- If toggling from
false
totrue
, prevent immediate state change. - Instantiate and open
ActivationWarningModal
. - Pass a callback function to the modal.
- The callback (executed only on "Activate Anyway" click) should set
activationStatus[relativePath] = true
, save settings, and refresh the UI (this.display()
). - If the modal is cancelled, ensure the toggle visually remains/returns to
false
.
- If toggling from
- If toggling from
true
tofalse
, update the setting directly as before.
- In the
dataserver
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request