diff --git a/pxtlib/main.ts b/pxtlib/main.ts index ca948bc25d43..88aaec191f27 100644 --- a/pxtlib/main.ts +++ b/pxtlib/main.ts @@ -395,6 +395,7 @@ namespace pxt { teachertoolUrl?: string; // "/beta---eval" isStatic?: boolean; verprefix?: string; // "v1" + ocvEnabled: boolean; } export function localWebConfig() { @@ -418,7 +419,8 @@ namespace pxt { simUrl: "/sim/simulator.html", simserviceworkerUrl: "/simulatorserviceworker.js", simworkerconfigUrl: "/sim/workerConfig.js", - partsUrl: "/sim/siminstructions.html" + partsUrl: "/sim/siminstructions.html", + ocvEnabled: true, } return r } diff --git a/tests/blocks-test/blocksrunner.ts b/tests/blocks-test/blocksrunner.ts index 590852166cdb..8cea918dbb55 100644 --- a/tests/blocks-test/blocksrunner.ts +++ b/tests/blocks-test/blocksrunner.ts @@ -43,6 +43,7 @@ pxt.webConfig = { docsUrl: undefined, multiUrl: undefined, isStatic: undefined, + ocvEnabled: undefined }; class BlocklyCompilerTestHost implements pxt.Host { diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index 772070ef0030..47dc22915022 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -5283,7 +5283,7 @@ export class ProjectView const hideMenuBar = targetTheme.hideMenuBar || hideTutorialIteration || (isTabTutorial && pxt.appTarget.appTheme.embeddedTutorial) || pxt.shell.isTimeMachineEmbed(); const isHeadless = simOpts && simOpts.headless; const selectLanguage = targetTheme.selectLanguage; - const feedbackEnabled = targetTheme.feedbackEnabled && targetTheme.ocvFrameUrl && targetTheme.ocvAppId; + const feedbackEnabled = pxt.webConfig.ocvEnabled && targetTheme.feedbackEnabled && targetTheme.ocvFrameUrl && targetTheme.ocvAppId; const showEditorToolbar = inEditor && !hideEditorToolbar && this.editor.hasEditorToolbar(); const useSerialEditor = pxt.appTarget.serial && !!pxt.appTarget.serial.useEditor; const showSideDoc = sideDocs && this.state.sideDocsLoadUrl && !this.state.sideDocsCollapsed; diff --git a/webapp/src/container.tsx b/webapp/src/container.tsx index b26740452d70..31fac0fe10ea 100644 --- a/webapp/src/container.tsx +++ b/webapp/src/container.tsx @@ -321,7 +321,7 @@ export class SettingsMenu extends data.Component this.dropdown = ref}>