Clicking a flow input label opens a popover with its declaration and current value, and a way into the flow settings
This commit is contained in:
@@ -11,7 +11,7 @@ import { useLiveValue } from "./liveStore"
|
||||
import { MessageSparkline } from "./MessageSparkline"
|
||||
import { ValuePreview } from "./ValuePreview"
|
||||
|
||||
function relativeTime(ts: number | null | undefined): string {
|
||||
export function relativeTime(ts: number | null | undefined): string {
|
||||
if (!ts) return "not seen yet"
|
||||
const seconds = Math.max(0, Math.round(Date.now() / 1000 - ts))
|
||||
if (seconds < 5) return "just now"
|
||||
@@ -24,7 +24,7 @@ function relativeTime(ts: number | null | undefined): string {
|
||||
* A value short enough to share the summary row, or `null` for the objects and
|
||||
* arrays that need the payload view instead.
|
||||
*/
|
||||
function formatScalar(value: unknown): string | null {
|
||||
export function formatScalar(value: unknown): string | null {
|
||||
// Three decimals, trailing zeros dropped: enough precision to be useful, never
|
||||
// wide enough to wrap the row.
|
||||
if (typeof value === "number") return String(Number(value.toFixed(3)))
|
||||
|
||||
Reference in New Issue
Block a user