Skip to content

Commit

Permalink
hide download and sim screenshot in time machine
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Feb 10, 2025
1 parent d3b668f commit 011ae07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions webapp/src/editortoolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ export class EditorToolbar extends data.Component<ISettingsProps, EditorToolbarS

const targetTheme = pxt.appTarget.appTheme;
const isController = pxt.shell.isControllerMode();
const isTimeMachineEmbed = pxt.shell.isTimeMachineEmbed();
const readOnly = pxt.shell.isReadOnly();
const tutorial = tutorialOptions ? tutorialOptions.tutorial : false;
const simOpts = pxt.appTarget.simulator;
Expand Down Expand Up @@ -425,10 +426,10 @@ export class EditorToolbar extends data.Component<ISettingsProps, EditorToolbarS
</div>
</div>}
{/* TODO clean this; make it just getCompileButton, and set the buttons fontsize to 0 / the icon itself back to normal to just hide text */}
{!headless && <div className="ui item portrait hide">
{!headless && !isTimeMachineEmbed && <div className="ui item portrait hide">
{compileBtn && this.getCompileButton(computer)}
</div>}
{!headless && <div className="ui portrait only">
{!headless && !isTimeMachineEmbed && <div className="ui portrait only">
{compileBtn && this.getCompileButton(mobile)}
</div>}
</div>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/simtoolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class SimulatorToolbar extends data.Component<SimulatorProps, {}> {
const fullscreen = run && !simOpts.hideFullscreen && !sandbox;
const audio = run && targetTheme.hasAudio;
const isHeadless = simOpts.headless;
const screenshot = !!targetTheme.simScreenshot;
const screenshot = !!targetTheme.simScreenshot && !pxt.shell.isTimeMachineEmbed();
const screenshotClass = !!parentState.screenshoting ? "loading" : "";
const debugBtnEnabled = !isStarting && !isSimulatorPending && inCodeEditor;
const runControlsEnabled = !debugging && !isStarting && !isSimulatorPending;
Expand Down

0 comments on commit 011ae07

Please sign in to comment.