diff --git a/locales/en/out/constants.i18n.json b/locales/en/out/constants.i18n.json index bbbe28c7e..6e2f51010 100644 --- a/locales/en/out/constants.i18n.json +++ b/locales/en/out/constants.i18n.json @@ -1,5 +1,7 @@ { + "dialogResponses.agreeAndRun": "Agree and Run", "dialogResponses.acceptPrivacy": "Got it", + "dialogResponses.cancel": "Cancel", "dialogResponses.dontShowAgain": "Don't Show Again", "dialogResponses.exampleCode": "Example Code on GitHub", "dialogResponses.help": "I need help", @@ -27,5 +29,6 @@ "info.thirdPartyWebsite": "You will be redirect to adafruit.com, a website outside Microsoft. Read the privacy statement on Adafruit:", "info.welcomeOutputTab": "Welcome to the Adafruit Simulator output tab !\n\n", "label.webviewPanel": "Adafruit CPX", - "name": "Pacifica Simulator" -} + "name": "Pacifica Simulator", + "warning.agreeAndRun": "By selecting ‘Agree and Run’, you understand the extension executes Python code on your local computer, which may be a potential security risk." +} \ No newline at end of file diff --git a/src/constants.ts b/src/constants.ts index f99d75f38..8d87b8a1f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -114,7 +114,10 @@ export const CONSTANTS = { TUTORIALS: "https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express/circuit-playground-express-library" }, - NAME: localize("name", "Pacifica Simulator") + NAME: localize("name", "Pacifica Simulator"), + WARNING: { + ACCEPT_AND_RUN: localize("warning.agreeAndRun", "By selecting ‘Agree and Run’, you understand the extension executes Python code on your local computer, which may be a potential security risk."), + } }; // Need the different events we want to track and the name of it @@ -161,6 +164,12 @@ export enum WebviewMessages { // tslint:disable-next-line: no-namespace export namespace DialogResponses { + export const ACCEPT_AND_RUN: MessageItem = { + title: localize("dialogResponses.agreeAndRun", "Agree and Run") + }; + export const CANCEL: MessageItem = { + title: localize("dialogResponses.cancel", "Cancel") + } export const HELP: MessageItem = { title: localize("dialogResponses.help", "I need help") }; diff --git a/src/extension.ts b/src/extension.ts index a3de393b8..a9c93d876 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -23,6 +23,7 @@ let pythonExecutableName: string = "python"; let firstTimeClosed: boolean = true; let shouldShowNewProject: boolean = true; let shouldShowInvalidFileNamePopup: boolean = true; +let shouldShowRunCodePopup: boolean = true; function loadScript(context: vscode.ExtensionContext, scriptPath: string) { return `