feat: update OpenSky API integration and improve flight tracking

- 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.
This commit is contained in:
Kewonit
2026-02-14 14:13:20 +05:30
parent 08be8e1267
commit 4431c84ace
13 changed files with 550 additions and 77 deletions

View File

@ -0,0 +1,25 @@
"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 };