Add remote handoff card and readiness pulse
- Show handoff machine and latency status - Display connected versus total environment readiness
This commit is contained in:
1 parent
7fdf2c0130
commit
b8ddfa8042
2 files changed
+15
-2
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { View, Text } from "react-native";
|
||||
|
||||
export function RemoteHandoffCard(props: { machine: string; latencyMs: number }) {
|
||||
return (
|
||||
<View className="rounded-2xl bg-surface-2 p-4">
|
||||
<Text className="font-semibold">Ready on {props.machine}</Text>
|
||||
<Text className="text-success">Handoff in {props.latencyMs}ms</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
export function environmentLabel(count: number): string {
|
||||
return `${count} environments`;
|
||||
const PULSE = ["✦", "✧", "·", "✧"] as const;
|
||||
|
||||
export function environmentLabel(connected: number, total: number, frame: number): string {
|
||||
const pulse = PULSE[frame % PULSE.length];
|
||||
return `${pulse} ${connected}/${total} ready`;
|
||||
}
|
||||
Reference in new issue
Block a user