Skip to content

Commit

Permalink
hide open in vscode and host multiplayer in time machine (#10412)
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll authored Mar 7, 2025
1 parent 3094ae4 commit 78ee268
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion webapp/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
11 changes: 8 additions & 3 deletions webapp/src/sidepanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface SidepanelProps extends ISettingsProps {
showSerialButtons?: boolean;
showFileList?: boolean;
showFullscreenButton?: boolean;
showHostMultiplayerGameButton?: boolean;
isMultiplayerGame?: boolean;
collapseEditorTools?: boolean;
simSerialActive?: boolean;
deviceSerialActive?: boolean;
Expand Down Expand Up @@ -197,12 +197,17 @@ export class Sidepanel extends data.Component<SidepanelProps, SidepanelState> {
}

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",
Expand Down

0 comments on commit 78ee268

Please sign in to comment.