From 8f760d7953c40ba55d5a5ca02731aefd7b2cfc47 Mon Sep 17 00:00:00 2001 From: loucass003 Date: Wed, 14 Oct 2026 18:19:44 +0200 Subject: [PATCH] Move js files back to hook --- gui/app/src/components/commons/charts/TimeSeriesChart.tsx | 6 +++--- gui/app/src/components/tracker/DongleTelemetry.tsx | 2 +- gui/app/src/components/tracker/GapEventsChart.tsx | 4 ++-- gui/app/src/components/tracker/RssiLossChart.tsx | 2 +- gui/app/src/components/tracker/TelemetryTooltip.tsx | 2 +- gui/app/src/components/tracker/TrackerImuGraphs.tsx | 4 ++-- .../{components/commons/charts => hooks}/chart-drawing.ts | 0 gui/app/src/hooks/dongle-telemetry-feed.ts | 2 +- gui/app/src/hooks/telemetry-history.ts | 2 +- .../src/{components/commons/charts => hooks}/time-axis.ts | 0 .../src/{components/commons/charts => hooks}/time-series.ts | 0 gui/app/src/hooks/tracker-imu-telemetry.ts | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) rename gui/app/src/{components/commons/charts => hooks}/chart-drawing.ts (100%) rename gui/app/src/{components/commons/charts => hooks}/time-axis.ts (100%) rename gui/app/src/{components/commons/charts => hooks}/time-series.ts (100%) diff --git a/gui/app/src/components/commons/charts/TimeSeriesChart.tsx b/gui/app/src/components/commons/charts/TimeSeriesChart.tsx index 2325bd016..fa003221d 100644 --- a/gui/app/src/components/commons/charts/TimeSeriesChart.tsx +++ b/gui/app/src/components/commons/charts/TimeSeriesChart.tsx @@ -4,7 +4,7 @@ import { drawDashedPath, drawLine, drawSeries, -} from './chart-drawing'; +} from '@/hooks/chart-drawing'; import { ChartPopover, TOOLTIP_OFFSET } from './ChartPopover'; import { flipTooltipLeft, @@ -12,8 +12,8 @@ import { relativeTimeTick, screenXToTimeSec, timeSecToScreenX, -} from './time-axis'; -import { ChartSource } from './time-series'; +} from '@/hooks/time-axis'; +import { ChartSource } from '@/hooks/time-series'; const DEFAULT_LEFT_AXIS_WIDTH = 48; const RIGHT_AXIS_WIDTH = 40; diff --git a/gui/app/src/components/tracker/DongleTelemetry.tsx b/gui/app/src/components/tracker/DongleTelemetry.tsx index f0f91bbcd..c1a81f4b6 100644 --- a/gui/app/src/components/tracker/DongleTelemetry.tsx +++ b/gui/app/src/components/tracker/DongleTelemetry.tsx @@ -17,7 +17,7 @@ import { defaultDongleTelemetryConfig, useConfig } from '@/hooks/config'; import { useTimeAxisTicks, WINDOW_OPTIONS, -} from '@/components/commons/charts/time-axis'; +} from '@/hooks/time-axis'; import { GapEvent } from '@/hooks/telemetry-history'; diff --git a/gui/app/src/components/tracker/GapEventsChart.tsx b/gui/app/src/components/tracker/GapEventsChart.tsx index d034507a8..f23f6409b 100644 --- a/gui/app/src/components/tracker/GapEventsChart.tsx +++ b/gui/app/src/components/tracker/GapEventsChart.tsx @@ -2,14 +2,14 @@ import classNames from 'classnames'; import { memo, useEffect, useRef, useState } from 'react'; import { Typography } from '@/components/commons/Typography'; import { GapEvent } from '@/hooks/telemetry-history'; -import { ChartRow } from '@/components/commons/charts/time-series'; +import { ChartRow } from '@/hooks/time-series'; import { TOOLTIP_OFFSET } from '@/components/commons/charts/ChartPopover'; import { flipTooltipLeft, relativeTimeTick, screenXToTimeSec, timeSecToScreenX, -} from '@/components/commons/charts/time-axis'; +} from '@/hooks/time-axis'; import { getGapColor, isGapEventActive, diff --git a/gui/app/src/components/tracker/RssiLossChart.tsx b/gui/app/src/components/tracker/RssiLossChart.tsx index 98ead1b19..943ad6287 100644 --- a/gui/app/src/components/tracker/RssiLossChart.tsx +++ b/gui/app/src/components/tracker/RssiLossChart.tsx @@ -1,6 +1,6 @@ import { memo, useMemo } from 'react'; import { GapEvent } from '@/hooks/telemetry-history'; -import { ChartRow, rowsSource } from '@/components/commons/charts/time-series'; +import { ChartRow, rowsSource } from '@/hooks/time-series'; import { ChartAxis, ChartBand, diff --git a/gui/app/src/components/tracker/TelemetryTooltip.tsx b/gui/app/src/components/tracker/TelemetryTooltip.tsx index 72c329ab9..dc58692e5 100644 --- a/gui/app/src/components/tracker/TelemetryTooltip.tsx +++ b/gui/app/src/components/tracker/TelemetryTooltip.tsx @@ -5,7 +5,7 @@ import { ChartRow, nearestIndex, rowsSource, -} from '@/components/commons/charts/time-series'; +} from '@/hooks/time-series'; import { getGapTextColor, isGapEventActive, diff --git a/gui/app/src/components/tracker/TrackerImuGraphs.tsx b/gui/app/src/components/tracker/TrackerImuGraphs.tsx index 30344c7bc..4bf981990 100644 --- a/gui/app/src/components/tracker/TrackerImuGraphs.tsx +++ b/gui/app/src/components/tracker/TrackerImuGraphs.tsx @@ -13,7 +13,7 @@ import { import { useTimeAxisTicks, WINDOW_OPTIONS, -} from '@/components/commons/charts/time-axis'; +} from '@/hooks/time-axis'; import { ChartSource, downsampleMinMax, @@ -22,7 +22,7 @@ import { rowsSource, sourceNow, useLiveFrame, -} from '@/components/commons/charts/time-series'; +} from '@/hooks/time-series'; import { defaultTrackerGraphsConfig, useConfig } from '@/hooks/config'; import { IMU_HISTORY_SEC, diff --git a/gui/app/src/components/commons/charts/chart-drawing.ts b/gui/app/src/hooks/chart-drawing.ts similarity index 100% rename from gui/app/src/components/commons/charts/chart-drawing.ts rename to gui/app/src/hooks/chart-drawing.ts diff --git a/gui/app/src/hooks/dongle-telemetry-feed.ts b/gui/app/src/hooks/dongle-telemetry-feed.ts index 7c19d4c61..4d039c9d7 100644 --- a/gui/app/src/hooks/dongle-telemetry-feed.ts +++ b/gui/app/src/hooks/dongle-telemetry-feed.ts @@ -7,7 +7,7 @@ import { rowsSource, sourceNow, useLiveFrame, -} from '@/components/commons/charts/time-series'; +} from './time-series'; export interface TrackerDisplayStat { rssi: number | null; diff --git a/gui/app/src/hooks/telemetry-history.ts b/gui/app/src/hooks/telemetry-history.ts index 2123de8bb..602e00913 100644 --- a/gui/app/src/hooks/telemetry-history.ts +++ b/gui/app/src/hooks/telemetry-history.ts @@ -14,7 +14,7 @@ import { createSourceClock, observeSourceTime, SourceClock, -} from '@/components/commons/charts/time-series'; +} from './time-series'; export interface GapEvent { t: number; diff --git a/gui/app/src/components/commons/charts/time-axis.ts b/gui/app/src/hooks/time-axis.ts similarity index 100% rename from gui/app/src/components/commons/charts/time-axis.ts rename to gui/app/src/hooks/time-axis.ts diff --git a/gui/app/src/components/commons/charts/time-series.ts b/gui/app/src/hooks/time-series.ts similarity index 100% rename from gui/app/src/components/commons/charts/time-series.ts rename to gui/app/src/hooks/time-series.ts diff --git a/gui/app/src/hooks/tracker-imu-telemetry.ts b/gui/app/src/hooks/tracker-imu-telemetry.ts index 423592661..e93a53a9f 100644 --- a/gui/app/src/hooks/tracker-imu-telemetry.ts +++ b/gui/app/src/hooks/tracker-imu-telemetry.ts @@ -16,7 +16,7 @@ import { observeSourceTime, pushColumnRing, SourceClock, -} from '@/components/commons/charts/time-series'; +} from './time-series'; import { useWebsocketAPI } from './websocket-api'; export const IMU_KEYS = [