Skip to content

Commit 0bc2f9c

Browse files
authored
Merge pull request #7609 from sagemathinc/jupyter-tweak-run-duration
frontend/jupyter/cell-bar: show dot when queued to run, instead of time
2 parents 2aefa2c + 322e30e commit 0bc2f9c

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

src/packages/frontend/jupyter/cell-output-time.tsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
import { Tooltip } from "antd";
77

8-
import { TimeAgo } from "@cocalc/frontend/components";
8+
import { TimeAgo, Icon } from "@cocalc/frontend/components";
9+
import { COLORS } from "@cocalc/util/theme";
910

1011
interface CellTimingProps {
1112
start?: number;
@@ -33,11 +34,24 @@ export default function CellTiming({ start, end }: CellTimingProps) {
3334
<span>{secondsDisp}</span>
3435
</Tooltip>
3536
);
37+
} else {
38+
return (
39+
<Tooltip
40+
title={
41+
<>
42+
This cell was evaluted <TimeAgo date={new Date(start)} /> and has
43+
not finished yet.
44+
</>
45+
}
46+
>
47+
<Icon
48+
name="plus-circle-filled"
49+
style={{
50+
color: COLORS.GRAY_M,
51+
animation: "loadingCircle 3s infinite linear",
52+
}}
53+
/>
54+
</Tooltip>
55+
);
3656
}
37-
38-
return (
39-
<Tooltip title={"When code started running"}>
40-
<TimeAgo date={new Date(start)} />
41-
</Tooltip>
42-
);
4357
}

0 commit comments

Comments
 (0)