From 78ee268aa21d118e728d0051edc74cca092e329a Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Fri, 7 Mar 2025 09:45:18 -0800 Subject: [PATCH] hide open in vscode and host multiplayer in time machine (#10412) --- webapp/src/app.tsx | 2 +- webapp/src/sidepanel.tsx | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index 4d9eb434f736..b2293b1a9593 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -5440,7 +5440,7 @@ export class ProjectView showSerialButtons={useSerialEditor} showFileList={showFileList} showFullscreenButton={!isHeadless} - showHostMultiplayerGameButton={isMultiplayerSupported && isMultiplayerGame} + isMultiplayerGame={isMultiplayerSupported && isMultiplayerGame} collapseEditorTools={this.state.collapseEditorTools} simSerialActive={this.state.simSerialActive} devSerialActive={this.state.deviceSerialActive} diff --git a/webapp/src/sidepanel.tsx b/webapp/src/sidepanel.tsx index b828d3e01358..8c22a506b8a1 100644 --- a/webapp/src/sidepanel.tsx +++ b/webapp/src/sidepanel.tsx @@ -29,7 +29,7 @@ interface SidepanelProps extends ISettingsProps { showSerialButtons?: boolean; showFileList?: boolean; showFullscreenButton?: boolean; - showHostMultiplayerGameButton?: boolean; + isMultiplayerGame?: boolean; collapseEditorTools?: boolean; simSerialActive?: boolean; deviceSerialActive?: boolean; @@ -197,12 +197,17 @@ export class Sidepanel extends data.Component { } renderCore() { - const { parent, inHome, showKeymap, showSerialButtons, showFileList, showFullscreenButton, showHostMultiplayerGameButton, + const { parent, inHome, showKeymap, showSerialButtons, showFileList, showFullscreenButton, isMultiplayerGame, collapseEditorTools, simSerialActive, deviceSerialActive, tutorialOptions, handleHardwareDebugClick, onTutorialStepChange, onTutorialComplete } = this.props; const hasSimulator = !pxt.appTarget.simulator?.headless; - const showOpenInVscodeButton = parent.isJavaScriptActive() && pxt.appTarget?.appTheme?.showOpenInVscode; + const showOpenInVscodeButton = parent.isJavaScriptActive() + && pxt.appTarget?.appTheme?.showOpenInVscode + && !pxt.shell.isTimeMachineEmbed(); + + const showHostMultiplayerGameButton = isMultiplayerGame + && !pxt.shell.isTimeMachineEmbed(); const simContainerClassName = classList( "simulator-container",