- Increased max duration for flight data requests from 10 to 30 seconds. - Adjusted fetch timeouts and cache TTL to enhance performance. - Implemented snapping of bounding box coordinates to a grid for better cache sharing. - Enhanced flight data fetching logic to adapt polling intervals based on remaining API credits. - Introduced a new adaptive polling mechanism with different tiers based on credit usage. - Updated flight layers animation duration for smoother transitions. - Added a new slider component for orbit speed control in the UI. - Refactored flight card positioning logic to ensure it remains within viewport bounds. - Improved control panel layout for better mobile usability. - Adjusted default orbit speed settings for a more user-friendly experience.
26 lines
1002 B
TypeScript
26 lines
1002 B
TypeScript
"use client";
|
|
|
|
import * as React from "react";
|
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
|
|
type SliderProps = React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>;
|
|
|
|
const Slider = React.forwardRef<
|
|
React.ComponentRef<typeof SliderPrimitive.Root>,
|
|
SliderProps
|
|
>(({ className = "", ...props }, ref) => (
|
|
<SliderPrimitive.Root
|
|
ref={ref}
|
|
className={`relative flex w-full touch-none select-none items-center ${className}`}
|
|
{...props}
|
|
>
|
|
<SliderPrimitive.Track className="relative h-1 w-full grow overflow-hidden rounded-full bg-white/8">
|
|
<SliderPrimitive.Range className="absolute h-full bg-white/30" />
|
|
</SliderPrimitive.Track>
|
|
<SliderPrimitive.Thumb className="block h-3.5 w-3.5 rounded-full bg-white shadow-sm shadow-black/40 ring-1 ring-white/20 transition-colors hover:bg-white/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40" />
|
|
</SliderPrimitive.Root>
|
|
));
|
|
Slider.displayName = "Slider";
|
|
|
|
export { Slider };
|