Add session stats to desktop app

This commit is contained in:
Igor Katson 2024-08-21 13:22:22 +01:00
parent 857db0caf4
commit 93c53b4285
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
5 changed files with 17 additions and 3 deletions

View file

@ -57,7 +57,7 @@ mod peer_info_reader;
mod read_buf;
mod session;
mod session_persistence;
mod session_stats;
pub mod session_stats;
mod spawn_utils;
pub mod storage;
mod stream_connect;

View file

@ -1,5 +1,5 @@
import { createContext } from "react";
import { RqbitAPI } from "./api-types";
import { RqbitAPI, SessionStats } from "./api-types";
export const APIContext = createContext<RqbitAPI>({
listTorrents: () => {
@ -38,5 +38,8 @@ export const APIContext = createContext<RqbitAPI>({
getPlaylistUrl: function (index: number): string | null {
throw new Error("Function not implemented.");
},
stats: function (): Promise<SessionStats> {
throw new Error("Function not implemented.");
},
});
export const RefreshTorrentStatsContext = createContext({ refresh: () => {} });