diff --git a/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx b/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx index a8006a159..f5cc104f7 100644 --- a/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx +++ b/frontend/app/components/shared/DevTools/ConsoleRow/ConsoleRow.tsx @@ -65,7 +65,7 @@ function ConsoleRow(props: Props) { ))} - jump(log.time)} /> + jump(log.time)} /> ); } diff --git a/frontend/app/components/shared/DevTools/JumpButton/JumpButton.tsx b/frontend/app/components/shared/DevTools/JumpButton/JumpButton.tsx index 861a4dd4e..c0f876a1b 100644 --- a/frontend/app/components/shared/DevTools/JumpButton/JumpButton.tsx +++ b/frontend/app/components/shared/DevTools/JumpButton/JumpButton.tsx @@ -1,8 +1,10 @@ import React from 'react'; import { Icon, Tooltip } from 'UI'; +import { shortDurationFromMs } from "App/date"; interface Props { onClick: any; + time?: number; tooltip?: string; } function JumpButton(props: Props) { @@ -11,7 +13,7 @@ function JumpButton(props: Props) {
{ e.stopPropagation(); props.onClick(); @@ -20,6 +22,9 @@ function JumpButton(props: Props) { JUMP
+ {props.time ?
+ {shortDurationFromMs(props.time)} +
: null}
); diff --git a/frontend/app/components/shared/DevTools/StackEventRow/StackEventRow.tsx b/frontend/app/components/shared/DevTools/StackEventRow/StackEventRow.tsx index c415f3424..9984ad8f3 100644 --- a/frontend/app/components/shared/DevTools/StackEventRow/StackEventRow.tsx +++ b/frontend/app/components/shared/DevTools/StackEventRow/StackEventRow.tsx @@ -44,7 +44,7 @@ function StackEventRow(props: Props) {
{message}
- + ); } diff --git a/frontend/app/date.ts b/frontend/app/date.ts index a87d5785e..03e80f011 100644 --- a/frontend/app/date.ts +++ b/frontend/app/date.ts @@ -44,6 +44,12 @@ export function durationFromMsFormatted(ms: number): string { return durationFormatted(Duration.fromMillis(ms || 0)); } +export function shortDurationFromMs(ms: number): string { + const dur = Duration.fromMillis(ms) + + return dur.toFormat(`mm:ss`) +} + export function durationFromMs(ms: number, isFull?: boolean): string { const dur = Duration.fromMillis(ms)