Skip to content

Commit

Permalink
hide shortcuts for spectators
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Dec 2, 2024
1 parent 8a65108 commit 213d2c6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
55 changes: 31 additions & 24 deletions script/viewer/Analyse/Analyser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,30 +266,37 @@ export const Analyser = (props: AnalyseProps) => {
<h4>Keyboard Shortcuts</h4>
<table class="shortcuts">
<tbody>
<tr>
<td><kbd>.</kbd></td>
<td>Next tick</td>
</tr>
<tr>
<td><kbd>,</kbd></td>
<td>Previous tick</td>
</tr>
<tr>
<td><kbd></kbd></td>
<td>0.5s forward</td>
</tr>
<tr>
<td><kbd></kbd></td>
<td>0.5s backwards</td>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>G</kbd></td>
<td>Goto tick</td>
</tr>
<tr>
<td><kbd>Spacebar</kbd></td>
<td>Play/Pause</td>
</tr>
<Show when={!inShared}>
<tr>
<td><kbd>.</kbd></td>
<td>Next tick</td>
</tr>
<tr>
<td><kbd>,</kbd></td>
<td>Previous tick</td>
</tr>
<tr>
<td><kbd></kbd></td>
<td>0.5s forward</td>
</tr>
<tr>
<td><kbd></kbd></td>
<td>0.5s backwards</td>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>G</kbd></td>
<td>Goto tick</td>
</tr>
<tr>
<td><kbd>Spacebar</kbd></td>
<td>Play/Pause</td>
</tr>
</Show>
<Show when={inShared}>
<tr>
<td colspan={2}>Shortcuts no usable as spectator have been hidden</td>
</tr>
</Show>
<tr>
<td><kbd>?</kbd></td>
<td>This help menu</td>
Expand Down
4 changes: 4 additions & 0 deletions style/pages/viewer/Analyser.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ kbd {
overflow: auto;
max-height: 90%;
max-width: 90%;

&:focus-visible {
outline: none;
}
}

.modal-content input[type="text"] {
Expand Down

0 comments on commit 213d2c6

Please sign in to comment.