Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
audio with FFmpeg before storing. Select the codec and bitrate below."
to reflect that MP3 and AAC outputs are both supported via the encoding
preset.
- Frontend `services/` directory grouped into `services/ws/` (`client.ts`,
`client.test.ts`, `adminClient.ts`) and `services/audio/` (`player.ts`,
`beep.ts`). All `@/services/*` imports across components and hooks have
been updated to the new paths. No runtime behaviour change.

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/scanner/BookmarksPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ vi.mock("@/app/api", () => ({
useToggleBookmarkMutation: () => mockToggleBookmarkMutation(),
}));

vi.mock("@/services/audioPlayer", () => ({
vi.mock("@/services/audio/player", () => ({
audioPlayer: {
play: vi.fn(),
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/scanner/BookmarksPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from "react";
import { useGetBookmarkCallsQuery, useToggleBookmarkMutation } from "@/app/api";
import { useAppSelector } from "@/app/store";
import { selectToken } from "@/app/slices/authSlice";
import { audioPlayer } from "@/services/audioPlayer";
import { audioPlayer } from "@/services/audio/player";
import { sanitizeDownloadFilename } from "@/services/downloadFilename";
import { ShareCallButton } from "@/components/scanner/ShareCallButton";
import { X, Play, Download, Star, ChevronDown } from "lucide-react";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/scanner/ControlToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Search,
} from "lucide-react";
import { useCallback } from "react";
import { playBeep } from "@/services/beepPlayer";
import { playBeep } from "@/services/audio/beep";
import type { AvoidEntry } from "@/types";

interface ControlToolbarProps {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/scanner/SearchPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
} from "@/app/slices/callsSlice";
import { useGetBookmarkIDsQuery, useToggleBookmarkMutation } from "@/app/api";
import { selectToken } from "@/app/slices/authSlice";
import { audioPlayer } from "@/services/audioPlayer";
import { audioPlayer } from "@/services/audio/player";
import { sanitizeDownloadFilename } from "@/services/downloadFilename";
import type { Call } from "@/types";

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useActiveUnit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect, useMemo } from "react";
import { audioPlayer } from "@/services/audioPlayer";
import { audioPlayer } from "@/services/audio/player";

interface SourceEntry {
pos: number;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useAdminActivity.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback, useRef } from "react";
import { adminWsClient } from "@/services/adminWsClient";
import { adminWsClient } from "@/services/ws/adminClient";
import type {
ActivityStats,
ActivityChartResponse,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useAdminLogs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback, useRef } from "react";
import { adminWsClient } from "@/services/adminWsClient";
import { adminWsClient } from "@/services/ws/adminClient";
import type { AdminLog } from "@/types";

interface LogQueryParams {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useAdminWebSocket.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useCallback } from "react";
import { useAppDispatch, useAppSelector } from "@/app/store";
import { adminWsClient } from "@/services/adminWsClient";
import { adminWsClient } from "@/services/ws/adminClient";
import { setCredentials, usePostRefreshMutation } from "@/app/slices/authSlice";
import { api } from "@/app/api";

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/hooks/useAudioPlayer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useCallback, useState, useRef } from "react";
import { useAppDispatch, useAppSelector } from "@/app/store";
import { store } from "@/app/store";
import { audioPlayer } from "@/services/audioPlayer";
import { wsClient } from "@/services/wsClient";
import { audioPlayer } from "@/services/audio/player";
import { wsClient } from "@/services/ws/client";
import {
setCurrentCall,
clearCurrentCall,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useWebSocket.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef, useCallback } from "react";
import { useAppDispatch, useAppSelector } from "@/app/store";
import { wsClient } from "@/services/wsClient";
import { wsClient } from "@/services/ws/client";
import { setCredentials, usePostRefreshMutation } from "@/app/slices/authSlice";
import type { ConnectionStatus } from "@/types";

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/useWsQuery.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback, useRef } from "react";
import { adminWsClient } from "@/services/adminWsClient";
import { adminWsClient } from "@/services/ws/adminClient";

// ─── useWsQuery ─────────────────────────────────────────────────────────────

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Call } from "@/types";
import { bootstrapBeepContext } from "@/services/beepPlayer";
import { bootstrapBeepContext } from "@/services/audio/beep";

interface QueueItem {
call: Call;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { wsClient } from "@/services/wsClient";
import { wsClient } from "@/services/ws/client";
import { configureStore } from "@reduxjs/toolkit";
import { scannerSlice } from "@/app/slices/scannerSlice";
import { authSlice } from "@/app/slices/authSlice";
Expand Down
File renamed without changes.
Loading