Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: player skip buttons only ever showed right #15269

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export function SeekSkip({ direction }: { direction: 'forward' | 'backward' }):
const jumpTimeSeconds = altKeyHeld ? 1 : jumpTimeMs / 1000
const altKeyName = navigator.platform.includes('Mac') ? '⌥' : 'Alt'

const arrowSymbol = direction === 'forward' ? '→' : '←'
const arrowName = direction === 'forward' ? 'right' : 'left'

return (
<Tooltip
placement="top"
Expand All @@ -42,10 +45,18 @@ export function SeekSkip({ direction }: { direction: 'forward' | 'backward' }):
<div className="text-center">
{!altKeyHeld ? (
<>
{capitalizeFirstLetter(direction)} {jumpTimeSeconds}s (<kbd>→ right arrow</kbd>) <br />
{capitalizeFirstLetter(direction)} {jumpTimeSeconds}s (
<kbd>
{arrowSymbol} {arrowName} arrow
</kbd>
) <br />
</>
) : null}
{capitalizeFirstLetter(direction)} 1 frame ({ONE_FRAME_MS}ms) (<kbd>{altKeyName} + →</kbd>)
{capitalizeFirstLetter(direction)} 1 frame ({ONE_FRAME_MS}ms) (
<kbd>
{altKeyName} + {arrowSymbol}
</kbd>
)
</div>
}
>
Expand Down