Skip to content

Commit

Permalink
Don't display play/pause in mobile reader mode
Browse files Browse the repository at this point in the history
  • Loading branch information
robsimmons committed Nov 15, 2023
1 parent f8f3101 commit fe301ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Program.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default function Program({ load, run, pause, setSolution, session }: Prop
title="View code"
onClick={(event) => {
event.preventDefault();
pause();
document.getElementById('session')!.className = 'mobile-view-editor';
}}
>
Expand All @@ -64,12 +65,12 @@ export default function Program({ load, run, pause, setSolution, session }: Prop
</button>
)}
{session.status === 'paused' && (
<button title="Search for more solutions" onClick={() => run()}>
<button title="Search for more solutions" className="control" onClick={() => run()}>
<PlayIcon width={ICON_SIZE} height={ICON_SIZE} /> resume
</button>
)}
{session.status === 'running' && (
<button title="Pause searching for solutions" onClick={() => pause()}>
<button title="Pause searching for solutions" className="control" onClick={() => pause()}>
<PauseIcon width={ICON_SIZE} height={ICON_SIZE} /> pause
</button>
)}
Expand Down
4 changes: 4 additions & 0 deletions src/dusa.css
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ div#codemirror-root .cm-scroller {
display: flex;
}

.mobile-view-editor #explorer-header .control {
display: none;
}

#explorer-header #explorer-status .extended-status {
display: none;
}
Expand Down

0 comments on commit fe301ae

Please sign in to comment.